+ ldc.i4 1234
+ conv.i8
+ conv.ovf.i
+ conv.i4
+ ldc.i4 1234
+ beq L1
+ ldc.i4.1
+ ret
+ L1:
+ ldc.i4.0
+ ret
+ }
+
+ .method public static int32 test_0_lconv_ovf_u () cil managed {
+ .maxstack 16
+
+ ldc.i4 1234
+ conv.i8
+ conv.ovf.u
+ conv.i4
+ ldc.i4 1234
+ beq L1
+ ldc.i4.1
+ ret
+ L1:
+ ldc.i4.0
+ ret
+ }
+
+ .method public static int32 test_0_lconv_ovf_i_un () cil managed {
+ .maxstack 16
+
+ ldc.i4 1234
+ conv.i8
+ conv.ovf.i.un
+ conv.i4
+ ldc.i4 1234
+ beq L1
+ ldc.i4.1
+ ret
+ L1:
+ ldc.i4.0
+ ret
+ }
+
+ .method public static int32 test_0_lconv_ovf_u_un () cil managed {
+ .maxstack 16
+
+ ldc.i4 1234
+ conv.i8
+ conv.ovf.u.un
+ conv.i4
+ ldc.i4 1234
+ beq L1
+ ldc.i4.1
+ ret
+ L1:
+ ldc.i4.0
+ ret
+ }
+
+ .method public static int32 test_0_lconv_to_ovf_i8 () cil managed {
+ .maxstack 16
+
+ ldc.i4 1234
+ conv.i8
+ conv.ovf.i8
+ conv.i4
+ ldc.i4 1234
+ beq L1
+ ldc.i4.1
+ ret
+ L1:
+ ldc.i4.0
+ ret
+ }
+
+ .method public static int32 test_0_lconv_to_ovf_u8_un () cil managed {
+ .maxstack 16
+
+ ldc.i4 1234
+ conv.i8
+ conv.ovf.u8.un
+ conv.i4
+ ldc.i4 1234
+ beq L1
+ ldc.i4.1
+ ret
+ L1:
+ ldc.i4.0
+ ret
+ }
+
+ .method public static int32 test_2_lconv_to_ovf_i4_un () cil managed {
+ .maxstack 16
+ .locals init (int32 res)
+
+ ldc.i4 0x7fffffff
+ conv.u8
+ conv.ovf.i4.un
+ pop
+
+ ldc.i4.2
+ stloc res
+
+ .try {
+ ldc.i8 0x80000000
+ conv.ovf.i4.un
+ pop
+ ldc.i4.0
+ stloc res
+ leave RET
+ } catch [mscorlib]System.OverflowException {
+ pop
+ leave IL_0
+ }
+
+ IL_0:
+
+ .try {
+ ldc.i8 0xffffffff80000000
+ conv.ovf.i4.un
+ pop
+ ldc.i4.1
+ stloc res
+ leave RET
+ } catch [mscorlib]System.OverflowException {
+ pop
+ leave RET
+ }
+
+ RET:
+ ldloc res
+ ret
+ }
+
+ .method public static int32 test_1_lconv_to_ovf_i_un () cil managed {
+ .maxstack 16
+ .locals init (int32 res)
+
+ ldc.i4 0x7fffffff
+ conv.u8
+ conv.ovf.i.un
+ conv.i4
+ pop
+
+ ldc.i4.1
+ ret
+ }
+
+ .method public static int32 test_32_lconv_to_u8 () cil managed
+ {
+ .maxstack 16
+
+ ldc.i4 32
+ conv.i8
+ conv.u8
+ conv.i4
+ ret
+ }
+
+ .method public static int32 test_32_lconv_to_i8 () cil managed
+ {
+ .maxstack 16
+
+ ldc.i4 32
+ conv.i8
+ conv.i8
+ conv.i4
+ ret
+ }
+
+ .method public static int32 test_15_lconv_to_u () cil managed
+ {
+ ldc.i8 0x10000000f
+ conv.u
+ conv.i4
+ ret
+ }
+
+ .method public static int32 test_1234_fconv_u () cil managed {
+ .maxstack 16
+
+ ldc.r8 1234.0
+ conv.u
+ conv.i4
+ ret
+ }
+
+ .method public static int32 test_0_get_type_from_handle_on_bblock_boundary () cil managed
+ {
+ .maxstack 16
+
+ ldc.i4.1
+ brfalse OBJECT
+
+ ldtoken [mscorlib]System.String
+ br AFTER
+ OBJECT:
+ ldtoken [mscorlib]System.Object
+ AFTER:
+ call class [mscorlib]'System.Type' class [mscorlib]'System.Type'::'GetTypeFromHandle'(valuetype [mscorlib]'System.RuntimeTypeHandle')
+ callvirt instance string class [mscorlib]System.Type::get_FullName ()
+ ldstr "System.String"
+ callvirt instance bool class [mscorlib]System.Object::Equals(object)
+ ldc.i4.0
+ ceq
+ ret
+ }
+
+ .method public static int32 test_0_bug59580 ()
+ {
+ ldc.r4 float32(0x7FC00000)
+ ldc.r4 float32(0x7FC00000)
+ bge.un pass
+ br fail
+ pass:
+ ldc.i4.0
+ ret
+ fail:
+ ldc.i4.1
+ ret
+ }
+
+ .method public static int32 test_1_bug60056 () {
+ .locals init (int32 m5)
+
+ ldc.i4.m1
+ stloc.0
+
+ ldc.i4.1
+ conv.u8
+
+ ldloc.0
+ conv.i8
+ mul
+
+ ldc.i4.m1
+ conv.i8
+ ceq
+ ret
+ }
+
+ .method public static int32 test_1_conv_u8_cfold () {
+ ldc.i4.m1
+ conv.u8
+
+ ldc.i8 0x00000000ffffffff
+
+ ceq
+ ret
+ }
+
+ .method public static int32 test_1_array_type_mismatch_ldelema () {
+ .locals init (int32 r)
+
+ ldc.i4.1
+ newarr string
+ ldc.i4.0
+ ldelema string
+ pop
+
+ .try {
+ ldc.i4.1
+ newarr string
+ ldc.i4.0
+ ldelema object
+ pop
+
+ leave end
+ } catch [mscorlib]System.ArrayTypeMismatchException {
+ pop
+ ldc.i4.1
+ stloc.0
+ leave end
+ }
+ end:
+ ldloc.0
+ ret
+ }
+
+ .method public static int32 test_1_conv_ovf_i8_with_i4 () {
+ ldc.i4.m1
+ conv.ovf.i8
+ conv.ovf.i4
+ neg
+ ret
+ }
+
+ // bug #72148
+ .method public static int32 test_0_initlocals_float_ptr () {
+ .maxstack 3
+ .locals init (
+ float32[] V_0,
+ float32& pinned V_1,
+ unsigned int32 V_2)
+ ldc.i4.s 0x0f
+ newarr [mscorlib]System.Single
+ stloc.0
+ ldloc.0
+ ldc.i4.0
+ ldc.r4 1.13
+ stelem.r4
+ ldloc.0
+ ldc.i4.0
+ ldelema [mscorlib]System.Single
+ stloc.1
+ ldloc.1
+ conv.i
+ ldind.u4
+ stloc.2
+ ldc.i4.0
+ ret
+ }
+
+ .method public static int32 test_7_conv_ovf_u8_un () {
+ .maxstack 2
+ .locals init (unsigned int64)
+
+ ldc.i4.7
+ conv.ovf.u8.un
+ stloc.0
+ ldloc.0
+ conv.i4
+ ret
+ }
+
+ .method public static int32 test_7_conv_ovf_u4_un () {
+ .maxstack 2
+ .locals init (unsigned int32)
+
+ ldc.i4.7
+ conv.ovf.u4.un
+ stloc.0
+ ldloc.0
+ conv.i4
+ ret
+ }
+
+ .method public static int32 test_1_bug_74591 () {
+ .maxstack 16
+ .locals init (int32)
+
+ ldc.i4.m1
+ stloc.0
+ ldloc.0
+ conv.ovf.i8
+ ldc.i4.m1
+ conv.ovf.i8
+ mul.ovf
+ conv.i4
+ ret
+ }
+
+ .class nested public auto ansi Integer
+ extends [mscorlib]System.Object {
+
+ .field public bool n
+
+ .method public hidebysig specialname rtspecialname
+ instance default void .ctor (unsigned int64 i, bool n) cil managed
+ {
+ .maxstack 8
+ ldarg.0
+ call instance void class [mscorlib]System.Object::.ctor()
+ ldarg.0
+ ldarg.2
+ stfld bool Tests/Integer::n
+ ret
+ }
+ }
+
+ .method public static int32 test_1_bug_74726 () {
+ .maxstack 16
+
+ ldc.i4.2
+ conv.ovf.u8
+ ldc.i4.1
+ conv.ovf.u8
+ mul.ovf.un
+ ldc.i4.1
+ newobj instance void class Tests/Integer::.ctor(unsigned int64, bool)
+ ldfld bool Tests/Integer::n
+ ldc.i4.1
+ ceq
+ ret
+ }
+
+ .class nested private auto ansi sealed xxx
+ extends [mscorlib]System.ValueType
+ {
+ .field public object a
+
+ .method public hidebysig specialname rtspecialname
+ instance default void .ctor () cil managed
+ {
+ .maxstack 8
+ ret
+ }
+ } // end of class xxx
+
+ .method public static int32 test_0_newobj_vtype () {
+ .maxstack 6
+ .locals init (
+ valuetype Tests/xxx V_0
+ )
+
+ newobj instance void valuetype Tests/xxx::.ctor ()
+ stloc.0
+ ldloca.s 0
+ ldfld object Tests/xxx::a
+ brfalse OK
+ ldc.i4.s 1
+ ret
+ OK:
+ ldc.i4.s 0
+ ret
+ }
+
+ .method public static int32 test_0_newobj_vtype_primitive () {
+ .maxstack 6
+ .locals init (
+ native int V_0
+ )
+
+ ldc.i4.s 10
+ newobj instance void native int::'.ctor'(int32)
+ stloc.0
+ ldloc.0
+ ldc.i4.s 10
+ beq OK
+ ldc.i4.s 1
+ ret
+ OK:
+ ldc.i4.s 0
+ ret
+ }
+
+ .method public static int32 test_1_filters () {
+ .custom instance void [TestDriver]CategoryAttribute::.ctor(string) = ( 01 00 08 21 42 49 54 43 4F 44 45 00 00 ) // ...!BITCODE..
+ .maxstack 16
+ .locals init (
+ int32 res
+ )
+
+ .try { // 0
+ .try {
+ ldstr "OnErrorSub test Exception"
+ newobj instance void class [mscorlib]System.Exception::.ctor(string)
+ throw
+ leave.s IL_0033
+ }
+ filter {
+ pop
+ ldc.i4.0
+ endfilter
+ } {
+ pop
+ // Should not be called
+ ldc.i4.2
+ stloc res
+ leave.s IL_0033
+ }
+ }
+ filter {
+ pop
+ ldc.i4.1
+ endfilter
+ } {
+ pop
+ ldc.i4.1
+ stloc res
+ leave.s IL_0033
+
+ }
+ IL_0033:
+ ldloc res
+ ret
+ }
+
+ .class nested private auto ansi sealed beforefieldinit TheStruct
+ extends [mscorlib]System.ValueType {
+ .field public int32 a
+ .field public int32 b
+ }
+
+ .method public static int32 test_5_cpobj () {
+ .maxstack 8
+ .locals init (
+ valuetype Tests/TheStruct v_0,
+ valuetype Tests/TheStruct v_1
+ )
+
+ ldloca v_0
+ ldc.i4.2
+ stfld int32 Tests/TheStruct::a
+
+ ldloca v_0
+ ldc.i4.3
+ stfld int32 Tests/TheStruct::b
+
+ ldloca v_1
+ ldloca v_0
+ cpobj Tests/TheStruct
+
+ ldloca v_1
+ ldfld int32 Tests/TheStruct::a
+ ldloca v_1
+ ldfld int32 Tests/TheStruct::b
+ add
+
+ ret
+ }
+
+ .method public static int32 test_5_ldobj_stloc_optimization () {
+ .maxstack 8
+ .locals init (
+ valuetype Tests/TheStruct v_0,
+ valuetype Tests/TheStruct v_1
+ )
+
+ ldloca v_0
+ ldc.i4.2
+ stfld int32 Tests/TheStruct::a
+
+ ldloca v_0
+ ldc.i4.3
+ stfld int32 Tests/TheStruct::b
+
+ ldloca v_0
+ ldobj valuetype Tests/TheStruct
+ stloc.s v_1
+
+ ldloca v_1
+ ldfld int32 Tests/TheStruct::a
+ ldloca v_1
+ ldfld int32 Tests/TheStruct::b
+ add
+
+ ret
+ }
+
+ .method public static int32 test_1_cpobj_reference () {
+ .maxstack 8
+ .locals init (
+ object v_0,
+ object v_1
+ )
+
+ newobj instance void object::.ctor()
+ stloc v_0
+
+ ldloca v_1
+ ldloca v_0
+ cpobj object
+
+ ldloc v_0
+ ldloc v_1
+ ceq
+ ret
+ }
+
+ .method public static int32 test_1_initobj_reference () {
+ .maxstack 8
+ .locals init (
+ object v_0
+ )
+
+ newobj instance void object::.ctor()
+ stloc v_0
+
+ ldloca v_0
+ initobj object
+
+ ldloc v_0
+ ldnull
+ ceq
+ ret
+ }
+
+ .method public static int32 test_1_ldobj_reference () {
+ .maxstack 8
+ .locals init (
+ object v_0
+ )
+
+ newobj instance void object::.ctor()
+ stloc v_0
+
+ ldloc v_0
+ ldloca v_0
+ ldobj object
+ ceq
+ ret
+ }
+
+ .method public static int32 test_5_vtype_on_bb_boundary () {
+ .maxstack 8
+ .locals init (
+ valuetype Tests/TheStruct v_0,
+ valuetype Tests/TheStruct v_1
+ )
+
+ ldloca v_0
+ ldc.i4.2
+ stfld int32 Tests/TheStruct::a
+
+ ldloca v_0
+ ldc.i4.3
+ stfld int32 Tests/TheStruct::b
+
+ ldloc v_0
+ br L_0
+ L_0: stloc v_1
+
+ ldloca v_1
+ ldfld int32 Tests/TheStruct::a
+ ldloca v_1
+ ldfld int32 Tests/TheStruct::b
+ add
+ ret
+ }
+
+ .method public static int32 test_5_different_in_stacks () cil managed {
+ .maxstack 16
+
+ ldc.i4.1
+ ldc.i4.1
+ beq L_0
+
+ ldc.i4.3
+ ldc.i4.3
+ br L_1
+ ldc.i4.3
+ ldc.i4.3
+ br L_2
+ L_0: ldc.i4.2
+ ldc.i4.3
+ ldc.i4.1
+ ldc.i4.1
+ beq L_2
+ L_1: add
+ ret
+ L_2: add
+ ret
+ }
+
+ .method public static int32 test_3_larray_get_set () {
+ .locals init (
+ int32[2] V_0)
+
+ ldc.i4.2
+ newobj instance void int32[0...]::.ctor(int32)
+ stloc.0
+ ldloc.0
+ ldc.i4.0
+ ldc.i4 1
+ call instance void int32[0...]::Set(int32, int32)
+ ldloc.0
+ ldc.i4.1
+ ldc.i4 2
+ call instance void int32[0...]::Set(int32, int32)
+
+ ldloc.0
+ ldc.i4.0
+ call instance int32 int32[0...]::Get(int32)
+ ldloc.0
+ ldc.i4.1
+ call instance int32 int32[0...]::Get(int32)
+ add
+ ret
+ }
+
+ .method public static int32 test_0_pop_side_effects () {
+ .try {
+ ldc.r8 1
+ ldc.r8 0
+ div
+ ckfinite
+ pop
+ leave FAIL
+ }
+ catch [mscorlib]System.ArithmeticException {
+ pop
+ leave L_0
+ }
+ L_0:
+ ldc.i4.0
+ ret
+ FAIL: