https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92131
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> --- The reason the intersection gives [-INF, -8] is that compare_values ( -7, e.7_8 + 9223372036854775806 ) returns -1 rather than -2. And that is because it thinks exactly 9223372036854775806 is added to e.7_8, at which point it would be even for e.7_8 equal to LONG_MIN -2 and for any larger value larger. Though, when we created that e.7_8 + 9223372036854775806, we didn't mean that, we meant that the maximum value it can have is e.7_8 + 9223372036854775806 if e.7_8 is negative or 1, if it is > 1, the maximum value is LONG_MAX, i.e. we meant MIN (9223372036854775807, (__int128_t) e.7_8 + 9223372036854775806). So, I'm afraid we need to define exactly what we mean by symbolic + constant first and depending on that tweak compare_values, or intersect_ranges, or extract_range_from_plus_minus_expr.