[PATCH] D38682: [LoopInterchange] Fix phi node ordering miscompile.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 16 06:30:15 PDT 2017
fhahn accepted this revision.
fhahn added a comment.
This revision is now accepted and ready to land.
LGTM, this is looks like a reasonable fix addressing a FIXME. Please use `-loop-interchange-threshold` in the test as suggested by @aemerson to ensure the test is always interchanged and hold off committing for a day or so, to give people in other timezones a chance to raise objections.
================
Comment at: lib/Transforms/Scalar/LoopInterchange.cpp:1219
if (InnerLoopHasReduction) {
- // FIXME: Check if the induction PHI will always be the first PHI.
BasicBlock *New = InnerLoopHeader->splitBasicBlock(
----------------
It might be helpful to keep a comment documenting the need for the induction phi to be the first PHI node here (without the FIXME of course)
https://reviews.llvm.org/D38682
More information about the llvm-commits
mailing list