diff options
author | Richard Biener <rguenther@suse.de> | 2019-10-24 11:23:54 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2019-10-24 11:23:54 +0000 |
commit | ee80f0c6ba50ebf0300fb0cfe1079a1321295749 (patch) | |
tree | 7ab67bddf3a4ed6d0a7d38548175fceca7b1a190 /gcc/tree-ssa-sccvn.c | |
parent | 3574e5df1f2a483b992b272ec57080472c24f0cb (diff) |
re PR tree-optimization/92203 (ICE in eliminate_stmt, at tree-ssa-sccvn.c:5492)
2019-10-24 Richard Biener <rguenther@suse.de>
PR tree-optimization/92203
* treee-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt):
Skip eliminating conversion stmts inserted by insertion.
* gcc.dg/torture/pr92203.c: New testcase.
From-SVN: r277374
Diffstat (limited to 'gcc/tree-ssa-sccvn.c')
-rw-r--r-- | gcc/tree-ssa-sccvn.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c index 57331ab44dc..3872168a4ed 100644 --- a/gcc/tree-ssa-sccvn.c +++ b/gcc/tree-ssa-sccvn.c @@ -5459,8 +5459,13 @@ eliminate_dom_walker::eliminate_stmt (basic_block b, gimple_stmt_iterator *gsi) /* If this is an assignment from our leader (which happens in the case the value-number is a constant) - then there is nothing to do. */ - if (gimple_assign_single_p (stmt) + then there is nothing to do. Likewise if we run into + inserted code that needed a conversion because of + our type-agnostic value-numbering of loads. */ + if ((gimple_assign_single_p (stmt) + || (is_gimple_assign (stmt) + && (CONVERT_EXPR_CODE_P (gimple_assign_rhs_code (stmt)) + || gimple_assign_rhs_code (stmt) == VIEW_CONVERT_EXPR))) && sprime == gimple_assign_rhs1 (stmt)) return; |