* iltests.il: Some tests for register allocation modifications
I have locally.
svn path=/trunk/mono/; revision=25642
+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.
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