[llvm] [AMDGPU] Cleanup hasUnwantedEffectsWhenEXECEmpty function (PR #70206)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 25 19:43:45 PDT 2023
ruiling wrote:
I don't think the change is ok. The function `hasUnwantedEffectsWhenEXECEmpty()` is used to query whether we can optimize away a `s_cbranch_exez`, that is whether a block can be always executed even the EXEC is zero, **and the block execution with zero EXEC should not cause any observable side-effect to the program**. In theory, I think any instruction write to SGPR could possibly cause sideffect to the program. Although in practice, we might not hit this, I am not sure about this. But I think we should revert this, and I think it is even better to say scalar instructions also have unwanted-side-effect-when-exec-zero. @nhaehnle @perlfu
https://github.com/llvm/llvm-project/pull/70206
More information about the llvm-commits
mailing list