From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3C7AA3858CDA; Wed, 1 Feb 2023 07:32:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3C7AA3858CDA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675236766; bh=iFGgQUU2Yx1FD5aECexjCN66ajRCyzh3uicKWn3Jb2E=; h=From:To:Subject:Date:In-Reply-To:References:From; b=q+TieZOaqeHz/xNpVMdSWv+5jZ43t2RC/X6qVPRpUrLJYS19H9RGkVKD0ECOI17+4 HxausdoT8BvsthQBCzwH/4pH1zHFjgsNVCYR6jSddK1c9dsf2xfwPMiJUepyj1yvRc vAoh2juKBHakviDWHPFBGCJ9Npu5z5vRtVvaUIsU= From: "rguenther at suse dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/108601] [13 Regression] vector peeling ICEs with VLA in gcc_r in SPEC2017 since g:c13223b790bbc5e4a3f5605e057eac59b61b2c85 Date: Wed, 01 Feb 2023 07:32:46 +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: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenther at suse dot de X-Bugzilla-Status: UNCONFIRMED 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D108601 --- Comment #11 from rguenther at suse dot de --- On Wed, 1 Feb 2023, crazylht at gmail dot com wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D108601 >=20 > --- Comment #10 from Hongtao.liu --- > (In reply to Hongtao.liu from comment #9) > > > ---- > > >=20 > > > decode_options() { > > > int flag =3D 1; > > > for (; flag <=3D 1 << 21; flag <<=3D 1) > > > ; > > > } >=20 > Normally when vf is not constant, it will be prevented by > vectorizable_nonlinear_inductions, but for this case, it failed going > into >=20 > if (STMT_VINFO_RELEVANT_P (stmt_info)) > { > need_to_vectorize =3D true; > if (STMT_VINFO_DEF_TYPE (stmt_info) =3D=3D vect_induction_def > && ! PURE_SLP_STMT (stmt_info)) > ok =3D vectorizable_induction (loop_vinfo, > stmt_info, NULL, NULL, > &cost_vec); >=20 > since the iv is never used outside of the loop, and will be dce later, so > vectorizer doesn't bother checking if it's vectorizable. It's > true but hit gcc_assert in vect_peel_nonlinear_iv_init when vf is not > constant. One solution is ignoring the nonlinear iv peeling if it's > !STMT_VINFO_RELEVANT_P (stmt_info) just like the upper code, the other > solution is returning false earlier in the > vect_can_peel_nonlinear_iv_p when vf is not known. When the VF is not known we usually do not require an epilogue? If we don't require one we should avoid creating one.=