Skip to content

Commit 36dc2a9

Browse files
authored
[RISCV] Reverse the operands in ins for Zalasr store instructions. NFC (#161882)
Match the assembly printing order rather than sorting by operand name. Tnis is consistent with normal store instructions.
1 parent b0ad9c2 commit 36dc2a9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Target/RISCV/RISCVInstrInfoZalasr.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class LAQ_r<bit aq, bit rl, bits<3> funct3, string opcodestr>
2626
let hasSideEffects = 0, mayLoad = 0, mayStore = 1 in
2727
class SRL_r<bit aq, bit rl, bits<3> funct3, string opcodestr>
2828
: RVInstRAtomic<0b00111, aq, rl, funct3, OPC_AMO,
29-
(outs ), (ins GPRMemZeroOffset:$rs1, GPR:$rs2),
29+
(outs), (ins GPR:$rs2, GPRMemZeroOffset:$rs1),
3030
opcodestr, "$rs2, $rs1"> {
3131
let rd = 0;
3232
}
@@ -71,7 +71,7 @@ class PatLAQ<SDPatternOperator OpNode, RVInst Inst, ValueType vt = XLenVT>
7171
// while atomic_store has data, addr
7272
class PatSRL<SDPatternOperator OpNode, RVInst Inst, ValueType vt = XLenVT>
7373
: Pat<(OpNode (vt GPR:$rs2), (XLenVT GPRMemZeroOffset:$rs1)),
74-
(Inst GPRMemZeroOffset:$rs1, GPR:$rs2)>;
74+
(Inst GPR:$rs2, GPRMemZeroOffset:$rs1)>;
7575

7676

7777
let Predicates = [HasStdExtZalasr] in {

0 commit comments

Comments
 (0)