From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2F0EC3858D33; Fri, 17 Nov 2023 23:04:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2F0EC3858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1700262258; bh=XV70Nx1c3pEgvuuYWfgwzpbxNIwFULrO92L5JOSrG/w=; h=From:To:Subject:Date:In-Reply-To:References:From; b=XuMBO3RSC9jP55gTRNn+60OKIESgded/2F+BoJYgiNHSrenJv5bjGkfor/rCytFlM 3ynMaAeCFqaLW5qHwxwXs1wHQR8BYP27hOl9ORhZVGruiBAHyn+YPL7wPUdn7msYaV tWBxf5tqUTE5G9unJU58rSOHcithbeaZOOSgmER8= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/112581] [14 Regression] wrong code at -O2 and -O3 on x86_64-linux-gnu (generated code hangs) since r14-4661 Date: Fri, 17 Nov 2023 23:04:17 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D112581 --- Comment #6 from Andrew Pinski --- forwprop3 does: ``` _12 =3D ~iftmp.7_30; h_40 =3D (unsigned int) _12; ... if (h_40 =3D=3D 4294967295) ``` into: ``` _75 =3D (unsigned int) iftmp.7_30; if (iftmp.7_30 =3D=3D 0) ``` Which as far as I can tell is correct. And then reassociate2 combines: ``` [local count: 57431765]: if (iftmp.7_30 =3D=3D 0) goto ; [97.17%] else goto ; [2.83%] [local count: 55807730]: if (i_27 !=3D 0) goto ; [100.00%] else goto ; [0.00%] ``` into: ``` [local count: 57431765]: _75 =3D iftmp.7_30 | i_27; _33 =3D _75 =3D=3D 0; if (_33 !=3D 0) goto ; [97.17%] else goto ; [2.83%] ``` or ``` if ((_30 =3D=3D 0) & (i_27 =3D=3D 0)) goto <17> else goto <19/20> ``` Which looks correct. I don't see anything going wrong with the patch itself ...=