This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[tree-ssa] New test


And a test for the recent improvement to tree-ssa-forwprop.

        * gcc.dg/tree-ssa/20040305-1.c: New test.

Index: gcc.dg/tree-ssa/20040305-1.c
===================================================================
RCS file: gcc.dg/tree-ssa/20040305-1.c
diff -N gcc.dg/tree-ssa/20040305-1.c
*** /dev/null	1 Jan 1970 00:00:00 -0000
--- gcc.dg/tree-ssa/20040305-1.c	5 Mar 2004 21:06:24 -0000
***************
*** 0 ****
--- 1,30 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2 -fdump-tree-cddce -fdump-tree-forwprop1-details" } */
+   
+ int abarney[2];
+ int afred[1];
+  
+ void foo(int edx, int eax)
+ {
+   if (eax == 65535)
+     {
+       if (edx == 1)
+         {
+           abarney[0] = 5;
+           abarney[1] = 6;
+         }
+     }
+   if (eax == 65535)
+     {
+       if (-- edx == 0)
+         afred[0] = 2;
+     }
+ }
+  
+ 
+ /* Verify that we did a forward propagation.  */
+ /* { dg-final { scan-tree-dump-times "Replaced" 1 "forwprop1"} } */
+ 
+ /* After cddce we should have two IF statements remaining as the other
+    two tests can be threaded.  */
+ /* { dg-final { scan-tree-dump-times "if " 2 "cddce"} } */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]