Skip to content

Commit 8abd962

Browse files
committed
fixup! shamt
1 parent 7e7f3b9 commit 8abd962

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

llvm/lib/Target/RISCV/RISCVInstrInfoP.td

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
def simm10 : RISCVSImmOp<10>, TImmLeaf<XLenVT, "return isInt<10>(Imm);">;
2222
def tuimm3 : RISCVUImmOp<3>, TImmLeaf<XLenVT, "return isUInt<3>(Imm);">;
2323
def tuimm4 : RISCVUImmOp<4>, TImmLeaf<XLenVT, "return isUInt<4>(Imm);">;
24+
def tuimm5 : RISCVUImmOp<5>, TImmLeaf<XLenVT, "return isUInt<5>(Imm);">;
2425

2526
def SImm8UnsignedAsmOperand : SImmAsmOperand<8, "Unsigned"> {
2627
let RenderMethod = "addSImm8UnsignedOperands";
@@ -1557,8 +1558,8 @@ let Predicates = [HasStdExtP, IsRV64] in {
15571558
def: Pat<(v2i32 (riscv_pasubu GPR:$rs1, GPR:$rs2)), (PASUBU_W GPR:$rs1, GPR:$rs2)>;
15581559

15591560
// 32-bit logical shift left patterns
1560-
def: Pat<(v2i32 (shl GPR:$rs1, (v2i32 (riscv_pli tuimm4:$shamt)))),
1561-
(PSLLI_W GPR:$rs1, tuimm4:$shamt)>;
1561+
def: Pat<(v2i32 (shl GPR:$rs1, (v2i32 (riscv_pli tuimm5:$shamt)))),
1562+
(PSLLI_W GPR:$rs1, tuimm5:$shamt)>;
15621563

15631564
// 32-bit signed saturation shift left patterns
15641565
def: Pat<(v2i32 (sshlsat GPR:$rs1, (v2i32 (riscv_pli tuimm4:$shamt)))),

0 commit comments

Comments
 (0)