[PATCH] Extend LoopVectorizationLegality::isConsecutivePtr to handle multiple level GEPs
Wei Mi
wmi at google.com
Mon Jun 22 18:13:39 PDT 2015
REPOSITORY
rL LLVM
================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:1560
@@ +1559,3 @@
+ if (auto C =
+ dyn_cast_or_null<SCEVConstant>(PtrAddRec->getStepRecurrence(*SE))) {
+ int64_t StepVal = C->getValue()->getSExtValue();
----------------
hfinkel wrote:
> Does this give you what you want if you have nested loops? You only want that part of the recurrence that refers to the inner loop, right?
Yes, I want the recurrence refering to the inner loop. I just tried a small testcase and found the Loop inside SCEVAddRecExpr may refer to outside loop if the SCEVAddRecExpr is invariant for the inside loop. I will check whether the loop of SCEVAddRecExpr is identical with the loop in LoopVectorizationLegality.
http://reviews.llvm.org/D10281
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list