From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7C45A3982406; Tue, 20 Jul 2021 02:52:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7C45A3982406 From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/64700] Sink common code through PHI Date: Tue, 20 Jul 2021 02:52: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: 5.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: pinskia at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status assigned_to cc 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 02:52:16 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D64700 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |pinskia at gcc dot = gnu.org CC| |pinskia at gcc dot gnu.org Severity|normal |enhancement --- Comment #4 from Andrew Pinski --- [local count: 958878293]: if (dir_lsm.26_39 =3D=3D 1) goto ; [34.00%] else goto ; [66.00%] [local count: 326018623]: _11 =3D arr1.6_10 + _5; _12 =3D *_11; goto ; [100.00%] [local count: 632859670]: _14 =3D arr2.9_13 + _5; _15 =3D *_14; [local count: 958878293]: # cstore_45 =3D PHI <_12(8), _15(9)> PHI-OPT improvements that I am working on might be able to handle this case too. MEM_EXPR is a little harder than the normal expression as you need to check= the access type for aliasing reasons. Note PHI-OPT does handle the casting case already (but it is not listed her= e).=