[PATCH] D48048: [LV] Prevent LV to run cost model twice for VF=2
Ayal Zaks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 12 13:02:11 PDT 2018
Ayal added inline comments.
================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:5033
for (unsigned i = 2; i <= MaxVF; i *= 2) {
// Notice that the vector loop needs to be executed less times, so
----------------
Could have alternatively started from `unsigned i = 2 * Width`, as the condition above is essentially peeling the first iteration.
Ideally computing `expectedCost(1)` would also be saved in this case.
Repository:
rL LLVM
https://reviews.llvm.org/D48048
More information about the llvm-commits
mailing list