[tree-ssa] Simple test for DSE

law@redhat.com law@redhat.com
Mon Feb 16 22:48:00 GMT 2004


	* 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"} } */
+ 




More information about the Gcc-patches mailing list