https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114551
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org --- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> --- It can be reproduced with -O2 -funswitch-loops -fsplit-loops. Loop splitting emits <bb 2> [local count: 14598063]: a.0_1 = a; _2 = a.0_1 + -1; a = _2; _24 = _2 <= 0; _10 = 2147483647 - _2; if (_10 <= 2) and the 2147483647 - _2 expression then overflows, so that's definitely wrong. This is built here: /* Build a condition that will skip the first loop when the guard condition won't ever be true (or false). */ gimple_seq stmts2; border = force_gimple_operand (border, &stmts2, true, NULL_TREE); if (stmts2) or rather in split_at_bb_p and put into '*border'