[llvm] [VPlan] Reassociate (x & y) & z -> x & (y & z) (PR #155383)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 1 09:33:20 PDT 2025


================
@@ -1119,6 +1119,14 @@ static void simplifyRecipe(VPRecipeBase &R, VPTypeAnalysis &TypeInfo) {
     return;
   }
 
+  // Reassociate (x & y) & z -> x & (y & z) if x has multiple users. With tail
+  // folding it is likely that x is a header mask and can be simplified further.
----------------
artagnon wrote:

```suggestion
  // Reassociate (x && y) && z -> x && (y && z) if x has multiple users. With tail
  // folding it is likely that x is a header mask and can be simplified further.
```

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


More information about the llvm-commits mailing list