[llvm] [LV][VPlan] Implement VPlan-based cost for exit condition. (PR #125640)

Elvis Wang via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 7 22:50:54 PDT 2025


================
@@ -92,9 +92,11 @@ loop.end:
 
 define i64 @vectorization_not_profitable_due_to_trunc(ptr dereferenceable(800) %src) {
 ; CHECK-LABEL: LV: Checking a loop in 'vectorization_not_profitable_due_to_trunc'
-; CHECK: LV: Selecting VF: 1.
-; CHECK-NEXT: Calculating cost of work in exit block vector.early.exit:
-; CHECK-NEXT: LV: Vectorization is possible but not beneficial.
+; CHECK: Calculating cost of work in exit block vector.early.exit:
----------------
ElvisWang123 wrote:

Yes, the cost of VPInstruction ICmp is not modeled in vplan-based cost model yet.

But model the cost of ICmp will cause more tests changes and more loops not vectorized. 

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


More information about the llvm-commits mailing list