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/103489] [12 Regression] ICE with -O3 in operator[], at vec.h:889
Date: Tue, 30 Nov 2021 13:06:32 +0000	[thread overview]
Message-ID: <bug-103489-4-UmqRXKvsAQ@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-103489-4@http.gcc.gnu.org/bugzilla/>

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=101636

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
So we BB vectorize sth we should use bool patterns to fixup.  We get

t.c:8:1: note:   using normal nonmask vectors for a_I_lsm.24_70 = PHI
<_54(D)(2), _208(4)>
t.c:8:1: note:   using boolean precision 16 for _208 = _207 != 0;

but fail to add compensation on the PHI arg def because that's not supported
right now.  See also PR101636 for another bool pattern issue (but probably
unrelated).

So in this case the store is outside of a vectorized cycle (store motion is
applied) and thus defined by a loop closed PHI node.  check_bool_pattern
doesn't handle this and thus we get to see we have a normal nonmask vector
for the LC PHI:

t.c:8:1: note:   using normal nonmask vectors for a_I_lsm.24_20 = PHI
<a_I_lsm.24_70(5)>

but since we do not have patterns for PHIs the first nonmask use cannot
get compensation code.

The precision determining code in this case is broken since it does not handle
cycles properly, we first visit the loop PHI having an external def and not
yet visited backedge argument.

I'm going to produce a fix for the ICE and think about fixing bool pattern
detection for GCC 13.

  parent reply	other threads:[~2021-11-30 13:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-30  9:20 [Bug tree-optimization/103489] New: " vsevolod.livinskij at frtk dot ru
2021-11-30 12:24 ` [Bug tree-optimization/103489] [12 Regression] " rguenth at gcc dot gnu.org
2021-11-30 13:06 ` rguenth at gcc dot gnu.org [this message]
2021-11-30 13:12 ` [Bug tree-optimization/103489] [11/12 " rguenth at gcc dot gnu.org
2021-11-30 13:15 ` rguenth at gcc dot gnu.org
2021-11-30 14:01 ` cvs-commit at gcc dot gnu.org
2021-11-30 14:01 ` [Bug tree-optimization/103489] [11 " rguenth at gcc dot gnu.org
2021-11-30 14:13 ` [Bug tree-optimization/103489] [11 Regression] ICE with -O3 in operator[], at vec.h:889 since r12-5394-g0fc859f5efcb4624 marxin at gcc dot gnu.org
2021-11-30 14:23 ` rguenth at gcc dot gnu.org
2022-01-28 14:16 ` cvs-commit at gcc dot gnu.org
2022-01-28 14:16 ` 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-103489-4-UmqRXKvsAQ@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).