[PATCH] D18971: [LoopUtils, LV] Fix PR27246 (first-order recurrences)
Chad Rosier via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 11 11:07:20 PDT 2016
mcrosier accepted this revision.
mcrosier added a comment.
This revision is now accepted and ready to land.
LGTM with a minor nit.
================
Comment at: lib/Transforms/Utils/LoopUtils.cpp:544
@@ -545,1 +543,3 @@
+ auto *Previous = Phi->getIncomingValueForBlock(Latch);
+ if (TheLoop->isLoopInvariant(Previous) || isa<PHINode>(Previous))
return false;
----------------
This looks like your combining the fix with a NFC (i.e., replacing the original check with isLoopInvariant()). I'd prefer this patch only include the isa<PHINode> check and you can make the NFC in a subsequent patch.
http://reviews.llvm.org/D18971
More information about the llvm-commits
mailing list