Skip to content

Commit 8779ab6

Browse files
authored
[RISCV] Always use XLenVT for pointer operand in PatLAQ and PatSRL. NFC (llvm#161709)
The vt argument is not used today so it always gets the default XLenVT which is why this is NFC. I plan to use it in a future patch.
1 parent 44d471e commit 8779ab6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

llvm/lib/Target/RISCV/RISCVInstrInfoZalasr.td

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,14 @@ defm SD : SRL_r_aq_rl<0b011, "sd">;
6363
//===----------------------------------------------------------------------===//
6464

6565
class PatLAQ<SDPatternOperator OpNode, RVInst Inst, ValueType vt = XLenVT>
66-
: Pat<(vt (OpNode (vt GPRMemZeroOffset:$rs1))), (Inst GPRMemZeroOffset:$rs1)>;
66+
: Pat<(vt (OpNode (XLenVT GPRMemZeroOffset:$rs1))),
67+
(Inst GPRMemZeroOffset:$rs1)>;
6768

6869
// n.b. this switches order of arguments
6970
// to deal with the fact that SRL has addr, data
7071
// while atomic_store has data, addr
7172
class PatSRL<SDPatternOperator OpNode, RVInst Inst, ValueType vt = XLenVT>
72-
: Pat<(OpNode (vt GPR:$rs2), (vt GPRMemZeroOffset:$rs1)),
73+
: Pat<(OpNode (vt GPR:$rs2), (XLenVT GPRMemZeroOffset:$rs1)),
7374
(Inst GPRMemZeroOffset:$rs1, GPR:$rs2)>;
7475

7576

0 commit comments

Comments
 (0)