aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/pr21829.c
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>2006-03-20 22:07:37 -0700
committerJeff Law <law@gcc.gnu.org>2006-03-20 22:07:37 -0700
commite67c25c7381536222d154228d16467320ea1fcf8 (patch)
tree199bbfcaab0678283b684b3453409019e876c0b4 /gcc/testsuite/gcc.dg/tree-ssa/pr21829.c
parent4a282de4b36221c7168bf10ad0dc8836b374cfb8 (diff)
downloadgcc-e67c25c7381536222d154228d16467320ea1fcf8.zip
gcc-e67c25c7381536222d154228d16467320ea1fcf8.tar.gz
gcc-e67c25c7381536222d154228d16467320ea1fcf8.tar.bz2
tree-pass.h (pass_phi_only_copy_prop): Delete.
* tree-pass.h (pass_phi_only_copy_prop): Delete. (pass_phi_only_cprop): Declare. * passes.c (init_optimization_passes): Replace pass_phi_only_copy_prop with phi_only_cprop * tree-ssa-dom.c (degenerate_phi_result): New function. (remove_stmt_or_phi, get_lhs_or_phi_result): Likewise. (get_rhs_or_phi_arg, propagate_rhs_into_lhs): Likewise. (eliminate_const_or_copy, eliminate_degenerate_phis_1): Likewise. (eliminate_degenerate_phis): Likewise. (pass_phi_only_cprop): New pass descriptor. * tree-ssa-copy.c (init_copy_prop): Lose PHIS_ONLY argument and support code. Callers updated. (execute_copy_prop, do_copy_prop): Likewise and corresponding changes. (store_copy_prop): Likewise. (do_phi_only_copy_prop, pass_phi_only_copy_prop): Remove. * gcc.dg/tree-ssa/pr21829.c: New test. From-SVN: r112242
Diffstat (limited to 'gcc/testsuite/gcc.dg/tree-ssa/pr21829.c')
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr21829.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr21829.c b/gcc/testsuite/gcc.dg/tree-ssa/pr21829.c
new file mode 100644
index 0000000..4c723f3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr21829.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-phicprop-details" } */
+
+int test(int v)
+{
+ int x = 0;
+ int u;
+ for (u=0;u<2;u++)
+ {
+ if (u>v)
+ {
+ if (u%2==1)
+ x++;
+ }
+ }
+ return x;
+}
+
+/* { dg-final { scan-tree-dump-times "Original statement:.*% 2\[ \t\n]*Updated statement.*=1" 0 "phicprop3" } } */
+/* { dg-final { cleanup-tree-dump "phicprop3" } } */
+