aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-phiopt.c
diff options
context:
space:
mode:
authorMarc Glisse <marc.glisse@inria.fr>2014-06-04 20:38:18 +0200
committerMarc Glisse <glisse@gcc.gnu.org>2014-06-04 18:38:18 +0000
commitca73a1f7f901bc6111ff13ca8b8d29027e72e7fa (patch)
tree0ffb82173ded686a7b23063eb940ee2fc979b1c0 /gcc/tree-ssa-phiopt.c
parentffb1f5ef12ce9d9994e850d87cbe4116a69d8d90 (diff)
downloadgcc-ca73a1f7f901bc6111ff13ca8b8d29027e72e7fa.zip
gcc-ca73a1f7f901bc6111ff13ca8b8d29027e72e7fa.tar.gz
gcc-ca73a1f7f901bc6111ff13ca8b8d29027e72e7fa.tar.bz2
re PR tree-optimization/61385 (ICE on valid code at -O2 and -O3 on x86_64-linux-gnu)
2014-06-04 Marc Glisse <marc.glisse@inria.fr> PR tree-optimization/61385 gcc/ * tree-ssa-phiopt.c (value_replacement): Punt if there are PHI nodes. gcc/testsuite/ * gcc.dg/tree-ssa/pr61385.c: New file. From-SVN: r211245
Diffstat (limited to 'gcc/tree-ssa-phiopt.c')
-rw-r--r--gcc/tree-ssa-phiopt.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/tree-ssa-phiopt.c b/gcc/tree-ssa-phiopt.c
index e3b6f1d..95844f4 100644
--- a/gcc/tree-ssa-phiopt.c
+++ b/gcc/tree-ssa-phiopt.c
@@ -849,6 +849,10 @@ value_replacement (basic_block cond_bb, basic_block middle_bb,
&& !POINTER_TYPE_P (TREE_TYPE (arg0))))
return 0;
+ /* Punt if there are (degenerate) PHIs in middle_bb, there should not be. */
+ if (!gimple_seq_empty_p (phi_nodes (middle_bb)))
+ return 0;
+
/* Only transform if it removes the condition. */
if (!single_non_singleton_phi_for_edges (phi_nodes (gimple_bb (phi)), e0, e1))
return 0;