public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> 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: Thu, 02 Feb 2023 09:02:59 +0000 [thread overview] Message-ID: <bug-108601-4-NCEMDlkb7n@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-108601-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108601 --- Comment #15 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by hongtao Liu <liuhongt@gcc.gnu.org>: https://gcc.gnu.org/g:209f02b0a9e9adc0bf0247cb5eef04e0f175d64e commit r13-5644-g209f02b0a9e9adc0bf0247cb5eef04e0f175d64e Author: liuhongt <hongtao.liu@intel.com> Date: Wed Feb 1 13:30:12 2023 +0800 Don't peel nonlinear iv(mult or shift) for epilog when vf is not constant. Normally when vf is not constant, it will be prevented by vectorizable_nonlinear_inductions, but for this case, it failed going into if (STMT_VINFO_RELEVANT_P (stmt_info)) { need_to_vectorize = true; if (STMT_VINFO_DEF_TYPE (stmt_info) == vect_induction_def && ! PURE_SLP_STMT (stmt_info)) ok = vectorizable_induction (loop_vinfo, stmt_info, NULL, NULL, &cost_vec); 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_can_peel_nonlinear_iv_p 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 constant, the patch chooses the second incase there's other cases using vect_can_advance_ivs_p which calls vect_can_peel_nonlinear_iv_p. Also remove vect_peel_nonlinear_iv_p from vectorizable_nonlinear_inductions. gcc/ChangeLog: PR tree-optimization/108601 * tree-vectorizer.h (vect_can_peel_nonlinear_iv_p): Removed. * tree-vect-loop.cc (vectorizable_nonlinear_induction): Remove vect_can_peel_nonlinear_iv_p. (vect_can_peel_nonlinear_iv_p): Don't peel nonlinear iv(mult or shift) for epilog when vf is not constant and moved the defination to .. * tree-vect-loop-manip.cc (vect_can_peel_nonlinear_iv_p): .. Here. gcc/testsuite/ChangeLog: * gcc.target/aarch64/pr108601.c: New test.
next prev parent reply other threads:[~2023-02-02 9:03 UTC|newest] Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-01-30 15:43 [Bug tree-optimization/108601] New: [13 Regression] vector peeling ICEs with PGO + LTO + IPA inlining in gcc_r in SPEC2017 tnfchris at gcc dot gnu.org 2023-01-30 16:05 ` [Bug tree-optimization/108601] " pinskia at gcc dot gnu.org 2023-01-31 7:25 ` rguenth at gcc dot gnu.org 2023-01-31 7:29 ` rguenth at gcc dot gnu.org 2023-01-31 7:49 ` crazylht at gmail dot com 2023-01-31 8:28 ` crazylht at gmail dot com 2023-01-31 9:05 ` tnfchris at gcc dot gnu.org 2023-01-31 20:24 ` [Bug tree-optimization/108601] [13 Regression] vector peeling ICEs with VLA in gcc_r in SPEC2017 since g:c13223b790bbc5e4a3f5605e057eac59b61b2c85 tnfchris at gcc dot gnu.org 2023-01-31 21:08 ` tnfchris at gcc dot gnu.org 2023-02-01 5:32 ` crazylht at gmail dot com 2023-02-01 7:29 ` crazylht at gmail dot com 2023-02-01 7:32 ` rguenther at suse dot de 2023-02-01 7:46 ` crazylht at gmail dot com 2023-02-01 8:41 ` rguenth at gcc dot gnu.org 2023-02-01 9:07 ` crazylht at gmail dot com 2023-02-02 9:02 ` cvs-commit at gcc dot gnu.org [this message] 2023-02-03 8:05 ` rguenth at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-108601-4-NCEMDlkb7n@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).