[PATCH] ScalarEvolution incorrectly assumes that the start of certain add recurrences don't overflow
Sanjoy Das
sanjoy at playingwithpointers.com
Sun Feb 8 12:24:36 PST 2015
================
Comment at: lib/Analysis/ScalarEvolution.cpp:1382
@@ -1368,1 +1381,3 @@
+ if (PreAR && PreAR->getNoWrapFlags(SCEV::FlagNSW) &&
+ L->getExitingBlock() == L->getLoopLatch())
return PreStart;
----------------
hfinkel wrote:
> I think that you need to make sure that both L->getExitingBlock() and L->getLoopLatch() are not nullptr (which could happen if there is no unique loop latch and also no unique exiting block). Otherwise, LGTM.
>
You're right, that was a slip on my part; will fix and check in.
Thanks for the review. :)
http://reviews.llvm.org/D7331
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list