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 tree-optimization/107451] [11/12/13 Regression] Segmentation fault with vectorized code since r11-6434
Date: Thu, 17 Nov 2022 09:06:13 +0000	[thread overview]
Message-ID: <bug-107451-4-0tY0J26mtm@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-107451-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107451

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
Apart from the permute issue that's maybe there the issue of the segfault is
failure to code generate the loads correctly to match the SLP analysis.  We
generate loads as if we'd use a VF of 2 but use only the lower part but DCE /
simplification doesn't simplify

  _64 = MEM <vector(2) double> [(const double *)ivtmp_66];
  ivtmp_63 = ivtmp_66 + _75;
  _62 = MEM <vector(2) double> [(const double *)ivtmp_63];
  vect_cst__60 = {_64, _62};
  vect__4.12_59 = VEC_PERM_EXPR <vect_cst__60, vect_cst__60, { 1, 0, 1, 0 }>;

to, for example

  _64 = MEM <vector(2) double> [(const double *)ivtmp_66];
  ivtmp_63 = ivtmp_66 + _75;
  vect_cst__60 = {_64, _64};
  vect__4.12_59 = VEC_PERM_EXPR <vect_cst__60, vect_cst__60, { 1, 0, 1, 0 }>;

(we now also allow VEC_PERM of _64, _64 directly with GCC 13, but the targets
need to be ready for this)

That's probably a latent issue in other cases as well.  We'd either need to
disallow these kind of load permutations or make sure we only reference
the actually loaded DR group when filling the input vectors.

  parent reply	other threads:[~2022-11-17  9:06 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-28 19:07 [Bug tree-optimization/107451] New: Segmentation fault with vectorized code bartoldeman at users dot sourceforge.net
2022-10-28 19:19 ` [Bug tree-optimization/107451] " jakub at gcc dot gnu.org
2022-10-28 19:19 ` [Bug tree-optimization/107451] [11/12/13 Regression] " pinskia at gcc dot gnu.org
2022-10-29  0:12 ` bartoldeman at users dot sourceforge.net
2022-10-31  3:29 ` crazylht at gmail dot com
2022-11-05 10:21 ` rguenth at gcc dot gnu.org
2022-11-05 10:29 ` [Bug tree-optimization/107451] [11/12/13 Regression] Segmentation fault with vectorized code since r11-6434 jakub at gcc dot gnu.org
2022-11-17  9:06 ` rguenth at gcc dot gnu.org [this message]
2022-11-17 14:48 ` rguenth at gcc dot gnu.org
2022-11-17 14:57 ` bartoldeman at users dot sourceforge.net
2022-11-17 14:58 ` rguenth at gcc dot gnu.org
2022-12-22 11:21 ` cvs-commit at gcc dot gnu.org
2022-12-22 11:21 ` [Bug tree-optimization/107451] [11/12 " rguenth at gcc dot gnu.org
2023-03-15  9:47 ` cvs-commit at gcc dot gnu.org
2023-05-02 12:03 ` [Bug tree-optimization/107451] [11 " cvs-commit at gcc dot gnu.org
2023-05-02 12: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-107451-4-0tY0J26mtm@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: link
Be 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).