[llvm] [VPlan] Enforce that there is only ever one header mask. NFC (PR #152489)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 8 22:17:09 PDT 2025


================
@@ -2242,8 +2246,8 @@ static void transformRecipestoEVLRecipes(VPlan &Plan, VPValue &EVL) {
     }
   }
 
-  // Try to optimize header mask recipes away to their EVL variants.
-  for (VPValue *HeaderMask : collectAllHeaderMasks(Plan)) {
+  // Try to optimize recipes which use the header mask to their EVL variants.
+  if (VPValue *HeaderMask = findHeaderMask(Plan)) {
----------------
lukel97 wrote:

It can be optimized away if there are no users and it's dead. There were a few RISC-V test cases where this happens

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


More information about the llvm-commits mailing list