From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 70AAD385C017; Tue, 24 Mar 2020 06:44:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 70AAD385C017 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1585032270; bh=ztOOqJdewuw7dtDWgIUYT5SAvaG9UsiZsavVauIBE3U=; h=From:To:Subject:Date:In-Reply-To:References:From; b=VZTfv+RpUZ06CyJN7HvKy1KZ1MJnL4dD5UeiFCu/Mbc0CuzASQqIMe0AN5DwOn6Oj FDLTZaVT8cvrIZpUHE3a/6qPBoCpK2lzQhhgv8rez3Tn3IQf3vflF21gZ/b5v05dFk g6VcvLAF2rpQ6id1I3IbHyiHlmlniXrT/Qaq0b0o= From: "rguenther at suse dot de" 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 06:44:30 +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: rguenther at suse dot de 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 06:44:30 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94043 --- Comment #11 from rguenther at suse dot de --- On March 24, 2020 3:59:35 AM GMT+01:00, "linkw at gcc dot gnu.org" wrote: >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? Yes.=