[PATCH] D111301: [VPlan] Make sure recurrence splice is not inserted between phis.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 26 09:52:02 PDT 2021
fhahn marked an inline comment as done.
fhahn added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:9447
+ auto &VPBB = *PrevRecipe->getParent();
+ if (PrevRecipe->isPhi())
+ RecurSplice->moveBefore(VPBB, VPBB.getFirstNonPhi());
----------------
Ayal wrote:
> 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...
I thought there was a test case, but it looks like I remembered incorrectly. Removed the check.
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:9451
+ RecurSplice->moveAfter(PrevRecipe);
+ }
RecurPhi->replaceAllUsesWith(RecurSplice);
----------------
Ayal wrote:
> How about setting the insertion point of Builder before creating the Op, instead of finding where to move it afterwards?
> How about setting the insertion point of Builder before creating the Op, instead of finding where to move it afterwards?
Sounds good, updated!
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