[PATCH] D21363: Strided Memory Access Vectorization
Elena Demikhovsky via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 19 02:49:45 PDT 2016
delena added inline comments.
================
Comment at: lib/Target/X86/X86ISelLowering.h:686
@@ +685,3 @@
+ /// Returns maximum supported Interleave factor.
+ unsigned getMaxSupportedInterleaveFactor() const override { return 4; }
+
----------------
Why 4?
================
Comment at: lib/Target/X86/X86TargetTransformInfo.cpp:50
@@ +49,3 @@
+/// Offset 0, 3, 6, 9 required to fill vector register.
+/// So 2 vector load will be requied.
+/// NOTE: It assumes all iteration for a given stride holds common memory
----------------
But it depends on element size..
================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:1004
@@ +1003,3 @@
+/// i.e. arr[i*X], arr[(i+1) * X], arr[(i*X)+1] (where X is a constant stride)
+void StrideAccessInfo::analyzeStride(const Instruction *I) {
+ const LoadInst *Ld = dyn_cast<const LoadInst>(I);
----------------
getPtrStride() does something similar
Repository:
rL LLVM
http://reviews.llvm.org/D21363
More information about the llvm-commits
mailing list