[llvm] [RISCV] Use QC_E_ADDI while eliminating the frameindex (PR #139515)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Mon May 12 12:37:03 PDT 2025
================
@@ -288,6 +288,17 @@ void RISCVRegisterInfo::adjustReg(MachineBasicBlock &MBB,
return;
}
+ // Use the QC_E_ADDI instruction from the Xqcilia extension that can take a
+ // signed 26-bit immediate. Avoid anything which can be done with a single lui
+ // as it might be compressible.
----------------
topperc wrote:
Compressible LUI encodes a 6-bit immediate. So if the immediate is larger than simm18, it can never use c.lui even if the the lower 12 bits are 0.
https://github.com/llvm/llvm-project/pull/139515
More information about the llvm-commits
mailing list