[llvm] [LV] Bundle partial reductions inside VPExpressionRecipe (PR #147302)
    Sam Tebbs via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Oct 21 02:46:15 PDT 2025
    
    
  
================
@@ -86,7 +86,7 @@ define i64 @test_two_ivs(ptr %a, ptr %b, i64 %start) #0 {
 ; CHECK-NEXT: Cost of 0 for VF 16: induction instruction   %i.iv = phi i64 [ 0, %entry ], [ %i.iv.next, %for.body ]
 ; CHECK-NEXT: Cost of 0 for VF 16: induction instruction   %j.iv = phi i64 [ %start, %entry ], [ %j.iv.next, %for.body ]
 ; CHECK-NEXT: Cost of 0 for VF 16: EMIT vp<{{.+}}> = CANONICAL-INDUCTION ir<0>, vp<%index.next>
-; CHECK: Cost for VF 16: 41
+; CHECK: Cost for VF 16: 3
----------------
SamTebbs33 wrote:
Done! These are the instructions that get folded into the expression, hence the huge cost decrease.
```
Cost of 15 for VF 16: WIDEN-CAST ir<%conv> = zext ir<%0> to i64
[...]
Cost of 15 for VF 16: WIDEN-CAST ir<%conv3> = zext ir<%1> to i64
Cost of 8 for VF 16: WIDEN ir<%mul> = mul nuw nsw ir<%conv3>, ir<%conv>
````
https://github.com/llvm/llvm-project/pull/147302
    
    
More information about the llvm-commits
mailing list