summaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>2017-01-13 15:42:08 +0000
committerDongkyun Son <dongkyun.s@samsung.com>2017-09-04 10:33:44 +0900
commit04f427c7aa9f2d53b1cfe18704857dc74bd5dd0b (patch)
treecb38d621e3e8eefeda279eafcb006e598ca2dec7 /gcc/testsuite
parentc77483e67bdcb1f14614db5ee051f5b05199af6d (diff)
downloadlinaro-gcc-sandbox/dkson95/memset.tar.gz
linaro-gcc-sandbox/dkson95/memset.tar.bz2
linaro-gcc-sandbox/dkson95/memset.zip
PR tree-optimization/33562sandbox/dkson95/memset
PR tree-optimization/61912 PR tree-optimization/77485 * doc/invoke.texi: Document new dse-max-object-size param. * params.def (PARM_DSE_MAX_OBJECT_SIZE): New PARAM. * tree-ssa-dse.c: Include params.h. (dse_store_status): New enum. (initialize_ao_ref_for_dse): New, partially extracted from dse_optimize_stmt. (valid_ao_ref_for_dse, normalize_ref): New. (setup_live_bytes_from_ref, compute_trims): Likewise. (clear_bytes_written_by, maybe_trim_complex_store): Likewise. (maybe_trim_partially_dead_store): Likewise. (maybe_trim_complex_store): Likewise. (dse_classify_store): Renamed from dse_possibly_dead_store_p. Track what bytes live from the original store. Return tri-state for dead, partially dead or live. (dse_dom_walker): Add constructor, destructor and new private members. (delete_dead_call, delete_dead_assignment): New extracted from dse_optimize_stmt. (dse_optimize_stmt): Make a member of dse_dom_walker. Use initialize_ao_ref_for_dse. PR tree-optimization/33562 PR tree-optimization/61912 PR tree-optimization/77485 * gcc.dg/tree-ssa/complex-4.c: Remove xfail. * gcc.dg/tree-ssa/complex-5.c: Likewise. * gcc.dg/tree-ssa/ssa-dse-9.c: Likewise. * gcc.dg/tree-ssa/ssa-dse-18.c: New test. * gcc.dg/tree-ssa/ssa-dse-19.c: Likewise. * gcc.dg/tree-ssa/ssa-dse-20.c: Likewise. * gcc.dg/tree-ssa/ssa-dse-21.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244442 138bc75d-0d04-0410-961f-82ee72b054a4 Conflicts: gcc/ChangeLog gcc/doc/invoke.texi gcc/params.def gcc/testsuite/ChangeLog gcc/tree-ssa-dse.c
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/complex-4.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/complex-5.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-18.c15
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-19.c15
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-20.c13
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-21.c12
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-9.c2
7 files changed, 58 insertions, 3 deletions
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/complex-4.c b/gcc/testsuite/gcc.dg/tree-ssa/complex-4.c
index 87a26381117..3155741c630 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/complex-4.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/complex-4.c
@@ -10,4 +10,4 @@ int f(void)
return g(&t);
}
-/* { dg-final { scan-tree-dump-times "__complex__" 0 "optimized" { xfail *-*-* } } } */
+/* { dg-final { scan-tree-dump-times "__complex__" 0 "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/complex-5.c b/gcc/testsuite/gcc.dg/tree-ssa/complex-5.c
index e2cd4039c3b..e6d027f57ef 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/complex-5.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/complex-5.c
@@ -8,4 +8,4 @@ int f(void)
__imag__ t = 2;
}
-/* { dg-final { scan-tree-dump-times "__complex__" 0 "optimized" { xfail *-*-* } } } */
+/* { dg-final { scan-tree-dump-times "__complex__" 0 "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-18.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-18.c
new file mode 100644
index 00000000000..92b2df80ec8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-18.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+int g(_Complex int*);
+int f(void)
+{
+ _Complex int t = 0;
+ int i, j;
+ __imag__ t += 2;
+ return g(&t);
+}
+
+
+/* { dg-final { scan-tree-dump-times "__complex__" 0 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "REALPART_EXPR" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "IMAGPART_EXPR" 1 "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-19.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-19.c
new file mode 100644
index 00000000000..718b7466e50
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-19.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+int g(_Complex int*);
+int f(void)
+{
+ _Complex int t = 0;
+ int i, j;
+ __real__ t += 2;
+ return g(&t);
+}
+
+
+/* { dg-final { scan-tree-dump-times "__complex__" 0 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "REALPART_EXPR" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "IMAGPART_EXPR" 1 "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-20.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-20.c
new file mode 100644
index 00000000000..4e14d9b1543
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-20.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-O1 -fno-tree-dce -fdump-tree-optimized" } */
+_Complex int t = 0;
+int f(void)
+{
+ t = 0;
+ __imag__ t = 2;
+}
+
+/* { dg-final { scan-tree-dump-times "__complex__" 0 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "REALPART_EXPR" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "IMAGPART_EXPR" 1 "optimized" } } */
+
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-21.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-21.c
new file mode 100644
index 00000000000..d1e0b85bc01
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-21.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-O1 -fno-tree-dce -fdump-tree-optimized" } */
+_Complex int t = 0;
+int f(void)
+{
+ t = 0;
+ __real__ t = 2;
+}
+
+/* { dg-final { scan-tree-dump-times "__complex__" 0 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "REALPART_EXPR" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "IMAGPART_EXPR" 1 "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-9.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-9.c
index 594c20c9f38..ae48ddd5152 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-9.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-9.c
@@ -11,4 +11,4 @@ foo ()
}
/* We should eliminate the first assignment. */
-/* { dg-final { scan-tree-dump-times "VDEF" 2 "dse1" { xfail *-*-* } } } */
+/* { dg-final { scan-tree-dump-times "VDEF" 2 "dse1" } } */