[llvm] [AMDGPU] S_SET_GPR_IDX_ON can be passed an immediate index (PR #125086)
Joseph Huber via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 30 08:26:18 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
----------------
jhuber6 wrote:
Nit, comment seems weird, couldn't you just remove the `.getReg()` from above to keep the name?
https://github.com/llvm/llvm-project/pull/125086
More information about the llvm-commits
mailing list