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/102152] [12 Regression] ICE: tree check: expected ssa_name, have integer_cst in cprop_operand, at tree-ssa-dom.c:1715
Date: Wed, 01 Sep 2021 23:15:48 +0000	[thread overview]
Message-ID: <bug-102152-4-vsXfdIM6JN@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-102152-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jeff Law <law@gcc.gnu.org>:

https://gcc.gnu.org/g:165446a1e81f5bb9597289e783af9ee67e1fe5ba

commit r12-3304-g165446a1e81f5bb9597289e783af9ee67e1fe5ba
Author: Jeff Law <jlaw@localhost.localdomain>
Date:   Wed Sep 1 19:13:58 2021 -0400

    Call reduce_vector_comparison_to_scalar_comparison earlier

    As noted in the PR, we can get an ICE after the introduction of code to
reduce a vector comparison to a scalar.  The problem is we left the operand
cache in an inconsistent state because we called the new function too late.  
This is trivially fixed by making the transformation before we call
update_stmt_if_modified.

    The irony here is the whole point of calling
reduce_vector_comparison_to_scalar_comparison when we did was to expose these
kinds of secondary opportunities.  In this particular case we collapsed the
test to a comparison of constants (thus no SSA operands).

    Anyway, this fixes the problem in the obvious way.  This may all end up
being moot if I can twiddle Richi's match.pd pattern to work.  It doesn't work
as-written due to a couple issues that I haven't worked totally through yet.

    Installed on the trunk after bootstrap & regression testing on x86 and
verifying it addresses the aarch64 issue.

    gcc/
            PR tree-optimization/102152
            * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Reduce a
vector
            comparison to a scalar comparison before calling
            update_stmt_if_modified.

    gcc/testsuite/
            PR tree-optimization/102152
            * gcc.dg/pr102152.c: New test

  parent reply	other threads:[~2021-09-01 23:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-01  4:18 [Bug tree-optimization/102152] New: " asolokha at gmx dot com
2021-09-01  4:30 ` [Bug tree-optimization/102152] " pinskia at gcc dot gnu.org
2021-09-01  4:35 ` pinskia at gcc dot gnu.org
2021-09-01 10:10 ` rguenth at gcc dot gnu.org
2021-09-01 20:31 ` law at gcc dot gnu.org
2021-09-01 23:15 ` cvs-commit at gcc dot gnu.org [this message]
2021-09-01 23:21 ` law at gcc dot gnu.org
2021-09-02 19:56 ` pinskia 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-102152-4-vsXfdIM6JN@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).