[PATCH] D27919: [Loop Vectorizer] Interleave vs Gather - in some cases Gather is better.
Elena Demikhovsky via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 20 06:04:19 PST 2016
delena added inline comments.
================
Comment at: ../../ver4/lib/Transforms/Vectorize/LoopVectorize.cpp:7047-7049
+ // I do not compare "gather" cost vs "interleave pattern", I just assume
+ // that each target provides reasonable MaxInterleaveFactor that
+ // makes the "interleave pattern" profitable. When InterleaveFactor
----------------
mssimpso wrote:
> Why don't you just compare the costs? You wouldn't need to make this assumption anymore.
The cost that we provide for interleaved access is incorrect, specially for AVX-512. AVX-512 has 3-src shuffles and the real cost is much lower . I can't compare it to Gather - the Gather cost wins today, even for small stride, but it is not true. So there are 2 bugs:
(1) The loop is scalarized and Gather/Scatter option is not considered at all
(2) Incorrect cost for interleaving
I can start from providing a correct cost for interleaving on AVX-512.
Or I can fix the (1) first of all. I'll retrieve the proper "MaxSupportedInterleaveFactor".
What do you think?
Repository:
rL LLVM
https://reviews.llvm.org/D27919
More information about the llvm-commits
mailing list