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

Chad Rosier mcrosier at codeaurora.org
Wed Oct 22 07:57:36 PDT 2014


Hi Sanjin,

> The attached patch addresses bug #21233.  I didn't see a way to vectorize
> the attached test case without using SCEV-AA along with a small change in
> SLP vectorizer to retrieve the base pointer using SCEV analysis.

+      if (UseSCEVAAForSLP)
+        MPM.add(createScalarEvolutionAliasAnalysisPass());
+      MPM.add(createSLPVectorizerPass());   // Vectorize parallel scalar
chains.

This looks to be add a call to the SLP vectorizer pass.  Is this change
indented?  I imagine you just want to add the SCEV-AA pass before the
existing SLP vectorizer pass a few lines above this change.

> Can someone please have a look?  Is it safe to use SCEV-AA, or should I
> pursue a different approach?

I'm not the right person to comment on the use of SCEV-AA in the SLP
vectorizer.  Perhaps, Arnold, Hal, or someone else could provide their
opinion.

 Chad




More information about the llvm-commits mailing list