https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110131
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Andrew Pinski from comment #4) > So I have a VRP patch which gets us to: /* If the value range is defined by more than one pair, try to optimize to a singularity if either the first or last pair is a singleton. */ That is if we have: a range like: [0, 0][3, 32768][4294934529, +INF] and we the comparison like `_37 <= 2` Since 2 is a value between the first 2 pairs, we can just say this should be the same as `_37 == 0` because that is the only value that is valid here. The same idea happens for the last 2 pairs (and the last pair is a singleton). Also if we only 2 pairs prefer the one which is 0 (since 0 is always simplier).