[llvm] [LV][VPlan] Implement VPlan-based cost for exit condition. (PR #125640)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 8 00:47:01 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:
----------------
david-arm wrote:
What I mean is that this patch has "broken" the test. The purpose of the test was to explicitly defend a case where vectorisation was not profitable, in this case due to the truncate. That's why the test is named `@vectorization_not_profitable_due_to_trunc`. Either:
1. There is a bug in the cost model with this PR which is causing a regression in this test, or
2. The test is unstable. If so, can you rename the test to something else such as `@vectorization_profitable_even_with_trunc`.
If it's 2 I think we need to find a replacement test where we do decide against vectorisation due to profitability. I'm happy to look into that, but first I want to be sure it's not 1.
https://github.com/llvm/llvm-project/pull/125640
More information about the llvm-commits
mailing list