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] More optimization tests


Whee.
        * gcc.dg/tree-ssa/20030807-10.c: New test.

Index: gcc.dg/tree-ssa/20030807-10.c
===================================================================
RCS file: gcc.dg/tree-ssa/20030807-10.c
diff -N gcc.dg/tree-ssa/20030807-10.c
*** /dev/null	1 Jan 1970 00:00:00 -0000
--- gcc.dg/tree-ssa/20030807-10.c	12 Aug 2003 03:44:20 -0000
***************
*** 0 ****
--- 1,25 ----
+ /* { dg-do compile */
+ /* { dg-options "-O1 -fdump-tree-ssa" } */
+      
+ 
+ extern const unsigned char mode_size[];
+ unsigned int
+ subreg_highpart_offset (outermode, innermode)
+      int outermode, innermode;
+ {
+   unsigned int offset = 0;
+   int difference = (mode_size[innermode] - mode_size[outermode]);
+   if (difference > 0)
+     {
+         offset += difference % (0 ? 8 : 4);
+ 	offset += difference / 4 * 4;
+     }
+   return offset;
+ }
+ 
+ /* There should be one mask with the value 3.
+ /* { dg-final { scan-tree-dump-times " \& 3" 1 "ssa"} } */
+   
+ /* There should be one right shift by 2 places.
+ /* { dg-final { scan-tree-dump-times " >> 2" 1 "ssa"} } */
+ 




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