[PATCH] Bug 21233 - Catch more cases in SLP vectorizer

Andrew Trick atrick at apple.com
Wed Oct 22 13:20:37 PDT 2014


> On Oct 22, 2014, at 10:23 AM, Andrew Trick <atrick at apple.com> wrote:
> 
> Arnold is right that something that uses SCEVExpander is obfuscating the IR. It would be nice to know what. Is it the partial unroller? (I really don’t like that pass running independently from the loop vectorizer).
> 
> There is another completely different way to approach this. The SLP vectorizer wants to know if instructions can statically alias within the same block. AliasAnalysis is way to conservative to handle this query. In other words, we should have a kind of alias analysis that can treat phis (especially in the loop header) as base pointers.

Sorry, that statement about alias analysis was totally wrong and misleading. I looked at this again with Arnold and agree that BasicAA should really be able to handle this loop. One of the passes, maybe indvars, maybe loop unroll, is generating nasty induction variables. We need to see the test case or IR before transformation to understand what happened.

SVEV-AA is potentially a valuable tool, but very expensive in passes like SLP where we’re not already generating SCEV expressions within the loop, except in very limited cases.

This particular loop is simple enough that it should not merit adding such an expensive analysis.

-Andy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141022/4cde4a67/attachment.html>


More information about the llvm-commits mailing list