[llvm] [AMDGPU] Insert exec-forced V_NOP after V_PERM_PK16 (gfx1250 hazard) (PR #214406)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 23 02:46:33 PDT 2026


https://github.com/jayfoad requested changes to this pull request.

Inserting code to force exec non-zero is not the right approach.

The backend strategy is first to generate code that ensures exec is never zero, by emitting s_cbranch_execz to skip over any regions where exec _might_ have been set to zero. Then later _as an optimization_ it removes some of these branches if it is safe and profitable to do so. The safety check is based on SIInstrInfo::hasUnwantedEffectsWhenEXECEmpty. So if you change that function to return true when it sees v_perm_pk16, that should ensure that exec is always non-zero at that point.

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


More information about the llvm-commits mailing list