Here is activated check elimination which was parsed previously in
https://reviews.llvm.org/D154069
- Added runtime check that computed range's boundary doesn't overflow in
terms of range type.
- From the statement INT_MIN <= END <= INT_MAX is inferred check:
isNonNegative(INT_MAX - END) * isNonNegative(END - INT_MIN).
- If overflow happens, check will return 0 and the safe interval will be
empty.
bool NeedEndOverlowRuntimeCheck = EndType->getBitWidth() > RCType->getBitWidth();
if (NeedEndOverlowRuntimeCheck)
?