2004-04-17 Ben Maurer <bmaurer@users.sourceforge.net>
authorBen Maurer <benm@mono-cvs.ximian.com>
Sat, 17 Apr 2004 17:01:33 +0000 (17:01 -0000)
committerBen Maurer <benm@mono-cvs.ximian.com>
Sat, 17 Apr 2004 17:01:33 +0000 (17:01 -0000)
* iltests.il: Some tests for register allocation modifications
I have locally.

svn path=/trunk/mono/; revision=25642

mono/mini/ChangeLog
mono/mini/iltests.il

index 6557d87fe811079481cc40763b2ba9246cdedb3c..abe36fa4045b6a9ee0615327102d503bdfe2a092 100644 (file)
@@ -1,3 +1,8 @@
+2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
+
+       * iltests.il: Some tests for register allocation modifications
+       I have locally.
+
 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
 
        * exceptions.cs: Add regression test for bug #56782.
index 3559101fec5ee9d0d989ece39e35abe09a027d5f..672dad357ba998719eb597e50e6eb3a0f40985c9 100644 (file)
                pop\r
                ldc.i4.0\r
                ret\r
-       }\r
-\r
+       }
+       
+       
+       .method static public int32 test_1_ceq_to_i4 () il managed {
+               .locals init (
+                       int32   foo
+               )
+               ldc.i4 500
+               stloc foo
+               ldloc foo
+               ldc.i4 500
+               ceq
+               stloc foo
+               ldloc foo
+               ret
+       }
+       
+       //
+       // This should be manually checked. Basically under -O=linears,
+       // you should not see tons of register spilling.
+       //
+       .method static public int32 test_1_bytedreg_free () il managed {
+               .locals init (
+                       int32   foo
+               )
+               ldc.i4 500
+               stloc foo
+               ldloc foo
+               ldc.i4 500
+               ceq
+               stloc foo
+               
+               ldloc foo
+               ldc.i4 1
+               ceq
+               stloc foo
+
+               ldloc foo
+               ldc.i4 1
+               ceq
+               stloc foo
+
+               ldloc foo
+               ldc.i4 1
+               ceq
+               stloc foo
+               
+               ldloc foo
+               ldc.i4 1
+               ceq
+               stloc foo
+               
+               ldloc foo
+               ret
+       }
+       
+       //
+       // This should be manually checked. Basically under -O=linears,
+       // you should not see tons of register spilling.
+       //
+       .method static public int32 test_0_bytesreg1_free () il managed {
+               .locals init (
+                       unsigned int8      dest,
+                       int32              src,
+                       unsigned int8&     pdest
+               )
+
+               ldloca     dest
+               stloc      pdest
+               
+               ldloc      pdest
+               ldloc      src
+               stind.i1
+               
+               ldloc      pdest
+               ldloc      src
+               stind.i1
+               
+               ldloc      pdest
+               ldloc      src
+               stind.i1
+               
+               ldloc      pdest
+               ldloc      src
+               stind.i1
+               
+               ldloc      pdest
+               ldloc      src
+               stind.i1
+               
+               ldloc      pdest
+               ldloc      src
+               stind.i1
+               
+               ldloc      pdest
+               ldind.i1
+               ret
+       }
+       \r
        .method static public int32 test_3_copy_used_bug () il managed {\r
 \r
                .locals init (\r