From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B441E393FC3E; Mon, 23 Mar 2020 13:21:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B441E393FC3E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1584969708; bh=nqa/p0fGKKT9gDhIY8/YhpkZvjCDTs1a81+6MKZgFe8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=SnT+qVL1KPdDiaFJI8lmCDWbs9nRQVaQeWdN4iqagPEzQtmoTTYMu9/oZWgEXvta2 hl/pBPGjdVuTLYprqiyV7xpVnpxjEHzrwGRHTth3wVosO+dILOJXjCFP2cCOo34AY7 T77hd/UlB8C2C6zRRXDasuK2V+QxeM5iF9rXBHf0= From: "rguenth 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: Mon, 23 Mar 2020 13:21:48 +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: rguenth 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: Mon, 23 Mar 2020 13:21:48 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94043 --- Comment #9 from Richard Biener --- OK, so it's indeed vectorizable_live_operation not paying attention to loop-closed SSA form. 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 loop; # lhs' =3D PHI go to loop; # vec_lhs' =3D PHI new_tree =3D BIT_FIELD_REF ; lhs' =3D new_tree; 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. Can you try rework the code in this way? If that's too much just tell me and I'll take care of this.=