[PATCH] D20789: Consecutive memory access in Loop Vectorizer - fixed and simplified
Ayal Zaks via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 7 04:50:49 PDT 2016
Ayal added a comment.
This looks good to me (especially isConsecutivePrt() ;-)
================
Comment at: ../lib/Analysis/LoopAccessAnalysis.cpp:856-857
@@ +855,4 @@
+ unsigned InductionOperand = getGEPInductionOperand(Gep);
+ if (InductionOperand != NumOperands - 1)
+ return 0;
+
----------------
getGEPInductionOperand() returns the last relevant index to check; all indices following it do not affect the address; so InductionOperand should work even when it's not NumOperands - 1.
================
Comment at: ../lib/Transforms/Vectorize/LoopVectorize.cpp:2131
@@ -2130,82 +2130,3 @@
int LoopVectorizationLegality::isConsecutivePtr(Value *Ptr) {
assert(Ptr->getType()->isPointerTy() && "Unexpected non-ptr");
----------------
somewhat redundant, as it's the first check in getPtrStride() as well
Repository:
rL LLVM
http://reviews.llvm.org/D20789
More information about the llvm-commits
mailing list