[PATCH] D20789: Consecutive memory access in Loop Vectorizer - fixed and simplified
Adam Nemet via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 7 06:27:55 PDT 2016
anemet added inline comments.
================
Comment at: ../lib/Analysis/LoopAccessAnalysis.cpp:913-917
@@ -861,1 +912,7 @@
+ if (!AR)
+ // One more attempt to get stride from GEP with index calculated in runtime
+ if (auto *Gep = dyn_cast<GetElementPtrInst>(Ptr))
+ if (int Stride = getConsecutiveAccessFromGEPIndex(PSE, Gep, Lp, StridesMap))
+ return Stride;
+
----------------
Sorry for jumping in late but I was on vacation. Elena, does your testcase actually exercise this part of the code or it's handled as a regular AddRec above? I am assuming not since the Ptr is not a GEP.
Do we actually have coverage exercising this part?
================
Comment at: ../test/Transforms/LoopVectorize/consec_no_gep.ll:7
@@ +6,3 @@
+;; Check consecutive memory access without preceding GEP instruction
+
+; for (int i=0; i<len; i++) {
----------------
The C code and the IR do not match here. You have some casts here. Can this testcase be simplified to remove the casts?
Repository:
rL LLVM
http://reviews.llvm.org/D20789
More information about the llvm-commits
mailing list