[llvm] [AMDGPU] Fix SIFoldOperands miscompiling values that leave a divergent loop (PR #203256)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 30 03:06:48 PDT 2026


================
@@ -970,6 +982,22 @@ bool SIFoldOperandsImpl::isUseSafeToFold(const MachineInstr &MI,
   return !TII->isSDWA(MI);
 }
 
+// An SGPR->VGPR copy inside a divergent loop latches each lane value as it
----------------
arsenm wrote:

We really should have a version of COPY that is convergent 

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


More information about the llvm-commits mailing list