[PATCH] D21048: [LV] Enable vectorization of loops where the IV has an external use
Wei Mi via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 14 11:36:50 PDT 2016
wmi added inline comments.
================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:3301
@@ +3300,3 @@
+ assert(isa<PHINode>(UI) && "Expected LCSSA form");
+ if (!PrevValue) {
+ const DataLayout &DL =
----------------
Why PrevValue is necessary? In which case OrigPhi->users() can have more than one use outside loop?
================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:4806
@@ -4757,3 +4805,3 @@
if (InductionDescriptor::isInductionPHI(Phi, PSE, ID)) {
if (!addInductionPhi(Phi, ID))
return false;
----------------
addInductionPhi will return true anyway now. So maybe change its return val to void and remove the if?
http://reviews.llvm.org/D21048
More information about the llvm-commits
mailing list