From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 21BB8385B835; Tue, 24 Mar 2020 02:59:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 21BB8385B835 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1585018776; bh=E9ud1pFeYW7E3XUCLadasNlsVRDAZF7Firpr75WwrB4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=NcVBQVOykAhASncHFBKIzNc979gqe24nwn1tJq26SDHZ6029FL1ojqipafGiuZ6zB 0mIq1+dU/AXQ/UbavKg6Y5VG8FagVWooSoruoJvmMAfM06dAY+Aqatog8veceb0RkN Ck1xNK3gY8ZvsTVbA7qedRadDZUKKlu0XmQB3djA= From: "linkw at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/94043] [9/10 Regression] ICE in superloop_at_depth, at cfgloop.c:78 Date: Tue, 24 Mar 2020 02:59:35 +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: 10.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: linkw at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: linkw at gcc dot gnu.org X-Bugzilla-Target-Milestone: 9.4 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: Tue, 24 Mar 2020 02:59:36 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94043 --- Comment #10 from Kewen Lin --- (In reply to Richard Biener from comment #9) > OK, so it's indeed vectorizable_live_operation not paying attention to > loop-closed SSA form. >=20 > What it should do before building the lane extract is create a _new_ > loop-closed PHI node for the vectorized def (vec_lhs), and then > demote the loop-closed PHI node for the scalar def (lhs) which should > _always_ exist to a copy. So from >=20 >=20 > loop; >=20 > # lhs' =3D PHI >=20 >=20 > go to >=20 > loop; >=20 > # vec_lhs' =3D PHI > new_tree =3D BIT_FIELD_REF ; > lhs' =3D new_tree; >=20 > I think you can assert that the block of the loop-closed PHI > (single_exit()->dest) always has a single predecessor, otherwise > things will be more complicated. >=20 > Can you try rework the code in this way? If that's too much just tell > me and I'll take care of this. Thanks Richi, I'll give it a shot! I'd like to ensure my understanding: with the proposed fix, we ensure the single_exit()->dest should be the correct BB to be inserted, no chance like gimple_find_edge_insert_loc to get one new BB to be inserted, is it right?=