As a part 2 to my previous patch, this updates the logic for the decreasing safety checks in a similar manner:
- CanBeMax is replaced by CannotBeMaxInLoop which queries isLoopEntryGuardedByCond on the maximum value.
- SumCanReachMin is replaced by isSafeDecreasingBound which includes some logic from parseLoopStructure and, again, has been updated to use isLoopEntryGuardedByCond on the given bounds.
BTW, this (and same for min) look general enough to be moved to Scalar Evolution analysis. Please consider making this in future, maybe someone else will need them. For now, I'm OK with what we have here.