This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[tree-ssa] Simple test for DSE
- From: law at redhat dot com
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 16 Feb 2004 15:36:43 -0700
- Subject: [tree-ssa] Simple test for DSE
- Reply-to: law at redhat dot com
* gcc.dg/tree-ssa/20040216-1.c: New test.
Index: testsuite/gcc.dg/tree-ssa/20040216-1.c
===================================================================
RCS file: testsuite/gcc.dg/tree-ssa/20040216-1.c
diff -N testsuite/gcc.dg/tree-ssa/20040216-1.c
*** /dev/null 1 Jan 1970 00:00:00 -0000
--- testsuite/gcc.dg/tree-ssa/20040216-1.c 16 Feb 2004 22:34:32 -0000
***************
*** 0 ****
--- 1,18 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O1 -fdump-tree-dse1-details" } */
+
+ foo(int *z, int *y, int xx)
+ {
+ *z = 1;
+ if (xx)
+ xx = 20;
+ else
+ xx = 30;
+ *z = 2;
+ *z = 3;
+ return xx;
+ }
+
+ /* We should convert two COND_EXPRs into straightline code. */
+ /* { dg-final { scan-tree-dump-times "Deleted dead store" 2 "dse1"} } */
+