Intel Triton XPU #7791 — Why Every Mask Had to Be Validated Before the Loop Was Mutated
Intel Triton XPU RemoveMasks, Part 3 of 3 — Mutation-free preflight, result-less scf.if regions, unsupported stores, and a walker whose current loop had already been erased The first two articles in this series examined two kinds of failure in Intel Triton’s TritonIntelRemoveMasks pass. Part 1 examined an invalid replacement: Always-false masked load + no `other` operand ↓ null value passed into RAUW ↓ compiler crash Part 2 examined an invalid proof: Mask resembles a canonical boundary expression but its `N`, tile width, or predicate does not match the generated guard ↓ mask can be removed without being implied PR #7791 also fixed a third boundary. Even a correct proof and a correct local rewrite can fail if the transformation changes the IR before it has established that the whole transformation is legal. Loop versioning is not a one-operation edit. The pass creates a new condition, inserts an scf.if , clones the original loop into two branches, removes ma...