- public static int test_0_regress_cprop_80738 () {
- int hours = Int32.MinValue;
- int hrssec = (hours * 3600); // break point at (Int32.MaxValue - 596523)
- long t = ((long)(hrssec) * 1000L);
+ 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;
+ }
+
+ public static unsafe int test_0_ishr_sign_extend () {
+ // Check that ishr does sign extension from bit 31 on 64 bit platforms
+ uint val = 0xF0000000u;
+
+ uint *a = &val;
+ uint ui = (uint)((int)(*a) >> 2);
+
+ if (ui != 0xfc000000)
+ return 1;
+
+ // Same with non-immediates
+ int amount = 2;
+
+ ui = (uint)((int)(*a) >> amount);
+
+ if (ui != 0xfc000000)
+ return 2;
+
+ return 0;
+ }
+
+ public static unsafe int test_0_ishr_sign_extend_cfold () {
+ int i = 32768;
+ int j = i << 16;
+ int k = j >> 16;