[llvm] [LV] Vectorize Epilogues for loops with small VF but high IC (PR #108190)

Julian Nagele via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 13 09:21:56 PDT 2024


juliannagele wrote:

> Hi - A high level comment - the MaxTripCount in isMoreProfitable is expected to be _the_ constant trip count (as there is generally expected to be a single trip count if it is constant).
> 
> Should the epilog vectorization cost be based on the maximum epilog trip count (VF*IC - 1) or the average trip count?

Hi, thanks for having a look! Not sure I fully understand the question; From the existing code and name my reading was that it should be the maximum trip count, since for the main loop it's using `getSmallConstantMaxTripCount`, which describes itself as an "upper bound of the loop trip count".

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


More information about the llvm-commits mailing list