From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 12CCD3858280; Mon, 11 Jul 2022 09:47:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 12CCD3858280 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/106246] [13 Regression] powerpc-darwin9 bootstrap fails after r13-1575-gcf3a120084e946 ICE vect_transform_loops, at tree-vectorizer.cc:1032 Date: Mon, 11 Jul 2022 09:47:24 +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: 13.0 X-Bugzilla-Keywords: build, ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth 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: 13.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: Mon, 11 Jul 2022 09:47:25 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106246 --- Comment #7 from Richard Biener --- OK, indeed this is caused by my most recent change. The following should f= ix this, I'm going to test this on x86_64-linux (no convenient ppc testing mac= hine available for me right now) diff --git a/gcc/tree-vect-data-refs.cc b/gcc/tree-vect-data-refs.cc index 53e52cb58cb..609cacc4971 100644 --- a/gcc/tree-vect-data-refs.cc +++ b/gcc/tree-vect-data-refs.cc @@ -5777,14 +5777,14 @@ vect_setup_realignment (vec_info *vinfo, stmt_vec_i= nfo stmt_info, if (at_loop) *at_loop =3D loop_for_initial_load; + tree vuse =3D NULL_TREE; if (loop_for_initial_load) - pe =3D loop_preheader_edge (loop_for_initial_load); - - tree vuse; - gphi *vphi =3D get_virtual_phi (loop_for_initial_load->header); - if (vphi) - vuse =3D PHI_ARG_DEF_FROM_EDGE (vphi, pe); - else + { + pe =3D loop_preheader_edge (loop_for_initial_load); + if (gphi *vphi =3D get_virtual_phi (loop_for_initial_load->header)) + vuse =3D PHI_ARG_DEF_FROM_EDGE (vphi, pe); + } + if (!vuse) vuse =3D gimple_vuse (gsi_stmt (*gsi)); /* 3. For the case of the optimized realignment, create the first vector=