In PR42108 a division is found to be non-trapping by VRP but neither PRE nor LIM can make use of that information (well, because VRP doesn't mark the divisions in any meaningful way).
I'll take care of this during 4.6 development.
Andrew is now maintaing VRP.
What needs to be done here? anything? Looking at VRP1, there is only a single divide left at that point: countm1.6_54 = _12 / _13; and VRP1 is setting the global range of _13 to: _13: unsigned int [2, 2147483647] So at least from that point on, it is trivial to determine the divide is non-trapping even using the global ranges.
I think this was trying to cover things like if (d != 0) tem = a / d; where the non-zero range of d on the division cannot be put in global ranges for its SSA name since that would be incorrect for uses not guarded by the condition. So it would ask for a new flag on GIMPLE statements to mark the division not trapping (like we have TREE_THIS_NOTRAP). Transforms like PRE or LIM that do code motion of course have to be careful to not move the stmt outside of the condition that made it not trapping - something which would be as hard to guarantee as computing the non-trappingness in the first place. So yes, the case that made me file this bug is fixed with global ranges. Let's close this bug since it's quite unspecific.