[llvm] [AMDGPU] Fix bad removal of s_delay_alu (PR #145728)

Ana Mihajlovic via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 27 05:08:04 PDT 2025


================
@@ -49,9 +49,17 @@ class AMDGPUInsertDelayAlu {
 
   static bool instructionWaitsForSGPRWrites(const MachineInstr &MI) {
     // These instruction types wait for VA_SDST==0 before issuing.
-    const uint64_t VA_SDST_0 = SIInstrFlags::SALU | SIInstrFlags::SMRD;
+    uint64_t MIFlags = MI.getDesc().TSFlags;
----------------
mihajlovicana wrote:

> This function seems to be ignoring the handful of VALU instructions which do read SGPRs? Also inlineasm

VALU->SGPR->VALU doesn't use VA_SDST counter, at least I haven't seen that

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


More information about the llvm-commits mailing list