From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3520E38930DA; Tue, 6 Apr 2021 11:11:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3520E38930DA From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/99880] [10/11 Regression] ICE in maybe_set_vectorized_backedge_value, at tree-vect-loop.c:9161 since r10-3711-g69f8c1aef5cdcc54 Date: Tue, 06 Apr 2021 11:11:42 +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: 11.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: P2 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.3 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, 06 Apr 2021 11:11:42 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99880 --- Comment #3 from Richard Biener --- So we're having a PHI latch value vectorized because it's used by the outer loop (vect_used_in_outer_by_reduction), but the vect_nested_cycle def PHI in the inner loop isn't relevant since it's vect_unused_in_scope: [local count: 11811160]: # g_36 =3D PHI # c_lsm.16_20 =3D PHI <_12(11), c_lsm.16_29(15)> # ivtmp_18 =3D PHI g_21 =3D g_36 + 5; vect_cst__28 =3D { 0, 0, 0, 0 }; [local count: 118111600]: # h_14 =3D PHI <10(5), h_24(12)> # c_lsm.16_22 =3D PHI # ivtmp_30 =3D PHI <10(5), ivtmp_31(12)> h_24 =3D h_14 + -1; _7 =3D d.6_6 <=3D c_lsm.16_22; _8 =3D (int) _7; vect__10.19_33 =3D vect_cst__28; _10 =3D 0; ivtmp_31 =3D ivtmp_30 - 1; if (ivtmp_31 !=3D 0) goto ; [90.00%] else goto ; [10.00%] [local count: 106300440]: goto ; [100.00%] [local count: 11811160]: # _27 =3D PHI <_10(6)> _12 =3D _27 - e.10_11; it's the c_lsm.16_22 PHI and the _10 backedge def (note how we failed to constant propagate the 10 ...). The fix is simple and hopefully it doesn't break other stuff.=