Skip to content

Commit 116177a

Browse files
committed
[RISCV] Use SRLIWPat in the PACKUW pattern.
This makes the code more tolerant if we ever change SimplifyDemandedBits to not remove 1s from the lsbs of a contiguous mask.
1 parent e5e448a commit 116177a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/Target/RISCV/RISCVInstrInfoB.td

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1046,7 +1046,6 @@ def : Pat<(sext_inreg (or (shl GPR:$rs2, (i64 16)),
10461046
i32),
10471047
(PACKW GPR:$rs1, GPR:$rs2)>;
10481048
def : Pat<(or (and (assertsexti32 GPR:$rs2), 0xFFFFFFFFFFFF0000),
1049-
(srl (and GPR:$rs1, 0x00000000FFFF0000),
1050-
(i64 16))),
1049+
(SRLIWPat GPR:$rs1, (i64 16))),
10511050
(PACKUW GPR:$rs1, GPR:$rs2)>;
10521051
} // Predicates = [HasStdExtZbp, IsRV64]

0 commit comments

Comments
 (0)