[PATCH] ScalarEvolution incorrectly assumes that the start of certain add recurrences don't overflow
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())
> 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. :)
More information about the llvm-commits