[PATCH] [LoopVectorize]Teach Loop Vectorizer about interleaved memory access

Renato Golin renato.golin at linaro.org
Mon May 11 13:36:41 PDT 2015


Hi Hao,

This are my last comments on this first round. There are a lot of details that can be cleaned quickly, others that will need more discussion.

About the tests, AFAICR, we tend not to have specific architectures in the vectorizer IR tests, just forcing VF and UF etc would make the generic cases work on any platform. Specific stuff could go into arch-specific tests.

Also, do we have those patterns recognised in the back end as VLDn / VSTn? If so, would be good to emit ASM in the arch-specific tests and check for them. If not, we should add tests here to that effect when we do have them.

cheers,
--renato


================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:3855
@@ +3854,3 @@
+
+static Value *getBasePointer(Instruction *I, const DataLayout &DL) {
+  Value *Ptr = getPointerOperand(I);
----------------
This seems too generic to be in LoopVectorizer.cpp

================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:3881
@@ +3880,3 @@
+       ++BB) {
+    if (blockNeedsPredication(*BB))
+      continue;
----------------
delena wrote:
> Why predicated block is not considered?
> 
>   for (i = 0; i < N; i+=2) {
>    if (B[i]) {
>          A[i] += 1;
>          A[i+1] += 2;
>     }
>    }
I think for the sake of simplicity in the first implementation. Maybe a TODO/FIXME comment would clarify better.

http://reviews.llvm.org/D9368

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list