[llvm] [RISCV] Handled the uimm9 offset while FrameIndex folding. (PR #149303)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 17 07:33:11 PDT 2025
================
@@ -573,6 +573,9 @@ bool RISCVRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II,
int64_t Val = Offset.getFixed();
int64_t Lo12 = SignExtend64<12>(Val);
unsigned Opc = MI.getOpcode();
+ int64_t Imm9Val = SignExtend64<9>(Val);
----------------
topperc wrote:
We can't sign extend the value to 9 bits. We need to check that the raw `Val` is uimm9.
https://github.com/llvm/llvm-project/pull/149303
More information about the llvm-commits
mailing list