public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/101861] [12 Regression] ICE (segfault) via tree-vect-stmts.c:9495's vectorizable_load Date: Wed, 11 Aug 2021 08:40:13 +0000 [thread overview] Message-ID: <bug-101861-4-dLlCiqKLI8@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-101861-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101861 --- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> --- OK, so we're having memory_access_type == VMAT_GATHER_SCATTER, gs_info.ifn != IFN_LAST but STMT_VINFO_GATHER_SCATTER_P is false. It looks like vec_offset is set elsewhere in that case. Likely here: else if (memory_access_type == VMAT_GATHER_SCATTER) { aggr_type = elem_type; vect_get_strided_load_store_ops (stmt_info, loop_vinfo, &gs_info, &bump, &vec_offset); } so the fix is to re-instante the guard, doing diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c index ab402b57fb4..cc6c091e41e 100644 --- a/gcc/tree-vect-stmts.c +++ b/gcc/tree-vect-stmts.c @@ -9492,7 +9492,8 @@ vectorizable_load (vec_info *vinfo, if (memory_access_type == VMAT_GATHER_SCATTER && gs_info.ifn != IFN_LAST) { - vec_offset = vec_offsets[j]; + if (STMT_VINFO_GATHER_SCATTER_P (stmt_info)) + vec_offset = vec_offsets[j]; tree zero = build_zero_cst (vectype); tree scale = size_int (gs_info.scale); gcall *call; will push this as obvious.
next prev parent reply other threads:[~2021-08-11 8:40 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-08-11 8:24 [Bug middle-end/101861] New: " burnus at gcc dot gnu.org 2021-08-11 8:30 ` [Bug middle-end/101861] " rguenth at gcc dot gnu.org 2021-08-11 8:40 ` rguenth at gcc dot gnu.org [this message] 2021-08-11 10:55 ` cvs-commit at gcc dot gnu.org 2021-08-11 10:55 ` rguenth at gcc dot gnu.org 2021-08-16 7:56 ` 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-101861-4-dLlCiqKLI8@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).