From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A00233858C2C; Wed, 22 Dec 2021 23:57:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A00233858C2C From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/103808] [12 Regression] '-fcompare-debug' failure (length) w/ -O2 -ftrapv Date: Wed, 22 Dec 2021 23:57:29 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: ice-on-valid-code, needs-bisection, wrong-debug X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia 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: Wed, 22 Dec 2021 23:57:29 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103808 --- Comment #3 from Andrew Pinski --- I think this is a latent bug exposed by my match.pd patch (r12-5392). In GCC 11.2.0 we had: y_18 =3D iftmp.0_10 > a_14 ? 2 : 0; While on the trunk we have: y_18 =3D prephitmp_29 * 2; But doing this: void foo (__int128 x, int y) { for (;;) { __int128 a, b; x |=3D !!y; a =3D x + 1; b =3D y ? ++y : ++x; y =3D a < b; asm("":"+r"(y)); if (x >> 2) y *=3D 2; if (y =3D=3D b) __builtin_unreachable (); } } Which causes the IR to be the same out of 11 and 12, does not produce compa= re debug in 11 but does in 12.=