[llvm] [AMDGPU] Handle MachineOperandType global address in SIFoldOperands. (PR #135424)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 26 00:20:02 PDT 2025


================
@@ -1161,6 +1161,10 @@ void SIFoldOperandsImpl::foldOperand(
 
         if (OpToFold.isImm())
           UseMI->getOperand(1).ChangeToImmediate(OpToFold.getImm());
+        else if (OpToFold.isGlobal())
+          UseMI->getOperand(1).ChangeToGA(OpToFold.getGlobal(),
+                                          OpToFold.getOffset(),
+                                          OpToFold.getTargetFlags());
         else
           UseMI->getOperand(1).ChangeToFrameIndex(OpToFold.getIndex());
----------------
arsenm wrote:

@dhruvachak is spelling out the same as I stated 

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


More information about the llvm-commits mailing list