2008-11-17 Rodrigo Kumpera <rkumpera@novell.com>
[mono.git] / mono / mini / basic.cs
index 45e449430939e74bc54eae78956383f035d0c612..ecbef60b697f76fdaeaeb7af261fb7b56d4faa01 100644 (file)
@@ -675,7 +675,21 @@ class Tests {
                        return 1;
                else
                        return 0;
-       }               
+       }
+
+       public static int test_127_iconv_to_i1 () {
+               int i = 0x100017f;
+               sbyte s = (sbyte)i;
+
+               return s;
+       }
+
+       public static int test_384_iconv_to_i2 () {
+               int i = 0x1000180;
+               short s = (short)i;
+
+               return s;
+       }
        
        public static int test_15_for_loop () {
                int i;
@@ -1275,4 +1289,35 @@ class Tests {
                return 0;
        }
 
+       public static int cmov (int i) {
+               int j = 0;
+
+               if (i > 0)
+                       j = 1;
+
+               return j;
+       }
+
+       public static int cmov2 (int i) {
+               int j = 0;
+
+               if (i <= 0)
+                       ;
+               else
+                       j = 1;
+
+               return j;
+       }
+               
+       public static int test_0_branch_to_cmov_opt () {
+               if (cmov (0) != 0)
+                       return 1;
+               if (cmov (1) != 1)
+                       return 2;
+               if (cmov2 (0) != 0)
+                       return 1;
+               if (cmov2 (1) != 1)
+                       return 2;
+               return 0;
+       }
 }