[PATCH] D27919: [Loop Vectorizer] Interleave vs Gather - in some cases Gather is better.

Matthew Simpson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 19 10:25:47 PST 2016


mssimpso added inline comments.


================
Comment at: ../../ver4/lib/Transforms/Vectorize/LoopVectorize.cpp:7052
+      // becomes better.
+      if (InterleaveFactor > TTI.getMaxInterleaveFactor(VF) &&
+          Legal->isLegalGatherOrScatter(I)) {
----------------
mkuper wrote:
> Aren't we already checking this in selectInterleaveCount()?
> How do we end up with interleave factors above MaxInterleaveFactor in the first place?
Ah, our naming conventions have confused this somewhat, I think. TTI.getMaxInterleaveFacor is the hook for the max unroll factor ("interleaving"). I think Elana was wanting TLI.getMaxSupportedInterleaveFactor instead. This is the hook for determining the max factor of the interleaved access groups.


Repository:
  rL LLVM

https://reviews.llvm.org/D27919





More information about the llvm-commits mailing list