public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "amacleod at redhat dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/106063] [13 Regression] ICE: in gimple_expand_vec_cond_expr, at gimple-isel.cc:281 with -O2 -fno-tree-forwprop --param=evrp-mode=legacy-first
Date: Thu, 23 Jun 2022 14:22:13 +0000	[thread overview]
Message-ID: <bug-106063-4-ZcCRRSSNr3@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-106063-4@http.gcc.gnu.org/bugzilla/>

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

Andrew Macleod <amacleod at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |amacleod at redhat dot com

--- Comment #1 from Andrew Macleod <amacleod at redhat dot com> ---
That option enables legacy EVRP, and will be going away soon.  however, looking
at the IL, the difference out of EVRP is that legacy doesnt touch the code. The
IL is:

  vector(1) __int128 _1;
  vector(1) <signed-boolean:128> _2;
  V _4;

  <bb 2> :
  _1 = v_3(D) & { 15 };
  _2 = v_3(D) == _1;
  _4 = VEC_COND_EXPR <_2, { -1 }, { 0 }>;
  return _4;


Ranger ends up triggering a simplification :

Folding statement: _2 = v_3(D) == _1;
gimple_simplified to _6 = v_3(D) & { -16 };
_2 = _6 == { 0 };
Folded into: _2 = _6 == { 0 };

producing:

    _1 = v_3(D) & { 15 };
    _6 = v_3(D) & { -16 };
    _2 = _6 == { 0 };
    _4 = VEC_COND_EXPR <_2, { -1 }, { 0 }>;
    return _4;

Which ends up not causing the ICE seen in this PR.

However, if we completely disable EVRP, we also get the trap.

   -O2 -fno-tree-forwprop --disable-tree-evrp

So it would seem the problem probably lies with vector expansion?

  reply	other threads:[~2022-06-23 14:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-23  6:46 [Bug tree-optimization/106063] New: " zsojka at seznam dot cz
2022-06-23 14:22 ` amacleod at redhat dot com [this message]
2022-06-24 10:29 ` [Bug tree-optimization/106063] " rguenth at gcc dot gnu.org
2022-06-24 10:29 ` [Bug tree-optimization/106063] [12/13 " rguenth at gcc dot gnu.org
2022-06-24 11:33 ` tnfchris at gcc dot gnu.org
2022-06-26 22:10 ` tnfchris at gcc dot gnu.org
2022-07-08  7:31 ` cvs-commit at gcc dot gnu.org
2022-07-10  8:41 ` [Bug tree-optimization/106063] [12 " cvs-commit at gcc dot gnu.org
2022-07-27  9:24 ` cvs-commit at gcc dot gnu.org
2022-07-27  9:24 ` cvs-commit at gcc dot gnu.org
2022-07-27  9:25 ` 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-106063-4-ZcCRRSSNr3@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).