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

Matthew Simpson via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 21 10:29:04 PDT 2016


mssimpso added inline comments.

================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:1913
@@ -1903,3 +1912,3 @@
   VecInd->addIncoming(SteppedStart, LoopVectorPreHeader);
   VecInd->addIncoming(LastInduction, LoopVectorBody);
 }
----------------
mkuper wrote:
> 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.)
Right, thanks for catching this. I'll update the patch.


https://reviews.llvm.org/D22416





More information about the llvm-commits mailing list