From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C8CA43853817; Tue, 20 Jul 2021 06:50:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C8CA43853817 From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/67628] [tree-optimization] (a && b) && c shows better codegen than a && (b && c) Date: Tue, 20 Jul 2021 06:50:12 +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: 6.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement 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: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cf_reconfirmed_on bug_severity 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: Tue, 20 Jul 2021 06:50:12 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D67628 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed|2021-06-07 00:00:00 |2021-7-19 Severity|normal |enhancement --- Comment #7 from Andrew Pinski --- if (a_5(D) > b_6(D)) goto ; [50.00%] else goto ; [50.00%] [local count: 536870913]: _1 =3D b_6(D) <=3D c_7(D); _2 =3D c_7(D) > d_8(D); _3 =3D _1 & _2; _10 =3D (int) _3; [local count: 1073741824]: # iftmp.1_4 =3D PHI <_10(3), 0(2)> If what was in BB 3 was simplier, I have patches to implement that already. The last time I tried to disable the code in fold_truth_andor there was some testsuite fall out. I won't be able to get to trying to fix this until next year at the earliest I think.=