[PATCH] D111301: [VPlan] Make sure recurrence splice is not inserted between phis.
Ayal Zaks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 25 14:18:19 PDT 2021
Ayal added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:9447
+ auto &VPBB = *PrevRecipe->getParent();
+ if (PrevRecipe->isPhi())
+ RecurSplice->moveBefore(VPBB, VPBB.getFirstNonPhi());
----------------
Hmm, PrevRecipe cannot be a header phi because that would result in 2nd order recurrence (or greater); but it may be a phi of a replicated region? Should blends be excluded here? Curious to see a test...
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:9451
+ RecurSplice->moveAfter(PrevRecipe);
+ }
RecurPhi->replaceAllUsesWith(RecurSplice);
----------------
How about setting the insertion point of Builder before creating the Op, instead of finding where to move it afterwards?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111301/new/
https://reviews.llvm.org/D111301
More information about the llvm-commits
mailing list