From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C501E3858D35; Thu, 16 Dec 2021 17:17:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C501E3858D35 From: "aldyh at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/103690] [12 Regression] ICE: in build2, at tree.c:4985 with -g -O2 -fno-tree-dce -fno-tree-dse -fno-tree-fre --param=max-jump-thread-duplication-stmts=94 since r12-2591-g2e96b5f14e402569 Date: Thu, 16 Dec 2021 17:17:16 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: aldyh at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Dec 2021 17:17:16 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103690 --- Comment #5 from Aldy Hernandez --- (In reply to Andrew Pinski from comment #2) > (gdb) p debug_gimple_stmt(stmt) > _67 =3D _14 + _66; >=20 >=20 > Before pre had: > intD.9 * __trans_tmp_1D.2946; > .... > # RANGE [1, 9223372036854775807] NONZERO 9223372036854775804 > _66 =3D (long unsigned intD.16) _17; > # PT =3D nonlocal escaped > # ALIGN =3D 4, MISALIGN =3D 0 > _67 =3D __trans_tmp_1_14 + _66; >=20 > But after: > # RANGE [1, 9223372036854775807] NONZERO 9223372036854775804 > _66 =3D (long unsigned intD.16) _17; > # PT =3D nonlocal escaped > # ALIGN =3D 4, MISALIGN =3D 0 > _67 =3D _14 + _66; >=20 > We already removed the definition of _14 too: > Removing dead stmt __trans_tmp_1_14 =3D _24 + 4; >=20 > So it is the order of the removal which is causing issues. Why is PRE removing the DEF of _14 when there are still uses? [local count: 69834]: __count.1_62 =3D (long unsigned int) _11; __builtin_memmove (_14, _9, __count.1_62); _66 =3D (long unsigned int) _17; _67 =3D _14 + _66; ...=