[llvm] [LV] Allow partial reductions with an extended bin op (PR #165536)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 4 05:05:25 PST 2025


================
@@ -146,3 +146,147 @@ for.body:                                         ; preds = %for.body, %entry
 exit:
   ret i32 %add
 }
+
+define i32 @print_partial_reduction_ext_mul(i64 %n, ptr %a, i8 %b) {
+; CHECK:       VPlan 'Initial VPlan for VF={8},UF>=1' {
+; CHECK-NEXT:  Live-in vp<%0> = VF * UF
+; CHECK-NEXT:  Live-in vp<%1> = vector-trip-count
+; CHECK-NEXT:  vp<%2> = original trip-count
+; CHECK-EMPTY:
+; CHECK-NEXT:  ir-bb<entry>:
+; CHECK-NEXT:    EMIT vp<%2> = EXPAND SCEV (1 + %n)
----------------
fhahn wrote:

please capture the unnamed VPValues to make the test more robust w.r.t. future changes

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


More information about the llvm-commits mailing list