public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Richard Biener <rguenth@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r13-2031] tree-optimization/106593 - fix ICE with backward threading
Date: Fri, 12 Aug 2022 11:37:46 +0000 (GMT)	[thread overview]
Message-ID: <20220812113746.E2B043858D28@sourceware.org> (raw)

https://gcc.gnu.org/g:4cc0d3ebaee4b54280ff0466d8e5b351a3b5bacc

commit r13-2031-g4cc0d3ebaee4b54280ff0466d8e5b351a3b5bacc
Author: Richard Biener <rguenther@suse.de>
Date:   Fri Aug 12 12:20:13 2022 +0200

    tree-optimization/106593 - fix ICE with backward threading
    
    With the last re-org I failed to make sure to not add SSA names
    nor supported by ranger into m_imports which then triggers an
    ICE in range_on_path_entry because range_of_expr returns false.
    
            PR tree-optimization/106593
            * tree-ssa-threadbackward.cc (back_threader::find_paths):
            If the imports from the conditional do not satisfy
            gimple_range_ssa_p don't try to thread anything.

Diff:
---
 gcc/tree-ssa-threadbackward.cc | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/gcc/tree-ssa-threadbackward.cc b/gcc/tree-ssa-threadbackward.cc
index 546a776bd91..b886027fccf 100644
--- a/gcc/tree-ssa-threadbackward.cc
+++ b/gcc/tree-ssa-threadbackward.cc
@@ -518,7 +518,11 @@ back_threader::find_paths (basic_block bb, tree name)
       bitmap_clear (m_imports);
       ssa_op_iter iter;
       FOR_EACH_SSA_TREE_OPERAND (name, stmt, iter, SSA_OP_USE)
-	bitmap_set_bit (m_imports, SSA_NAME_VERSION (name));
+	{
+	  if (!gimple_range_ssa_p (name))
+	    return;
+	  bitmap_set_bit (m_imports, SSA_NAME_VERSION (name));
+	}
 
       // Interesting is the set of imports we still not have see
       // the definition of.  So while imports only grow, the


                 reply	other threads:[~2022-08-12 11:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20220812113746.E2B043858D28@sourceware.org \
    --to=rguenth@gcc.gnu.org \
    --cc=gcc-cvs@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).