[llvm] [RISCV] Fold shxadd into Xqcisls scaled load/store in RISCVMergeBaseOffset (PR #182221)
Sam Elliott via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 19 13:02:47 PST 2026
================
@@ -575,6 +576,114 @@ bool RISCVMergeBaseOffsetOpt::foldIntoMemoryOps(MachineInstr &Hi,
return true;
}
+// Try to fold sequences of the form:
+// Hi/lo: qc.e.li vreg1, s -> qc.e.li vreg1, s+imm
+// TailAdd: shxadd vreg2, vreg3, vreg1 -> deleted
+// Tail: lx vreg4, imm(vreg2) -> qc.lrx vreg4, vreg1, vreg3, (1/2/3)
+bool RISCVMergeBaseOffsetOpt::foldShxaddIntoScaledMemory(MachineInstr &Hi,
+ MachineInstr &Lo) {
----------------
lenary wrote:
What is the `MachineInstr &Lo` used for? Nothing?
https://github.com/llvm/llvm-project/pull/182221
More information about the llvm-commits
mailing list