[llvm] [AMDGPU] S_SET_GPR_IDX_ON can be passed an immediate index (PR #125086)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 30 09:36:42 PST 2025


================
@@ -2366,11 +2366,11 @@ 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();
+    MachineOperand Idx = MI.getOperand(3);
----------------
arsenm wrote:

Don't use operands by value 

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


More information about the llvm-commits mailing list