diff options
author | Richard Biener <rguenther@suse.de> | 2019-07-19 12:24:53 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2019-07-19 12:24:53 +0000 |
commit | a263e61a36e21451ff46318f0430e57aeaef6583 (patch) | |
tree | a2e2f5f5dbf4d6736df08ed62a23b1599c4cd13f /gcc/tree-ssa-phiopt.c | |
parent | c10abf530e52972ef708f6e72cf20dd920cd22a2 (diff) | |
download | gcc-a263e61a36e21451ff46318f0430e57aeaef6583.zip gcc-a263e61a36e21451ff46318f0430e57aeaef6583.tar.gz gcc-a263e61a36e21451ff46318f0430e57aeaef6583.tar.bz2 |
re PR tree-optimization/91200 (ICE on valid code at -O1: verify_ssa failed)
2019-07-19 Richard Biener <rguenther@suse.de>
PR tree-optimization/91200
* tree-ssa-phiopt.c (cond_store_replacement): Check we have
no PHI nodes in middle-bb.
* gcc.dg/torture/pr91200.c: New testcase.
From-SVN: r273602
Diffstat (limited to 'gcc/tree-ssa-phiopt.c')
-rw-r--r-- | gcc/tree-ssa-phiopt.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/tree-ssa-phiopt.c b/gcc/tree-ssa-phiopt.c index a514ed8..b64bde6 100644 --- a/gcc/tree-ssa-phiopt.c +++ b/gcc/tree-ssa-phiopt.c @@ -2216,6 +2216,11 @@ cond_store_replacement (basic_block middle_bb, basic_block join_bb, || gimple_has_volatile_ops (assign)) return false; + /* And no PHI nodes so all uses in the single stmt are also + available where we insert to. */ + if (!gimple_seq_empty_p (phi_nodes (middle_bb))) + return false; + locus = gimple_location (assign); lhs = gimple_assign_lhs (assign); rhs = gimple_assign_rhs1 (assign); |