[llvm] [RISCV] Handled the uimm9 offset while FrameIndex folding. (PR #149303)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 21 22:51:51 PDT 2025


================
@@ -585,6 +588,11 @@ bool RISCVRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II,
                (Lo12 & 0b11111) != 0) {
       // Prefetch instructions require the offset to be 32 byte aligned.
       MI.getOperand(FIOperandNum + 1).ChangeToImmediate(0);
+    } else if ((Opc == RISCV::PREFETCH_I || Opc == RISCV::PREFETCH_R ||
+                Opc == RISCV::PREFETCH_W) &&
----------------
ukalappa-mips wrote:

@topperc  the "ukalappa_riscv_frameindex" branch was not updated ...same updated now 

https://github.com/llvm/llvm-project/pull/149303


More information about the llvm-commits mailing list