[PATCH] D97406: [Vectorizers]Improve emission of logical or/and reductions.
Alexey Bataev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 26 10:46:35 PST 2021
ABataev added a comment.
In D97406#2590716 <https://reviews.llvm.org/D97406#2590716>, @RKSimon wrote:
> Can't all the vectorizer code be removed now? X86TTIImpl::getArithmeticReductionCost already has bool reduction costs - not sure if we need to improve the default costs ?
Looks like the bool reduction costs are too high because they still rely on some vector instructions. The cost of bitcast + cmp is much lower than even AVX512 bool reductions, for example. What we can do, is to check ащкall targets that we have or/and bool reduction and fallback to the BasicTTI cost. And teach BasicTTI that the cost of bool or/and reductions is actually just bitcast+cmp.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97406/new/
https://reviews.llvm.org/D97406
More information about the llvm-commits
mailing list