diff options
author | Richard Biener <rguenther@suse.de> | 2013-05-10 12:20:36 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2013-05-10 12:20:36 +0000 |
commit | 9ff09a22bf4323b92457f717b13fac6a85bf7745 (patch) | |
tree | 6d5a0374956e898ec63d7024bc819ef828c737b8 /gcc | |
parent | a5e0cd1d9bd6fbcff37a6545d8e60b36ff6ea7a7 (diff) | |
download | gcc-9ff09a22bf4323b92457f717b13fac6a85bf7745.zip gcc-9ff09a22bf4323b92457f717b13fac6a85bf7745.tar.gz gcc-9ff09a22bf4323b92457f717b13fac6a85bf7745.tar.bz2 |
re PR tree-optimization/57214 (ice: tree check: expected ssa_name, have integer_cst in coalesce_partitions, at tree-ssa-coalesce.c:1194)
2013-05-10 Richard Biener <rguenther@suse.de>
PR tree-optimization/57214
* tree-ssa-loop-ivcanon.c (propagate_constants_for_unrolling): Do
not propagate from SSA names that occur in abnormal PHI nodes.
From-SVN: r198773
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/pr57214.c | 25 | ||||
-rw-r--r-- | gcc/tree-ssa-loop-ivcanon.c | 3 |
4 files changed, 39 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bdc8bc5..8980e5e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2013-05-10 Richard Biener <rguenther@suse.de> + + PR tree-optimization/57214 + * tree-ssa-loop-ivcanon.c (propagate_constants_for_unrolling): Do + not propagate from SSA names that occur in abnormal PHI nodes. + 2013-05-10 Marc Glisse <marc.glisse@inria.fr> * stor-layout.c (element_precision): New function. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d8e1354..6ab94b2 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2013-05-10 Richard Biener <rguenther@suse.de> + + PR tree-optimization/57214 + * tree-ssa-loop-ivcanon.c (propagate_constants_for_unrolling): Do + not propagate from SSA names that occur in abnormal PHI nodes. + 2013-05-10 Marc Glisse <marc.glisse@inria.fr> * gcc.dg/vector-shift.c: New testcase. diff --git a/gcc/testsuite/gcc.dg/torture/pr57214.c b/gcc/testsuite/gcc.dg/torture/pr57214.c new file mode 100644 index 0000000..d51067d --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr57214.c @@ -0,0 +1,25 @@ +/* { dg-do compile } */ + +extern int baz (void); +extern int foo (void) __attribute__ ((returns_twice)); + +void +bar (_Bool b) +{ + int buf[1]; + while (1) + { + _Bool x = 1; + if (b) + baz (); + b = 1; + baz (); + x = 0; + int i; + while (buf[i] && i) + i++; + foo (); + if (!x) + b = 0; + } +} diff --git a/gcc/tree-ssa-loop-ivcanon.c b/gcc/tree-ssa-loop-ivcanon.c index c57e4f6..b5751cb 100644 --- a/gcc/tree-ssa-loop-ivcanon.c +++ b/gcc/tree-ssa-loop-ivcanon.c @@ -1085,8 +1085,9 @@ propagate_constants_for_unrolling (basic_block bb) tree lhs; if (is_gimple_assign (stmt) + && gimple_assign_rhs_code (stmt) == INTEGER_CST && (lhs = gimple_assign_lhs (stmt), TREE_CODE (lhs) == SSA_NAME) - && gimple_assign_rhs_code (stmt) == INTEGER_CST) + && !SSA_NAME_OCCURS_IN_ABNORMAL_PHI (lhs)) { propagate_into_all_uses (lhs, gimple_assign_rhs1 (stmt)); gsi_remove (&gsi, true); |