[llvm] [AMDGPU] Fix bad removal of s_delay_alu (PR #145728)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 26 00:18:17 PDT 2025
================
@@ -50,8 +50,12 @@ 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;
-
- return MI.getDesc().TSFlags & VA_SDST_0;
+ if (MI.getDesc().TSFlags & VA_SDST_0) {
+ for (auto &Op : MI.uses())
----------------
jayfoad wrote:
Also don't scan the operands of SMEM instructions. That's just a waste of time.
https://github.com/llvm/llvm-project/pull/145728
More information about the llvm-commits
mailing list