LoopVectorizer: decision when no vector instructions generated has changed
Jonas Paulsson via llvm-commits
llvm-commits at lists.llvm.org
Fri May 26 05:27:09 PDT 2017
Hi,
I find that now the LoopVectorizers behaviour has changed its behaviour
regarding "Not considering vector loop of width X because it will not
generate any vector instructions."
During my previous experiments with the Loop vectorizer, I found that it
would actually vectorize a loop with no resulting vectorized
instructions in the case where there is a memory access. I thought at
first this was wrong, and tried changing it, only to find that this then
actually made hundreds of loops then not
getting vectorized. Since those loops looked perhaps better vectorized,
and this was so big of a change, that I concluded that it was probably
on purpose, and later suggested a comment during review of that patch:
// Note: Even if all instructions are scalarized, return true if any memory
// accesses appear in the loop to get benefits from address folding etc.
I thought that most of those changed loops seemed somewhat better when
vectorized (fully scalarized), giving a kind of unrolling effect. I
wouldn't however really argue that this is needed.
So, I just want to point out that this affects hundreds of loops, in
case this was changed unintentionally. Second, if this was not on
purpose earlier and this really shouldn't be done, I guess the comment I
added should just be removed.
/Jonas
More information about the llvm-commits
mailing list