https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96146
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aldyh at gcc dot gnu.org --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- i_1 = ASSERT_EXPR <i_7, i_7 != POLY_INT_CST [2, 2]>; Intersecting int [-INF, 1] EQUIVALENCES: { i_7 } (1 elements) so somehow we derive from i_7 != POLY_INT_CST [2, 2] that i_7 must be [-INF, 1] - that looks wrong? This goes via extract_range_for_var_from_comparison_expr and likely compare_values goes off in if (limit_vr && limit_vr->kind () == VR_RANGE && compare_values (limit_vr->min (), limit_vr->max ()) == 0) { min = limit_vr->min (); max = limit_vr->max (); } where min/max are then POLY_INT_CST [2, 2] and the anti-range we build from that is canonicalized in odd ways. I think VRP all over the place assumes integer typed constants are INTEGER_CSTs so maybe sth else is off with POLY_INT_CSTs ... CCing VRP people.