[PATCH] D44199: [LoopRotate] Attempt to Rotate loops if it can lead to removing phi nodes.
Dave Green via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 22 15:07:39 PDT 2018
dmgreen added inline comments.
================
Comment at: lib/Transforms/Scalar/LoopRotation.cpp:190
+ if (!isa<PHINode>(Phi.getIncomingValueForBlock(Latch)))
+ continue;
+ return true;
----------------
efriedma wrote:
> Is the getIncomingValueForBlock() check necessary? The previous any_of check should enough to ensure we're always eliminating a PHI node, I think?
>
> If it is necessary, please add a testcase demonstrating why.
Nice. Like it. I was thinking this felt a bit too specific.
I've updated this and tried to come up with a sensible(ish) test.
https://reviews.llvm.org/D44199
More information about the llvm-commits
mailing list