[llvm] [LV] Trim VFs that cause vector splitting when tail-folding with EVL (PR #222836)

Andrei Elovikov via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 11 06:39:54 PDT 2026


================
@@ -15,8 +15,8 @@ define i64 @add(ptr %a, i64 %n, i64 %start) {
 ; CHECK:  Cost of 0 for VF vscale x 4: WIDEN-INTRINSIC vp<[[VP9]]> = call llvm.vp.merge(ir<true>, ir<%add>, ir<%rdx>, vp<%evl>)
 ; CHECK:  Cost of 0 for VF vscale x 8: WIDEN-REDUCTION-PHI ir<%rdx> = phi (add) vp<[[VP2]]>, vp<[[VP9]]>
 ; CHECK:  Cost of 0 for VF vscale x 8: WIDEN-INTRINSIC vp<[[VP9]]> = call llvm.vp.merge(ir<true>, ir<%add>, ir<%rdx>, vp<%evl>)
-; CHECK:  Cost of 0 for VF vscale x 16: WIDEN-REDUCTION-PHI ir<%rdx> = phi (add) vp<[[VP2]]>, vp<[[VP9]]>
-; CHECK:  Cost of 16 for VF vscale x 16: WIDEN-INTRINSIC vp<[[VP9]]> = call llvm.vp.merge(ir<true>, ir<%add>, ir<%rdx>, vp<%evl>)
+; CHECK-NOT:  Cost of {{.*}} for VF vscale x 16: WIDEN-REDUCTION-PHI ir<%rdx> = phi (add) vp<[[VP2]]>, vp<[[VP9]]>
+; CHECK-NOT:  Cost of {{.*}} for VF vscale x 16: WIDEN-INTRINSIC vp<[[VP9]]> = call llvm.vp.merge(ir<true>, ir<%add>, ir<%rdx>, vp<%evl>)
----------------
eas wrote:

Would 

```suggestion
; CHECK-NOT:  Cost of {{.*}} for VF vscale x 16: 
```

work? Otherwise just the change in some names/printing could cause the test not to check what it intends to.

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


More information about the llvm-commits mailing list