From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 82537384F021; Tue, 6 Jul 2021 08:01:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 82537384F021 From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/42117] VRP should do if-conversion Date: Tue, 06 Jul 2021 08:01:22 +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: 4.5.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: blocked bug_status assigned_to 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, 06 Jul 2021 08:01:22 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D42117 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|42195 | Status|ASSIGNED |NEW Assignee|pinskia at gcc dot gnu.org |unassigned at gcc d= ot gnu.org --- Comment #3 from Andrew Pinski --- I am not going to fix this. But right now we get: _8 =3D x_5(D) | y_6(D); _4 =3D (unsigned int) _8; if (_4 <=3D 1) goto ; [57.43%] else goto ; [42.57%] [local count: 616649929]: if (x_5(D) !=3D 0) goto ; [50.00%] else goto ; [50.00%] [local count: 126413234]: _9 =3D y_6(D) !=3D 0; _1 =3D (int) _9; [local count: 1073741824]: # _3 =3D PHI Part of the problem is realizing y_6 is [0,1] range when looking at _9/_1. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D42195 [Bug 42195] missed xnor optimization.=