aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2022-08-12 12:20:13 +0200
committerRichard Biener <rguenther@suse.de>2022-08-12 13:37:31 +0200
commit4cc0d3ebaee4b54280ff0466d8e5b351a3b5bacc (patch)
treeed3b0555481fb1ebb69f36b7aaa7fab0d7851925 /gcc
parentf4ff20d464f90c85919ce2e7fa63e204dcda4e40 (diff)
downloadgcc-4cc0d3ebaee4b54280ff0466d8e5b351a3b5bacc.zip
gcc-4cc0d3ebaee4b54280ff0466d8e5b351a3b5bacc.tar.gz
gcc-4cc0d3ebaee4b54280ff0466d8e5b351a3b5bacc.tar.bz2
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.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/tree-ssa-threadbackward.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/tree-ssa-threadbackward.cc b/gcc/tree-ssa-threadbackward.cc
index 546a776..b886027 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