[PATCH] D22416: [LV] Move vector induction update to end of latch

Michael Kuperstein via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 15 15:49:43 PDT 2016


mkuper added a comment.

I don't really see why this should matter, but I don't have any objections either, and I guess uniformity is good.


================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:1913
@@ -1903,3 +1912,3 @@
   VecInd->addIncoming(SteppedStart, LoopVectorPreHeader);
   VecInd->addIncoming(LastInduction, LoopVectorBody);
 }
----------------
Since you explicitly moved the instruction to the latch, the phi should probably also take it from the latch.
(The reason this works as is, is because we only support single-BB loops, so the body is always the latch. That was always true, it's just that now it looks more confusing.)


https://reviews.llvm.org/D22416





More information about the llvm-commits mailing list