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

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 23 02:53:59 PDT 2026


================
@@ -1020,6 +1020,15 @@ class GCNSubtarget final : public AMDGPUGenSubtargetInfo,
     return HasGFX1250Insts && getGeneration() == GFX12;
   }
 
+  // V_PERM_PK16 leaves a hazard that must be cleared by an immediately
+  // following "safe" instruction (or an inserted V_NOP). The V_PERM_PK16
+  // instructions are available whenever the tensor convert LUT instructions are
+  // available, but the hazard only affects the GFX12 (gfx1250) part; gfx13
+  // issues them safely.
+  bool hasVPermPk16Hazard() const {
+    return hasTensorCvtLutInsts() && getGeneration() == GFX12;
----------------
arsenm wrote:

Can you make this a proper subtarget feature 

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


More information about the llvm-commits mailing list