[llvm] [AMDGPU] S_SET_GPR_IDX_ON can be passed an immediate index (PR #125086)
Jon Chesterfield via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 30 08:32:16 PST 2025
================
@@ -2366,11 +2366,10 @@ bool SIInstrInfo::expandPostRAPseudo(MachineInstr &MI) const {
assert(ST.useVGPRIndexMode());
Register VecReg = MI.getOperand(0).getReg();
bool IsUndef = MI.getOperand(1).isUndef();
- Register Idx = MI.getOperand(3).getReg();
Register SubReg = MI.getOperand(4).getImm();
MachineInstr *SetOn = BuildMI(MBB, MI, DL, get(AMDGPU::S_SET_GPR_IDX_ON))
- .addReg(Idx)
+ .add(MI.getOperand(3)) // Index
----------------
JonChesterfield wrote:
Sure, that's equivalent and makes the diff smaller. Done.
https://github.com/llvm/llvm-project/pull/125086
More information about the llvm-commits
mailing list