aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2010-05-06 09:04:00 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2010-05-06 09:04:00 +0000
commite3bdfed62abe1c163b93162e53a377b21b5658dc (patch)
tree06f32bf636037d2caf5f7c51678ee35c661cafa5 /gcc/testsuite
parenta81b065a47a134e66937060f7ae14f1ae939b7b5 (diff)
downloadgcc-e3bdfed62abe1c163b93162e53a377b21b5658dc.zip
gcc-e3bdfed62abe1c163b93162e53a377b21b5658dc.tar.gz
gcc-e3bdfed62abe1c163b93162e53a377b21b5658dc.tar.bz2
re PR tree-optimization/43934 (LIM should handle PHI nodes)
2010-05-06 Richard Guenther <rguenther@suse.de> PR tree-optimization/43934 * tree-ssa-loop-im.c (movement_possibility): Handle PHI nodes. (stmt_cost): Likewise. (extract_true_false_args_from_phi): New helper. (determine_max_movement): For PHI nodes verify we can hoist them and compute their cost. (determine_invariantness_stmt): Handle PHI nodes. (move_computations_stmt): Likewise. Hoist PHI nodes in if-converted form using COND_EXPRs. (move_computations): Return TODO_cleanup_cfg if we hoisted PHI nodes. (tree_ssa_lim): Likewise. * tree-flow.h (tree_ssa_lim): Adjust prototype. * tree-ssa-loop.c (tree_ssa_loop_im): Return todo. * gcc.dg/tree-ssa/ssa-lim-9.c: New testcase. From-SVN: r159099
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog15
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-9.c20
2 files changed, 35 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 36eea3d..2eebcf3 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,18 @@
+2010-05-06 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/43934
+ * gcc.dg/tree-ssa/ssa-lim-9.c: New testcase.
+
+2010-05-06 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/43987
+ * gcc.c-torture/execute/pr43987.c: New testcase.
+ * gcc.dg/torture/pta-escape-1.c: Adjust.
+ * gcc.dg/tree-ssa/pta-escape-1.c: Likewise.
+ * gcc.dg/tree-ssa/pta-escape-2.c: Likewise.
+ * gcc.dg/tree-ssa/pta-escape-3.c: Likewise.
+ * gcc.dg/ipa/ipa-pta-11.c: Likewise.
+
2010-04-22 Jakub Jelinek <jakub@redhat.com>
Dodji Seketeli <dodji@redhat.com>
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-9.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-9.c
new file mode 100644
index 0000000..c5a6765
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-9.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fdump-tree-lim1-details" } */
+
+void bar (int);
+void foo (int n, int m)
+{
+ unsigned i;
+ for (i = 0; i < n; ++i)
+ {
+ int x;
+ if (m < 0)
+ x = 1+n;
+ else
+ x = m-n;
+ bar (x);
+ }
+}
+
+/* { dg-final { scan-tree-dump-times "Moving PHI node" 1 "lim1" } } */
+/* { dg-final { cleanup-tree-dump "lim1" } } */