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

David Sherwood via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 11 01:24:44 PDT 2025


david-arm 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.

However, if possible I would still prefer to do this in a different order, i.e.

1. Do preparation work to ensure this PR doesn't regress, then
2. Land this PR.

otherwise if you do this in the opposite order we're knowingly breaking the loop vectoriser for a period of time, which isn't ideal for other users. If the only way to avoid regressions is to add the cost of the icmp to this PR as well, then perhaps that's a necessary evil?

Also, the test `@vectorization_not_profitable_due_to_trunc` is still broken, which needs fixing. The test is very confusing because with this PR we do vectorise.

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


More information about the llvm-commits mailing list