[PATCH] Fix bug 22641

Andrew Trick atrick at apple.com
Mon Feb 23 11:44:44 PST 2015


Wow! Thank you Sanjoy. This is an awesome catch and these test cases are invaluable.

I think the most obvious bug here is my implicit assumption that the step is positive. So we're looking at a post-increment recurrence and calling it PreAR. Maybe we should have a comment about that?

That said, I think your proposed check makes sense:
 !isa<SCEVCouldNotCompute>(BECount) && SE->isKnownPositive(BECount)

I like that better than checking the ExitingBlock. Sorry if you proposed that earlier and I directed you down the wrong path. At least we got a great test case out of it.


http://reviews.llvm.org/D7808

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list