[PATCH] don't unroll loops with zero trip count; fix for PR21409
Sanjay Patel
spatel at rotateright.com
Mon Nov 10 14:36:40 PST 2014
This change actually is in the runtime unroller...why we're getting here for a compile-time constant loop is another bug?
In the compile-time unroller, we do this check:
TripCount = SE->getSmallConstantTripCount(L, ExitingBlock);
And getSmallConstantTripCount() has this:
// In case of integer overflow, this returns 0, which is correct.
return ((unsigned)ExitConst->getZExtValue()) + 1;
http://reviews.llvm.org/D6200
More information about the llvm-commits
mailing list