[PATCH] D100121: [LV] Let selectVectorizationFactor reason directly on VectorizationFactor.
Sander de Smalen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 8 10:53:23 PDT 2021
sdesmalen added a comment.
You're right, that comment wasn't correct. I wrote the code last week and incorrectly remembered the change when writing up the comment today.
The issue has to do with the truncation. It stores the floating-point cost in the ProfitableVFs list as `unsigned`.
For llvm/test/Transforms/LoopVectorize/X86/intrinsiccost.ll, it then compares the costs as follows:
1 < 2 ? true
0 < 1 ? true
0 < 0 ? false
Where it now compares the costs properly as:
5/4 < 5/2 ? true
5/8 < 5/4 ? true
5/16 < 5/8 ? true
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100121/new/
https://reviews.llvm.org/D100121
More information about the llvm-commits
mailing list