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/113201] [14 Regression] internal compiler error: tree check: expected ssa_name, have integer_cst in replace_uses_by, at tree-cfg.cc:2058
Date: Fri, 05 Jan 2024 10:18:55 +0000	[thread overview]
Message-ID: <bug-113201-4-oIMwiaLEZu@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-113201-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:b8faf1fca42a9b987fec0992ca5d63995b2640b3

commit r14-6941-gb8faf1fca42a9b987fec0992ca5d63995b2640b3
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Fri Jan 5 11:18:17 2024 +0100

    scev: Avoid ICE on results used in abnormal PHI args [PR113201]

    The following testcase ICEs when rslt is SSA_NAME_OCCURS_IN_ABNORMAL_PHI
    and we call replace_uses_by with a INTEGER_CST def, where it ICEs on:
                  if (e->flags & EDGE_ABNORMAL
                      && !SSA_NAME_OCCURS_IN_ABNORMAL_PHI (val))
    because val is not an SSA_NAME.  One way would be to add
                      && TREE_CODE (val) == SSA_NAME
    check in between the above 2 lines in replace_uses_by.

    And/or the following patch just punts propagating constants to
    SSA_NAME_OCCURS_IN_ABNORMAL_PHI rslt uses.

    Or we could punt somewhere earlier in final value replacement (but dunno
    where).

    2024-01-05  Jakub Jelinek  <jakub@redhat.com>

            PR tree-optimization/113201
            * tree-scalar-evolution.cc (final_value_replacement_loop): Don't
call
            replace_uses_by on SSA_NAME_OCCURS_IN_ABNORMAL_PHI rslt.

            * gcc.c-torture/compile/pr113201.c: New test.

  parent reply	other threads:[~2024-01-05 10:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-02 15:48 [Bug middle-end/113201] New: " doko at gcc dot gnu.org
2024-01-02 21:39 ` [Bug tree-optimization/113201] " pinskia at gcc dot gnu.org
2024-01-02 21:43 ` pinskia at gcc dot gnu.org
2024-01-03 17:47 ` jakub at gcc dot gnu.org
2024-01-05 10:18 ` cvs-commit at gcc dot gnu.org [this message]
2024-01-05 10:19 ` jakub at gcc dot gnu.org
2024-01-05 14:20 ` jakub 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-113201-4-oIMwiaLEZu@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).