update readme (#21797)
[mono-project.git] / mono / mini / iltests.il
blob12e7a845589c5420cc376b2803a662c4046c0f06
1 .assembly iltests {
2   .custom instance void class [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::'.ctor'() =  (
3                 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78   // ....T..WrapNonEx
4                 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01       ) // ceptionThrows.
6 .assembly extern TestDriver {}
7 .assembly extern mscorlib {}
9   .class private sequential ansi sealed beforefieldinit FLSharedKeys
10   extends [mscorlib]System.ValueType
11   {
12          .pack 0
13          .size 1
14   }
16 .class public auto ansi sealed beforefieldinit Tests {
18         .method static public int32 Main(string[] args) il managed {
19                 .entrypoint
21                 ldtoken Tests
22                 call       class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
23                 ldarg.0
24                 call       int32 [TestDriver]TestDriver::RunTests(class [mscorlib]System.Type, string[])
25                 ret
26         }
28         .method hidebysig static int32 comp_ptr_i8(void* arg, int64 v) cil managed
29         {
30                 .maxstack 2
32                 ldarg.0
33                 ldarg.1
34                 ceq
35                 ret
36         }
38         .method hidebysig static int64 add_ptr_i4(void* arg) cil managed
39         {
40                 .maxstack 2
42                 ldarg.0
43                 ldc.i4.2
44                 add
45                 ret
46         }
48         .method hidebysig static int64 add_ptr_i8(void* arg, int64 v) cil managed
49         {
50                 .maxstack 2
52                 ldarg.0
53                 ldarg.1
54                 add
55                 ret
56         }
58         .method hidebysig static int64 and_ptr_i8(void* arg, int64 v) cil managed
59         {
60                 .maxstack 2
62                 ldarg.0
63                 ldarg.1
64                 and
65                 ret
66         }
68         .method hidebysig static int32 i8_ptr_arithm_x64() cil managed
69         {
70                 .maxstack 3
72                 ldc.i4.1
73                 ldc.i8 0x1111222233334444
74                 call int64 class Tests::add_ptr_i4(void*)
75                 ldc.i8 0x1111222233334446
76                 bne.un FAIL1
77                 pop
79                 ldc.i4.2
80                 ldc.i8 0x1111222233334444
81                 ldc.i8 0x2
82                 call int64 class Tests::add_ptr_i8(void*,int64)
83                 ldc.i8 0x1111222233334446
84                 bne.un FAIL1
85                 pop
87                 ldc.i4.3
88                 ldc.i8 0x1111222233334444
89                 ldc.i4 0x2
90                 call int64 class Tests::add_ptr_i8(void*,int64)
91                 ldc.i8 0x1111222233334446
92                 bne.un FAIL1
93                 pop
95                 ldc.i4.4
96                 ldc.i8 0x1111222233334444
97                 ldc.i8 0x0000FFFF00000000
98                 call int64 class Tests::and_ptr_i8(void*,int64)
99                 ldc.i8 0x0000222200000000
100                 bne.un FAIL1
101                 pop
103                 ldc.i4.5
104                 ldc.i8 0x1111222233334444
105                 ldc.i4 0xFFFF0000
106                 call int64 class Tests::and_ptr_i8(void*,int64)
107                 ldc.i8 0x1111222233330000
108                 bne.un FAIL1
109                 pop
111                 ldc.i4.6
112                 ldc.i8 0x1111222233334444
113                 ldc.i4 0xFFFF0000
114                 and
115                 ldc.i8 0x1111222233330000
116                 bne.un FAIL1
117                 pop
119                 ldc.i4.7
120                 ldc.i8 0x1111222233334444
121                 ldc.i8 0x1111222233334444
122                 call int32 class Tests::comp_ptr_i8(void*,int64)
123                 ldc.i4.1
124                 bne.un FAIL1
125                 pop
127                 ldc.i4.8
128                 ldc.i8 0x1111222233334444
129                 ldc.i4 0x1111
130                 add
131                 ldc.i8 0x1111222233335555
132                 bne.un FAIL1
133                 pop
135                 ldc.i4.0
136 FAIL1:
137                 ret
138         }
140         .method static public int32 test_0_i8_ptr_arithm() cil managed {
141                 .custom instance void [TestDriver]CategoryAttribute::.ctor(string) = ( 01 00 0C 21 49 4E 54 45 52 50 52 45 54 45 52 00 00)  // ...!INTERPRETER.
142                 .maxstack 2
144                 sizeof [mscorlib]System.IntPtr
145                 ldc.i4.8
146                 bne.un OK1
147                 call int32 class Tests::i8_ptr_arithm_x64()
148                 ret
150 OK1:
151                 ldc.i4.0
152                 ret
153         }
155         // make sure the register allocator works when the return value of
156         // 'div' is discarded
157         .method static public int32 test_0_div_regalloc () il managed {
158                 .locals init (
159                         int32 i
160                 )
162                 ldloc 0
163                 ldc.i4.s 0xa
164                 div
165                 pop
166                 ldc.i4.0
167                 ret
168         }
169         
170         
171         .method static public int32 test_1_ceq_to_i4 () il managed {
172                 .locals init (
173                         int32   foo
174                 )
175                 ldc.i4 500
176                 stloc foo
177                 ldloc foo
178                 ldc.i4 500
179                 ceq
180                 stloc foo
181                 ldloc foo
182                 ret
183         }
184         
185         .method static public int32 test_3_shl_regvars () il managed {
186                 .locals init (
187                         int32   a,
188                         int32   b,
189                         int32   r1,
190                         int32   r2,
191                         int32   r3
192                 )
193                         
194                 ldc.i4.2
195                 stloc      a
196                 ldc.i4.1
197                 stloc      b
198         
199                 ldloc      a
200                 ldloc      b
201                 shl 
202                 stloc      r1
203                 
204                 ldloc      a
205                 ldloc      b
206                 shl 
207                 stloc      r2
208                 
209                 ldloc      a
210                 ldloc      b
211                 shl 
212                 stloc      r3
213                 
214                 ldloc      r1
215                 ldc.i4.4
216                 ceq
217                 
218                 ldloc      r2
219                 ldc.i4.4
220                 ceq
221                 
222                 ldloc      r3
223                 ldc.i4.4
224                 ceq
225                 
226                 add
227                 add
228                 
229                 ret
230         }
231         
232         .method static public int32 test_1_fceq_to_i4 () il managed {
233         
234                 .locals init (
235                         float64 foo,
236                         int32   val
237                 )
239                 ldc.r8      2
240                 stloc       foo
241                 
242                 ldloc       foo
243                 ldc.r8      2
244                 ceq
245                 stloc       val
246                 
247                 ldloc       val
248                 ret
249         }
251         //
252         // This should be manually checked. Basically under -O=linears,
253         // you should not see tons of register spilling.
254         //
255         .method static public int32 test_1_bytedreg_free () il managed {
256                 .locals init (
257                         int32   foo
258                 )
259                 ldc.i4 500
260                 stloc foo
261                 ldloc foo
262                 ldc.i4 500
263                 ceq
264                 stloc foo
265                 
266                 ldloc foo
267                 ldc.i4 1
268                 ceq
269                 stloc foo
271                 ldloc foo
272                 ldc.i4 1
273                 ceq
274                 stloc foo
276                 ldloc foo
277                 ldc.i4 1
278                 ceq
279                 stloc foo
280                 
281                 ldloc foo
282                 ldc.i4 1
283                 ceq
284                 stloc foo
285                 
286                 ldloc foo
287                 ret
288         }
289         
290         //
291         // This should be manually checked. Basically under -O=linears,
292         // you should not see tons of register spilling.
293         //
294         .method static public int32 test_0_bytesreg1_free () il managed {
295                 .locals init (
296                         unsigned int8      dest,
297                         int32              src,
298                         unsigned int8&     pdest
299                 )
301                 ldloca     dest
302                 stloc      pdest
303                 
304                 ldloc      pdest
305                 ldloc      src
306                 stind.i1
307                 
308                 ldloc      pdest
309                 ldloc      src
310                 stind.i1
311                 
312                 ldloc      pdest
313                 ldloc      src
314                 stind.i1
315                 
316                 ldloc      pdest
317                 ldloc      src
318                 stind.i1
319                 
320                 ldloc      pdest
321                 ldloc      src
322                 stind.i1
323                 
324                 ldloc      pdest
325                 ldloc      src
326                 stind.i1
327                 
328                 ldloc      pdest
329                 ldind.i1
330                 ret
331         }
332         
333         .method static public int32 test_1_shift_regvar () il managed {
334         
335                 .locals init (
336                         int32   v7FFFFFFF,
337                         int32   v1
338                 )
339                 
340                 ldc.i4  0x7FFFFFFF
341                 stloc   v7FFFFFFF
342         
343                 ldc.i4.1
344                 stloc v1
345                 
346                 ldloc   v7FFFFFFF
347                 ldloc   v1
348                 shl
349                 ldc.i4  0xFFFFFFFE
350                 ceq
351                 ret
352         }
353         
354         // this only happens with the managed pointer, not an unmanaged one.
355         .method static public int32 test_0_foo () il managed {
356         
357                 .locals init (
358                         int32&  buf
359                 )
360                 
361                 ldc.i4.5
362                 localloc
363                 
364                 stloc buf
365                 ldloc buf
366                 
367                 ldind.i4
368                 
369                 ret
370         }
372         .method static public int32 test_0_localloc () cil managed {
373                 .locals init (native int, native int, native int, native int, int32)
375                 ldc.i4 6
376                 localloc
377                 conv.i
378                 stloc.0
380                 ldc.i4 6
381                 localloc
382                 conv.i
383                 stloc.1
385                 ldc.i4 6
386                 localloc
387                 conv.i
388                 stloc.2
390                 // Variable length
391                 ldc.i4 128
392                 stloc.s 4
393                 ldloc.s 4
394                 localloc
395                 conv.i
396                 stloc.3
398                 // Check zero initialized
399                 ldloc.0
400                 ldind.i4
401                 ldc.i4.0
402                 beq OK1
403                 ldc.i4.1
404                 br FAIL
406 OK1:
407                 ldloc.3
408                 ldind.i4
409                 ldc.i4.0
410                 beq OK2
411                 ldc.i4.2
412                 br FAIL
414 OK2:
415                 ldloc.3
416                 ldc.i4.s 124
417                 add
418                 ldind.i4
419                 ldc.i4.0
420                 beq OK3
421                 ldc.i4.3
422                 br FAIL
424 OK3:
425                 ldloc.1
426                 ldc.i4 999999
427                 stind.i4
428                 ldloc.1
429                 ldind.i4
430                 ldc.i4 999999
431                 beq OK4
432                 ldc.i4.4
433                 br FAIL
435 OK4:
436                 ldloc.0
437                 ldc.i4 999999
438                 stind.i4
439                 ldloc.0
440                 ldind.i4
441                 ldc.i4 999999
442                 beq OK5
443                 ldc.i4.5
444                 br FAIL
446 OK5:
447                 // Try allocations bigger than one page
448                 ldc.i4 8196
449                 localloc
450                 conv.i
451                 stloc.3
452                 ldloc.3
453                 ldc.i4 8192
454                 add
455                 ldc.i4 99
456                 stind.i4
457                 ldloc.3
458                 ldc.i4 8192
459                 add
460                 ldind.i4
461                 ldc.i4 99
462                 beq PASS
463                 ldc.i4.6
464                 br FAIL
466 FAIL:
467                 ret
469 PASS:   ldc.i4.0
470                 ret
471         }
473     .method private static void do_localloc () cil managed {
474         .maxstack 3
475         .locals init (
476                 unsigned int8*  V_0)
477         IL_0000:  ldc.i4.1
478         IL_0001:  ldc.i4 131072
479         IL_0006:  mul
480         IL_0007:  localloc
481         IL_0009:  stloc.0
482         IL_000a:  ret
483     }
485         // Check that localloc cannot be inlined
486         .method static public int32 test_0_localloc_inline () cil managed {
487                 .maxstack 16
488                 .locals init (
489                         int32 i
490                 )
492                 ldc.i4.0
493         stloc.0
494         br COND
496 START:  call void class Tests::do_localloc()
497         ldloc.0
498         ldc.i4.1
499         add
500         stloc.0
501 COND:   ldloc.0
502         ldc.i4 1000
503         blt START
505                 ldc.i4.0
506                 ret
507         }       
508         
509         .method static public int32 test_3_copy_used_bug () il managed {
511                 .locals init (
512                         int32 size,
513                         int32 res
514                 )
516                 ldc.i4 0
517                 stloc res
519                 ldc.i4 1
520                 stloc size
522                 ldloc size
523                 ldloc size
524                 ldloc size
525                 add
526                 stloc size
527                 ldloc size
528                 add
529                 stloc res
531                 ldloc res
532                 ret
533         }
535         // demonstrate that the copy_used_var is not a fix for the above bug
536         .method static public int32 test_3_copy_used_indir_bug () il managed {
538                 .locals init (
539                         int32 size,
540                         int32 res
541                 )
543                 ldc.i4 0
544                 stloc res
546                 ldc.i4 1
547                 stloc size
549                 ldloc size
550                 ldloca size
551                 ldloc size
552                 ldloc size
553                 add
554                 stind.i4
555                 ldloc size
556                 add
557                 stloc res
559                 ldloc res
560                 ret
561         }
563         .method static public void do_nothing (int32 a) il managed {
564                 ret
565         }
566         
567         // demonstrate the block_split failure: needs -O=inline
568         // mini -O=inline --compile Tests:test_0_split_block_bug iltests.exe
569         .method static public int32 test_0_split_block_bug () il managed {
571                 .locals init (
572                         int32 i1
573                 )
575                 ldc.i4 1
576                 stloc i1
577  test_label:
578                 ldloc i1
579                 call void class Tests::do_nothing (int32)
580                 ldc.i4 0
581                 brtrue test_label
582                 
583                 ldc.i4 0
584                 ret
585         }
587         .method public void inline_do_nothing () il managed {
588                 ret
589         }
590         .method static public int32 test_1_checkthis_inlining () il managed {
591                 ldnull
592                 call instance void class Tests::inline_do_nothing ()
593                 ldc.i4 1
594                 ret
595         }
597         .class nested private auto ansi sealed beforefieldinit TailCallStruct 
598                 extends [mscorlib]System.ValueType {
599                 .field public int32 a
600                 .field public int32 b
601         }
603         .method static valuetype Tests/TailCallStruct tail1 (valuetype Tests/TailCallStruct arg) {
604                 ldarga 0
605                 ldarga 0
606                 ldfld int32 Tests/TailCallStruct::a
607                 ldc.i4.1
608                 add
609                 stfld int32 Tests/TailCallStruct::a
610                 ldarga 0
611                 ldarga 0
612                 ldfld int32 Tests/TailCallStruct::a
613                 ldc.i4.2
614                 add
615                 stfld int32 Tests/TailCallStruct::a
616                 ldarg.0
617                 ret
618         }
620         .method static valuetype Tests/TailCallStruct tail2 (valuetype Tests/TailCallStruct arg) {
621                 ldarg.0
622                 tail.
623                 call valuetype Tests/TailCallStruct Tests::tail1 (valuetype Tests/TailCallStruct)
624                 ret
625         }
627         .class nested private auto ansi sealed beforefieldinit TailCallStructBig
628                 extends [mscorlib]System.ValueType {
629                 .field public int32 a
630                 .field public int32 b
631                 .field public int32 c
632                 .field public int32 d
633                 .field public int32 e
634         }
636         .method static valuetype Tests/TailCallStructBig tail_vret_by_addr_inner (valuetype Tests/TailCallStructBig arg) {
637                 ldarga 0
638                 ldarga 0
639                 ldfld int32 Tests/TailCallStructBig::a
640                 ldc.i4.1
641                 add
642                 stfld int32 Tests/TailCallStructBig::a
643                 ldarg.0
644                 ret
645         }
647         .method static valuetype Tests/TailCallStructBig tail_vret_by_addr (valuetype Tests/TailCallStructBig arg) {
648                 ldarg.0
649                 tail.
650                 call valuetype Tests/TailCallStructBig Tests::tail_vret_by_addr_inner (valuetype Tests/TailCallStructBig)
651                 ret
652         }
654         .method static public int32 test_3_tail_call_vret_by_addr () il managed {
655                 .maxstack 16
656                 .locals init (
657                         valuetype Tests/TailCallStructBig arg2
658                 )
660                 ldloca 0
661                 ldc.i4.2
662                 stfld int32 Tests/TailCallStructBig::a
663                 ldloc.0
664                 call valuetype Tests/TailCallStructBig Tests::tail_vret_by_addr (valuetype Tests/TailCallStructBig)
665                 stloc.0
667                 ldloca 0
668                 ldfld int32 Tests/TailCallStructBig::a
669                 ret
670         }
672         .method static public int32 test_9_tail_call_vret_by_val () il managed {
673                 .maxstack 16
674                 .locals init (
675                         valuetype Tests/TailCallStruct arg
676                 )
677                 ldloca 0
678                 ldc.i4.2
679                 stfld int32 Tests/TailCallStruct::a
680                 ldloca 0
681                 ldc.i4.4
682                 stfld int32 Tests/TailCallStruct::b
683                 ldloc.0
684                 call valuetype Tests/TailCallStruct Tests::tail2 (valuetype Tests/TailCallStruct)
685                 stloc.0
687                 ldloca 0
688                 ldfld int32 Tests/TailCallStruct::a
689                 ldloca 0
690                 ldfld int32 Tests/TailCallStruct::b
691                 add
692                 ret
693         }
695         .method static public int32 tail3 (int32 i, int32 j) il managed {
696                 ldarg.0
697                 ldarg.1
698                 add
699                 ret
700         }
702         .method static public int32 tail4 (int32 i, int32 j) il managed {
703                 .maxstack 16
704                 .locals init (
705                         int32 k)
707                 // Test arg0 allocated to a register
708                 ldarg.0
709                 ldarg.0
710                 ldarg.0
711                 ldarg.0
712                 add
713                 add
714                 add
715                 starg 0
717                 // Test switched up argument variables as the actual arguments
718                 ldarg.1
719                 ldarg.0
720                 tail.
721                 call int32 Tests::tail3 (int32, int32)
722                 ret
723         }
725         .method static public int32 test_24_tail_calls2 () il managed {
726                 // Some platforms might not be able to AOT tail calls
727                 .custom instance void class [TestDriver]CategoryAttribute::'.ctor'(string) =  (01 00 08 21 46 55 4C 4C 41 4F 54 00 00 ) // ...!FULLAOT..
729                 .maxstack 16
730                 .locals init (
731                         int32 i,
732                         int32 j)
734                 ldc.i4.4
735                 stloc.0
736                 ldc.i4.8
737                 stloc.1
739                 ldloc.0 
740                 ldloc.1
741                 call int32 Tests::tail4 (int32, int32)
742                 ret
743         }
745         .method public static int32 test_5_jmp () cil managed {
746                 // Some platforms might not be able to AOT tail calls
747                 .custom instance void class [TestDriver]CategoryAttribute::'.ctor'(string) =  (01 00 08 21 46 55 4C 4C 41 4F 54 00 00 ) // ...!FULLAOT..
749                 ldc.i4.1
750                 ldc.i4.2
751                 call int32 Tests::jmp2 (int32, int32)
752                 ret
753         }
755         .method public static int32 jmp2 (int32, int32) cil managed {
756                 ldarg.0
757                 ldc.i4.1
758                 add
759                 starg.s 0
760                 ldarg.1
761                 ldc.i4.1
762                 add
763                 starg.s 1
764                 jmp int32 Tests::jmp3 (int32, int32)
765                 ldc.i4.0
766                 ret
767         }               
769         .method public static int32 jmp3 (int32 i, int32 j) cil managed {
770                 ldarg.0
771                 ldarg.1
772                 add
773                 ret
774         }
776         .method static public int32 test_11_switch_with_nonempty_stack () il managed {
777                 .maxstack 16
779                 ldc.i4.5
780                 ldc.i4.6
781                 ldc.i4.1
782                 switch (L0, L1)
783         L0: 
784                 add
785                 ret
786         L1:
787                 add
788                 ret
789         }
791     .method public static int32 test_5_endfinally_with_nonempty_stack () il managed {
792                 .maxstack 16
794         .try {
795           leave IL_0
796         }
797         finally  {
798           ldc.i4.0
799           endfinally
800         }
801         IL_0:  ldc.i4.5
802                 ret
803     }
805     .method public static int32 test_5_endfinally_llvm_linking () il managed {
806                 .maxstack 16
808         .try {
809           leave IL_0
810         }
811         finally  {
812           ldc.i4.0
813                   dup
814                   brtrue L1
815                   pop
816                   br L2
817                 L1:
818                   pop
819                 L2:
820           endfinally
821         }
822         IL_0:  ldc.i4.5
823                 ret
824     }
826         .method public static int32 test_0_conv_ovf_i8_neg () il managed {
827                 .maxstack 16
829                 ldc.i4.m1
830                 conv.ovf.i8
831                 conv.i4
832                 ldc.i4.m1
833                 beq L_OK
834                 ldc.i4.1
835                 ret
836         L_OK:
837                 ldc.i4.0
838                 ret
839         }               
841         .method public static int32 test_1234_conv_u4 () cil managed {
842                 .maxstack 16
844                 ldc.i4 1234
845                 conv.u4
846                 conv.i4
847                 ret
848         }
850         .method public static int32 test_0_conv_ovf_i_un () cil managed {
851                 .maxstack 16
853                 ldc.i4 1234
854                 conv.ovf.i.un
855                 conv.i4
856                 ldc.i4 1234
857                 beq L1
858                 ldc.i4.1
859                 ret
860         L1:
861                 ldc.i4 0x7fffffff
862                 conv.ovf.i.un
863                 conv.i4
864                 ldc.i4 0x7fffffff
865                 beq L2
866                 ldc.i4.2
867                 ret
868         L2:
869                 sizeof [mscorlib]System.IntPtr
870                 ldc.i4 8
871                 beq L5
872                 .try {
873                         ldc.i4 0x80000000
874                         conv.ovf.i.un
875                         leave L4
876                 } catch [mscorlib]System.OverflowException {
877                         pop
878                         leave L5
879                 }
880         L4: 
881                 ldc.i4.3
882                 ret
883         L5:
884                 ldc.i4.0
885                 ret
886         }
888         .method public static int32 test_0_conv_ovf_u_un () cil managed {
889                 .maxstack 16
891                 ldc.i4 1234
892                 conv.ovf.u.un
893                 conv.i4
894                 ldc.i4 1234
895                 beq L1
896                 ldc.i4.1
897                 ret
898         L1:
899                 ldc.i4.0
900                 ret
901         }
903         .method public static int32 test_0_conv_ovf_i () cil managed {
904                 .maxstack 16
906                 ldc.i4 1234
907                 conv.ovf.i
908                 conv.i4
909                 ldc.i4 1234
910                 beq L1
911                 ldc.i4.1
912                 ret
913         L1:
914                 ldc.i4.0
915                 ret
916         }
918         .method public static int32 test_0_conv_ovf_u () cil managed {
919                 .maxstack 16
921                 ldc.i4 1234
922                 conv.ovf.u
923                 conv.i4
924                 ldc.i4 1234
925                 beq L1
926                 ldc.i4.1
927                 ret
928         L1:
929                 ldc.i4.0
930                 ret
931         }
933         .method public static int32 test_1234_conv_ovf_i8_un () cil managed {
934                 .maxstack 16
936                 ldc.i4 1234
937                 conv.ovf.i8.un
938                 conv.i4
939                 ret
940         }
942         .method public static int32 test_0_lconv_ovf_i () cil managed {
943                 .maxstack 16
945                 ldc.i4 1234
946                 conv.i8
947                 conv.ovf.i
948                 conv.i4
949                 ldc.i4 1234
950                 beq L1
951                 ldc.i4.1
952                 ret
953         L1:
954                 ldc.i4.0
955                 ret
956         }
958         .method public static int32 test_0_lconv_ovf_u () cil managed {
959                 .maxstack 16
961                 ldc.i4 1234
962                 conv.i8
963                 conv.ovf.u
964                 conv.i4
965                 ldc.i4 1234
966                 beq L1
967                 ldc.i4.1
968                 ret
969         L1:
970                 ldc.i4.0
971                 ret
972         }
974         .method public static int32 test_0_lconv_ovf_i_un () cil managed {
975                 .maxstack 16
977                 ldc.i4 1234
978                 conv.i8
979                 conv.ovf.i.un
980                 conv.i4
981                 ldc.i4 1234
982                 beq L1
983                 ldc.i4.1
984                 ret
985         L1:
986                 ldc.i4.0
987                 ret
988         }
990         .method public static int32 test_0_lconv_ovf_u_un () cil managed {
991                 .maxstack 16
993                 ldc.i4 1234
994                 conv.i8
995                 conv.ovf.u.un
996                 conv.i4
997                 ldc.i4 1234
998                 beq L1
999                 ldc.i4.1
1000                 ret
1001         L1:
1002                 ldc.i4.0
1003                 ret
1004         }
1006         .method public static int32 test_0_lconv_to_ovf_i8 () cil managed {
1007                 .maxstack 16
1009                 ldc.i4 1234
1010                 conv.i8
1011                 conv.ovf.i8
1012                 conv.i4
1013                 ldc.i4 1234
1014                 beq L1
1015                 ldc.i4.1
1016                 ret
1017         L1:
1018                 ldc.i4.0
1019                 ret
1020         }
1022         .method public static int32 test_0_lconv_to_ovf_u8_un () cil managed {
1023                 .maxstack 16
1025                 ldc.i4 1234
1026                 conv.i8
1027                 conv.ovf.u8.un
1028                 conv.i4
1029                 ldc.i4 1234
1030                 beq L1
1031                 ldc.i4.1
1032                 ret
1033         L1:
1034                 ldc.i4.0
1035                 ret
1036         }
1038         .method public static int32 test_2_lconv_to_ovf_i4_un () cil managed {
1039                 .maxstack 16
1040                 .locals init (int32 res)
1042                 ldc.i4 0x7fffffff
1043                 conv.u8
1044                 conv.ovf.i4.un
1045                 pop
1047                 ldc.i4.2
1048                 stloc res
1050         .try {
1051                         ldc.i8 0x80000000
1052                         conv.ovf.i4.un
1053                         pop
1054                         ldc.i4.0
1055                         stloc res
1056                         leave RET
1057                 } catch [mscorlib]System.OverflowException {
1058                         pop
1059                         leave IL_0
1060                 }
1062         IL_0:
1064         .try {
1065                         ldc.i8 0xffffffff80000000
1066                         conv.ovf.i4.un
1067                         pop
1068                         ldc.i4.1
1069                         stloc res
1070                         leave RET
1071                 } catch [mscorlib]System.OverflowException {
1072                         pop
1073                         leave RET
1074                 }
1076         RET:
1077                 ldloc res
1078                 ret
1079         }
1081     .method public static int32 test_1_lconv_to_ovf_i_un () cil managed {
1082                 .maxstack 16
1083                 .locals init (int32 res)
1085                 ldc.i4 0x7fffffff
1086                 conv.u8
1087                 conv.ovf.i.un
1088                 conv.i4
1089                 pop
1091                 ldc.i4.1
1092                 ret
1093         }
1095         .method public static int32 test_32_lconv_to_u8 () cil managed
1096         {
1097                 .maxstack 16
1099                 ldc.i4 32
1100                 conv.i8
1101                 conv.u8
1102                 conv.i4
1103                 ret
1104         }                               
1106         .method public static int32 test_32_lconv_to_i8 () cil managed
1107         {
1108                 .maxstack 16
1110                 ldc.i4 32
1111                 conv.i8
1112                 conv.i8
1113                 conv.i4
1114                 ret
1115         }                               
1117         .method public static int32 test_15_lconv_to_u () cil managed
1118         {
1119         ldc.i8 0x10000000f
1120                 conv.u
1121                 conv.i4
1122                 ret
1123         }
1125         .method public static int32 test_1234_fconv_u () cil managed {
1126                 .maxstack 16
1128                 ldc.r8 1234.0
1129                 conv.u
1130                 conv.i4
1131                 ret
1132         }
1134         .method public static int32 test_0_get_type_from_handle_on_bblock_boundary () cil managed 
1135         {
1136                 .maxstack 16
1137         
1138                 ldc.i4.1
1139                 brfalse OBJECT
1140         
1141                 ldtoken [mscorlib]System.String
1142                 br AFTER
1143         OBJECT:
1144                 ldtoken [mscorlib]System.Object
1145         AFTER:
1146                 call class [mscorlib]'System.Type' class [mscorlib]'System.Type'::'GetTypeFromHandle'(valuetype [mscorlib]'System.RuntimeTypeHandle')
1147                 callvirt instance string class [mscorlib]System.Type::get_FullName ()
1148                 ldstr "System.String"
1149                 callvirt instance bool class [mscorlib]System.Object::Equals(object)
1150                 ldc.i4.0
1151                 ceq
1152                 ret 
1153         }
1154                 
1155         .method public static int32 test_0_bug59580  ()
1156         {
1157                 ldc.r4          float32(0x7FC00000)
1158                 ldc.r4          float32(0x7FC00000)
1159                 bge.un          pass
1160                 br              fail
1161         pass:
1162                 ldc.i4.0
1163                 ret
1164         fail:
1165                 ldc.i4.1
1166                 ret
1167         }
1168         
1169         .method public static int32 test_1_bug60056  () {
1170                 .locals init (int32 m5)
1171                         
1172                 ldc.i4.m1
1173                 stloc.0
1174                 
1175                 ldc.i4.1
1176                 conv.u8
1177                 
1178                 ldloc.0
1179                 conv.i8
1180                 mul
1181                 
1182                 ldc.i4.m1
1183                 conv.i8
1184                 ceq
1185                 ret
1186         }
1187         
1188         .method public static int32 test_1_conv_u8_cfold  () {
1189                 ldc.i4.m1
1190                 conv.u8
1191                 
1192                 ldc.i8 0x00000000ffffffff
1193                 
1194                 ceq
1195                 ret
1196         }
1197         
1198         .method public static int32 test_1_array_type_mismatch_ldelema  () {
1199                 .locals init (int32 r)
1200                 
1201                         ldc.i4.1
1202                         newarr string
1203                         ldc.i4.0 
1204                         ldelema string
1205                         pop
1206                 
1207                 .try {
1208                         ldc.i4.1
1209                         newarr string
1210                         ldc.i4.0 
1211                         ldelema object
1212                         pop
1213                         
1214                         leave end
1215                 } catch [mscorlib]System.ArrayTypeMismatchException {
1216                         pop
1217                         ldc.i4.1
1218                         stloc.0
1219                         leave end
1220                 }
1221         end:
1222                 ldloc.0
1223                 ret
1224         }
1226         .method public static int32 test_1_conv_ovf_i8_with_i4 () {
1227                         ldc.i4.m1 
1228                         conv.ovf.i8
1229                         conv.ovf.i4
1230                         neg
1231                         ret
1232         }
1234         // bug #72148
1235     .method public static int32 test_0_initlocals_float_ptr () {
1236         .maxstack 3
1237         .locals init (
1238                 float32[]       V_0,
1239                 float32& pinned V_1,
1240                 unsigned int32  V_2)
1241                         ldc.i4.s 0x0f
1242                         newarr [mscorlib]System.Single
1243                         stloc.0 
1244                         ldloc.0 
1245                         ldc.i4.0 
1246                         ldc.r4 1.13
1247                         stelem.r4 
1248                         ldloc.0 
1249                         ldc.i4.0 
1250                         ldelema [mscorlib]System.Single
1251                         stloc.1 
1252                         ldloc.1 
1253                         conv.i 
1254                         ldind.u4 
1255                         stloc.2 
1256                         ldc.i4.0
1257                         ret
1258         }
1260         .method public static int32 test_7_conv_ovf_u8_un () {
1261         .maxstack  2
1262         .locals    init (unsigned int64)
1264         ldc.i4.7
1265         conv.ovf.u8.un
1266         stloc.0
1267                 ldloc.0
1268                 conv.i4
1269         ret
1270         }
1272         .method public static int32 test_7_conv_ovf_u4_un () {
1273         .maxstack  2
1274         .locals    init (unsigned int32)
1276         ldc.i4.7
1277         conv.ovf.u4.un
1278         stloc.0
1279                 ldloc.0
1280                 conv.i4
1281         ret
1282         }
1284         .method public static int32 test_1_bug_74591 () {
1285                 .maxstack 16
1286                 .locals init (int32)
1288                 ldc.i4.m1
1289                 stloc.0
1290                 ldloc.0
1291                 conv.ovf.i8
1292                 ldc.i4.m1
1293                 conv.ovf.i8
1294                 mul.ovf
1295                 conv.i4
1296                 ret
1297         }
1299         .class nested public auto ansi Integer
1300                 extends [mscorlib]System.Object {
1302                 .field public bool n
1304             .method public hidebysig  specialname  rtspecialname 
1305            instance default void .ctor (unsigned int64 i, bool n)  cil managed 
1306             {
1307                         .maxstack 8
1308                         ldarg.0
1309                         call instance void class [mscorlib]System.Object::.ctor()
1310                         ldarg.0
1311                         ldarg.2
1312                         stfld bool Tests/Integer::n
1313                         ret
1314                 }
1315         }
1317         .method public static int32 test_1_bug_74726 () {
1318                 .maxstack 16
1320                 ldc.i4.2
1321                 conv.ovf.u8
1322                 ldc.i4.1
1323                 conv.ovf.u8
1324                 mul.ovf.un
1325                 ldc.i4.1
1326                 newobj instance void class Tests/Integer::.ctor(unsigned int64, bool)
1327                 ldfld bool Tests/Integer::n
1328                 ldc.i4.1
1329                 ceq
1330                 ret
1331         }
1333         .class nested private auto ansi sealed xxx
1334         extends [mscorlib]System.ValueType
1335    {
1336      .field  public   object a
1338      .method public hidebysig  specialname  rtspecialname 
1339             instance default void .ctor ()  cil managed 
1340      {
1341                  .maxstack 8
1342                  ret 
1343      }
1344    } // end of class xxx
1346         .method public static int32 test_0_newobj_vtype () {
1347                 .maxstack 6
1348                 .locals init (
1349                         valuetype Tests/xxx V_0
1350                 )
1352                 newobj instance void valuetype Tests/xxx::.ctor ()
1353                 stloc.0
1354                 ldloca.s 0
1355                 ldfld object Tests/xxx::a
1356                 brfalse OK
1357                 ldc.i4.s 1
1358                 ret
1359         OK:
1360                 ldc.i4.s 0
1361                 ret
1362         }
1364         .method public static int32 test_0_newobj_vtype_primitive () {
1365                 .maxstack 6
1366                 .locals init (
1367                         native int V_0
1368                 )
1370                 ldc.i4.s 10
1371                 newobj instance void native int::'.ctor'(int32)
1372                 stloc.0
1373                 ldloc.0
1374                 ldc.i4.s 10
1375                 beq OK
1376                 ldc.i4.s 1
1377                 ret
1378         OK:
1379                 ldc.i4.s 0
1380                 ret
1381         }
1383         .method public static int32 test_1_filters () {
1384                 .custom instance void [TestDriver]CategoryAttribute::.ctor(string) = ( 01 00 08 21 42 49 54 43 4F 44 45 00 00 )          // ...!BITCODE..
1385                 .maxstack 16
1386                 .locals init (
1387                         int32 res
1388                 )
1390                 .try { // 0
1391                         .try {
1392                                 ldstr "OnErrorSub test Exception"
1393                                 newobj instance void class [mscorlib]System.Exception::.ctor(string)
1394                                 throw 
1395                                 leave.s IL_0033
1396                         }
1397                         filter {
1398                                 pop
1399                                 ldc.i4.0
1400                                 endfilter
1401                         } {
1402                                 pop
1403                                 // Should not be called
1404                                 ldc.i4.2
1405                                 stloc res
1406                                 leave.s IL_0033
1407                         }
1408                 }
1409                 filter {
1410                         pop
1411                         ldc.i4.1
1412                         endfilter 
1413                 } {
1414                   pop
1415                   ldc.i4.1
1416                   stloc res       
1417                   leave.s IL_0033
1419                 }
1420                 IL_0033:
1421                 ldloc res
1422                 ret
1423         }
1425         .class nested private auto ansi sealed beforefieldinit TheStruct
1426                 extends [mscorlib]System.ValueType {
1427                 .field public int32 a
1428                 .field public int32 b
1429         }
1431         .method public static int32 test_5_cpobj () {
1432                 .maxstack 8
1433                 .locals init (  
1434                                 valuetype Tests/TheStruct v_0, 
1435                                 valuetype Tests/TheStruct v_1
1436                                          )
1438                 ldloca v_0
1439                 ldc.i4.2
1440                 stfld int32 Tests/TheStruct::a
1442                 ldloca v_0
1443                 ldc.i4.3
1444                 stfld int32 Tests/TheStruct::b
1446                 ldloca v_1
1447                 ldloca v_0
1448                 cpobj Tests/TheStruct
1450                 ldloca v_1
1451                 ldfld int32 Tests/TheStruct::a
1452                 ldloca v_1
1453                 ldfld int32 Tests/TheStruct::b
1454                 add
1456                 ret
1457         }
1459         .method public static int32 test_5_ldobj_stloc_optimization () {
1460                 .maxstack 8
1461                 .locals init (  
1462                                 valuetype Tests/TheStruct v_0, 
1463                                 valuetype Tests/TheStruct v_1
1464                                          )
1466                 ldloca v_0
1467                 ldc.i4.2
1468                 stfld int32 Tests/TheStruct::a
1470                 ldloca v_0
1471                 ldc.i4.3
1472                 stfld int32 Tests/TheStruct::b
1474                 ldloca v_0
1475                 ldobj valuetype Tests/TheStruct
1476                 stloc.s v_1
1478                 ldloca v_1
1479                 ldfld int32 Tests/TheStruct::a
1480                 ldloca v_1
1481                 ldfld int32 Tests/TheStruct::b
1482                 add
1484                 ret
1485         }
1487         .method public static int32 test_1_cpobj_reference () {
1488                 .maxstack 8
1489                 .locals init (  
1490                                 object v_0, 
1491                                 object v_1
1492                                          )
1494                 newobj instance void object::.ctor()
1495                 stloc v_0
1497                 ldloca v_1
1498                 ldloca v_0
1499                 cpobj object
1501                 ldloc v_0
1502                 ldloc v_1
1503                 ceq
1504                 ret
1505         }
1507         .method public static int32 test_1_initobj_reference () {
1508                 .maxstack 8
1509                 .locals init (  
1510                                 object v_0
1511                                          )
1513                 newobj instance void object::.ctor()
1514                 stloc v_0
1516                 ldloca v_0
1517                 initobj object
1519                 ldloc v_0
1520                 ldnull
1521                 ceq
1522                 ret
1523         }
1525         .method public static int32 test_1_ldobj_reference () {
1526                 .maxstack 8
1527                 .locals init (  
1528                                 object v_0
1529                                          )
1531                 newobj instance void object::.ctor()
1532                 stloc v_0
1534                 ldloc v_0
1535                 ldloca v_0
1536                 ldobj object
1537                 ceq
1538                 ret
1539         }
1541         .method public static int32 test_5_vtype_on_bb_boundary () {
1542                 .maxstack 8
1543                 .locals init (  
1544                                 valuetype Tests/TheStruct v_0, 
1545                                 valuetype Tests/TheStruct v_1
1546                                          )
1548                 ldloca v_0
1549                 ldc.i4.2
1550                 stfld int32 Tests/TheStruct::a
1552                 ldloca v_0
1553                 ldc.i4.3
1554                 stfld int32 Tests/TheStruct::b
1556                 ldloc v_0
1557                 br L_0
1558         L_0: stloc v_1
1560                 ldloca v_1
1561                 ldfld int32 Tests/TheStruct::a
1562                 ldloca v_1
1563                 ldfld int32 Tests/TheStruct::b
1564                 add
1565                 ret
1566         }
1568         .method public static int32 test_5_different_in_stacks () cil managed {
1569                 .maxstack 16
1571                         ldc.i4.1
1572                         ldc.i4.1
1573                         beq L_0
1575                         ldc.i4.3
1576                         ldc.i4.3
1577                         br L_1
1578                         ldc.i4.3
1579                         ldc.i4.3
1580                         br L_2
1581          L_0:   ldc.i4.2
1582                         ldc.i4.3
1583                         ldc.i4.1
1584                         ldc.i4.1
1585                         beq L_2
1586          L_1:   add
1587                         ret
1588          L_2:   add
1589                         ret
1590         }
1592         .method public static int32 test_3_larray_get_set () {
1593                 .locals init (
1594                         int32[2]        V_0)
1595                           
1596                         ldc.i4.2 
1597                         newobj instance void int32[0...]::.ctor(int32)
1598                         stloc.0 
1599                         ldloc.0 
1600                         ldc.i4.0 
1601                         ldc.i4 1
1602                         call instance void int32[0...]::Set(int32, int32)
1603                     ldloc.0 
1604                     ldc.i4.1 
1605                         ldc.i4 2
1606                         call instance void int32[0...]::Set(int32, int32)
1608                         ldloc.0
1609                         ldc.i4.0
1610                         call instance int32 int32[0...]::Get(int32)
1611                         ldloc.0
1612                         ldc.i4.1
1613                         call instance int32 int32[0...]::Get(int32)
1614                         add
1615                         ret
1616         }
1618         .method public static int32 test_0_pop_side_effects () {
1619                 .try {
1620                         ldc.r8 1
1621                         ldc.r8 0
1622                         div
1623                         ckfinite
1624                         pop
1625                         leave FAIL
1626                 }
1627                 catch [mscorlib]System.ArithmeticException {
1628                         pop
1629                         leave L_0
1630                 }
1631                 L_0:
1632                 ldc.i4.0
1633                 ret
1634                 FAIL:
1635                 ldc.i4.1
1636                 ret
1637         }
1639         .method public static void regalloc_regress_78314_helper (object o) cil managed
1640         {
1641                 ret
1642         }
1644         .method public static int32 test_1_regalloc_regress_78314 () cil managed
1645         {
1646     // Code size       68 (0x44)
1647     .maxstack  6
1648     .locals init (int32 V_0, bool V_1)
1649     IL_0000:  ldc.i4.0
1650     IL_0001:  stloc.0
1651     IL_0002:  br.s       IL_003b
1653     IL_0004:
1654     IL_001e:  ldc.i4.s   10
1655     IL_0020:  ldloc.0
1656     IL_0021:  shl
1657     IL_0022:  ldc.i4.s   10
1658     IL_0024:  ldloc.0
1659     IL_0025:  shl
1660     IL_0026:  ceq
1661     IL_0028:  box        [mscorlib]System.Boolean
1662     IL_0032:  call       void Tests::regalloc_regress_78314_helper(object)
1663     IL_0037:  ldloc.0
1664     IL_0038:  ldc.i4.1
1665     IL_0039:  add
1666     IL_003a:  stloc.0
1667     IL_003b:  ldloc.0
1668     IL_003c:  ldc.i4.8
1669     IL_003f:  blt.s      IL_0004
1671         ldloc.0
1672         ldc.i4.8
1673         ceq
1674         conv.i4
1675         ret     
1676   }
1678         .method public static void try_block_end_remove_if_useless () cil managed {
1679             .maxstack  8
1681             T_START:
1682                 ldstr   "Start"
1683                         pop
1684                 leave.s COMPLETE
1685             T1_END:
1687             COMPLETE:
1688                 ret
1690             F1_START:
1691                 ldstr   "Finally1"
1692                         pop
1693                 endfinally
1694             F1_END:
1696             .try T_START to T1_END finally handler F1_START to F1_END
1697         }
1699         .method public static int32 test_0_try_block_end_remove_if_useless () cil managed {
1700                 call void class Tests::try_block_end_remove_if_useless ()
1701                 ldc.i4.0
1702                 ret
1703         }
1705    .method private static int32 test_0_regress_78629_switch_next_ins_target ()  cil managed
1706     {
1707         ldc.i4.0
1708         switch (target)
1709         target: ldstr "bar"
1710                 pop
1711                 ldc.i4.0
1712         ret
1713     }
1715         // This belongs to basic-float.cs, but its hard to tell mcs/csc to
1716         // generate the non .un version of the opcodes
1717     .method private static  hidebysig 
1718            default int32 test_4_float_branch_nan ()  cil managed 
1719     {
1720         // Method begins at RVA 0x27a4
1721         // Code size 74 (0x4a)
1722         .maxstack 2
1723         .locals init (
1724                 float64 V_0,
1725                 float64 V_1,
1726                 int32   V_2)
1727         IL_0000:  ldc.r8 (00 00 00 00 00 00 f8 ff)
1728         IL_0009:  stloc.0 
1729         IL_000a:  ldc.r8 1.
1730         IL_0013:  stloc.1 
1731         IL_0014:  ldc.i4.0 
1732         IL_0015:  stloc.2 
1733         IL_0016:  ldloc.0 
1734         IL_0017:  ldloc.1 
1735         IL_0018:  bge.s IL_001a
1737                                 br L1
1738         IL_001a:  ldloc.2 
1739         IL_001b:  ret 
1740         L1:
1741         IL_001c:  ldloc.2 
1742         IL_001d:  ldc.i4.1 
1743         IL_001e:  add 
1744         IL_001f:  stloc.2 
1745         IL_0020:  ldloc.0 
1746         IL_0021:  ldloc.1 
1747         IL_0022:  ble.s IL_002e
1748                                 br L2
1749         IL_002e:  ldloc.2 
1750         IL_002f:  ret 
1751         L2:
1752         IL_0030:  ldloc.2 
1753         IL_0031:  ldc.i4.1 
1754         IL_0032:  add 
1755         IL_0033:  stloc.2 
1756         IL_0034:  ldloc.0 
1757         IL_0035:  ldloc.1 
1758         IL_0036:  blt.s IL_0038
1759                                 br L3           
1760         IL_0038:  ldloc.2 
1761         IL_0039:  ret 
1762         L3:
1763         IL_003a:  ldloc.2 
1764         IL_003b:  ldc.i4.1 
1765         IL_003c:  add 
1766         IL_003d:  stloc.2 
1767         IL_003e:  ldloc.0 
1768         IL_003f:  ldloc.1 
1769         IL_0040:  bgt.s IL_0042
1770                                 br L4
1771         IL_0042:  ldloc.2 
1772         IL_0043:  ret 
1773         L4:
1774         IL_0044:  ldloc.2 
1775         IL_0045:  ldc.i4.1 
1776         IL_0046:  add 
1777         IL_0047:  stloc.2 
1778         IL_0048:  ldloc.2 
1779         IL_0049:  ret 
1780     } // end of method Tests::test_5_float_branch_nan
1782     .method private static  hidebysig
1783            default void regress_80622_inner (object x)  cil managed
1784     {
1785                 .locals init (unsigned int8 i)
1786         // Method begins at RVA 0x2050
1787         // Code size 14 (0xe)
1788         .maxstack 8
1789         IL_1000:  ldarg.0
1790         IL_1001:  unbox unsigned int8
1791         IL_1006:  ldobj unsigned int8
1792         IL_000b:  conv.ovf.i4.un
1793         IL_000c:  pop
1794         IL_000d:  ret
1795     }
1797     // method line 2
1798     .method private static  hidebysig
1799            default int32 test_0_regress_80622 ()  cil managed
1800     {
1801         .maxstack 8
1802         IL_0000:  ldc.i4 255
1803         IL_0005:  box unsigned int8
1804         IL_000a:  call void class Tests::regress_80622_inner (object)
1805                 ldc.i4.0
1806         IL_000f:  ret
1807     }
1809         .method private static default int32 test_0_regresss_80190 () cil managed
1810         {
1811             .maxstack  2
1812             .locals init (int32 V_0,
1813                      int32* V_1)
1814             IL_0000:  nop
1815             IL_0001:  nop
1816             IL_0002:  ldloca.s   V_0
1817             IL_0004:  conv.u
1818             IL_0005:  stloc.1
1819             IL_0006:  ldloc.1
1820             IL_0007:  ldc.i4.3
1821             IL_0008:  stind.i4
1822             IL_0009:  nop
1823                                   ldc.i4.0
1824                                   ret
1825         }
1827         .class interface nested public auto ansi abstract IFaceWithStaticMethod
1828         {
1829             .method public static  specialname 
1830                default void foo ()  cil managed noinlining 
1831             {
1832                 .maxstack 0
1833                 IL_0000:  ret 
1834         }
1835         }
1836         
1837         .class nested public auto ansi AClass extends [mscorlib]System.Object implements Tests/IFaceWithStaticMethod
1838         {
1839             .method public hidebysig  specialname  rtspecialname 
1840            instance default void .ctor ()  cil managed 
1841             {
1842                         .maxstack 8
1843                         ret
1844                 }
1846         }
1848         // Test that static methods in interfaces are ignored during vtable construction
1849         .method private static default int32 test_0_ifaces_with_static_methods () cil managed
1850         {
1851                 .maxstack 16
1853                 newobj instance void class Tests/AClass::.ctor()
1854                 pop
1855                 ldc.i4.0
1856                 ret
1857         }
1859         .method private static hidebysig default int32 Foo<T> (!!T n)  cil managed {
1860                 ldarg.0
1861                 box !!0
1862                 brtrue HAS_VALUE
1863                 ldc.i4.0
1864                 ret
1865 HAS_VALUE:      ldc.i4.1
1866                 ret
1867         }
1869         // bug 78019
1870         .method static public int32 test_0_nullable_box_brtrue () cil managed {
1872                 .locals init (valuetype [mscorlib]System.Nullable`1<int32> V_0)
1874                 ldloc.0
1875                 call int32 class Tests::Foo<valuetype [mscorlib]System.Nullable`1<int32>> (!!0)
1876                 ret
1877         }
1879         //Bug 372410
1880         .method static public int32 test_0_ldelema_type_check () cil managed {
1881                 .maxstack 16
1882                 .locals init (object[] V_0,
1883                                           object[,] V_1)
1885                 ldc.i4.1
1886                 newarr object
1887                 stloc.0
1889                 .try {
1890                         ldloc.0
1891                         ldc.i4.0
1892                         ldelema object
1893                         leave L1
1894                 } catch [mscorlib]System.ArrayTypeMismatchException {
1895                         leave ERROR1
1896                 }
1898         L1:
1899                 ldc.i4.1
1900                 newarr string
1901                 stloc.0
1903                 .try {
1904                         ldloc.0
1905                         ldc.i4.0
1906                         ldelema object
1907                         leave ERROR2
1908                 } catch [mscorlib]System.ArrayTypeMismatchException {
1909                         leave L2
1910                 }
1912         L2:
1913                         ldc.i4.1
1914                 newarr string
1915                 stloc.0
1917                 .try {
1918                         ldloc.0
1919                         ldc.i4.0
1920                         readonly. ldelema object
1921                         leave L3
1922                 } catch [mscorlib]System.ArrayTypeMismatchException {
1923                         leave ERROR3
1924                 }
1926         L3:
1927                 ldc.i4.0
1928                 ret
1931         ERROR1:
1932                 ldc.i4.1
1933                 ret
1935         ERROR2:
1936                 ldc.i4.2
1937                 ret
1939         ERROR3:
1940                 ldc.i4.3
1941                 ret
1942         }
1945         //Bug 372410
1946         .method static public int32 test_0_array_address_type_check () cil managed {
1947                 .maxstack 16
1948                 .locals init (object[] V_0,
1949                                           object[,] V_1)
1951                 ldc.i4.1 
1952             ldc.i4.1 
1953             newobj instance void object[,]::.ctor(int32, int32)
1954                 stloc.1
1956                 .try {
1957                         ldloc.1
1958                         ldc.i4.0
1959                         ldc.i4.0
1960                         call instance object&  object[,]::Address(int32, int32)
1961                         leave L4
1962                 } catch [mscorlib]System.ArrayTypeMismatchException {
1963                         leave ERROR4
1964                 }
1966         L4:
1967                 ldc.i4.1 
1968             ldc.i4.1 
1969             newobj instance void string[,]::.ctor(int32, int32)
1970                 stloc.1
1972                 .try {
1973                         ldloc.1
1974                         ldc.i4.0
1975                         ldc.i4.0
1976                         call instance object&  object[,]::Address(int32, int32)
1977                         leave ERROR5
1978                 } catch [mscorlib]System.ArrayTypeMismatchException {
1979                         leave L5
1980                 }
1982         L5:
1983                 ldc.i4.1 
1984             ldc.i4.1 
1985             newobj instance void string[,]::.ctor(int32, int32)
1986                 stloc.1
1988                 .try {
1989                         ldloc.1
1990                         ldc.i4.0
1991                         ldc.i4.0
1992                         readonly. call instance object&  object[,]::Address(int32, int32)
1993                         leave L6
1994                 } catch [mscorlib]System.ArrayTypeMismatchException {
1995                         leave ERROR6
1996                 }
1998         L6:
1999                 ldc.i4.0
2000                 ret
2001         ERROR4:
2002                 ldc.i4.4
2003                 ret
2005         ERROR5:
2006                 ldc.i4.5
2007                 ret
2009         ERROR6:
2010                 ldc.i4.6
2011                 ret
2012         }
2014         .field public  static unsigned int64 'ull'
2016         .field public  static int32 'shift2'
2018         .method public static int32 test_0_long_shift_regalloc () cil managed
2019         {
2020                 .locals init (unsigned int32 'cilsimp.28', unsigned int64 'cilsimp.27', int32 'cilsimp.26')
2022                 .maxstack 4
2024                 ldc.i8  81985529234382576
2025                 stsfld  unsigned int64 Tests::ull
2026             ldc.i4      60
2027                 stsfld  int32 Tests::shift2
2029                 ldsfld  unsigned int64 Tests::ull
2030                 stloc   'cilsimp.27'
2031                 ldsfld  int32 Tests::shift2
2032                 stloc   'cilsimp.28'
2033                 ldloc   'cilsimp.27'
2034                 ldloc   'cilsimp.28'
2035                 shr.un
2036                 ldloc   'cilsimp.27'
2037                 ldc.i4  64
2038                 ldloc   'cilsimp.28'
2039                 sub
2040                 shl
2041                 or
2042                 ldc.i8  1311768467750121216
2043                 ceq
2044                 ldc.i4.1
2045                 xor
2046                 conv.u4
2047                 ret
2048         }
2050         // Test calling ldfld directly on a vtype instead of a vtype address
2051         .method public static int32 test_5_call_ldfld_vtype () cil managed
2052         {
2053                 .maxstack 16
2054                 .locals init (
2055                         valuetype Tests/TailCallStruct arg
2056                 )
2057                 ldloca 0
2058                 ldc.i4.2
2059                 stfld int32 Tests/TailCallStruct::a
2060                 ldloca 0
2061                 ldc.i4.4
2062                 stfld int32 Tests/TailCallStruct::b
2063                 ldloc.0
2064                 call valuetype Tests/TailCallStruct Tests::tail2 (valuetype Tests/TailCallStruct)
2065                 ldfld int32 Tests/TailCallStruct::a
2066                 ret
2067         }
2069         .method public static int32 throw_ret () cil managed
2070         {
2071                 ldstr "FOO"
2072                 newobj instance void class [mscorlib]System.OverflowException::.ctor(string)
2073                 throw
2074                 ldc.i4.4
2075                 ret
2076         }
2078         .method public static int32 throw2_ret () cil managed
2079         {
2080                 // Disable inlining
2081                 ldc.i4.5
2082                 localloc
2083                 pop
2085                 call int32 Tests::throw_ret ()
2086                 ret
2087         }
2089         // Test inlining a method which contains just a throw
2090         .method public static int32 test_0_inline_throw () cil managed
2091         {
2092                 .maxstack 16
2093                 .locals init (
2094                                 int32 v_0
2095                 )
2097                 .try {
2098                         call int32 Tests::throw2_ret ()
2099                         stloc.0
2100                         leave L0
2101                 } catch [mscorlib]System.OverflowException {
2102                         pop
2103                         leave L1
2104                 }
2106                 L0:
2107                         ldc.i4.1
2108                         ret
2109                 L1:
2110                         ldc.i4.0
2111                         ret                     
2112         }
2114     .method public static int32 test_0_stelem_any_null_opt () cil managed
2115     {
2116                 .maxstack 16
2117                 .locals init (
2118                                 object[]        V_0,
2119                                 int32   V_1)
2121                 ldc.i4.s 10
2122                 newarr [mscorlib]System.Object
2123                 stloc.0
2125                 ldc.i4.0
2126                 stloc.1
2127                 br L0
2129         L1:
2130                 ldloc.0
2131                 ldloc.1
2132                 ldnull
2133                 stelem.any [mscorlib]System.Object
2134                 ldloc.1
2135                 ldc.i4.1
2136                 add
2137                 stloc.1
2138         L0:
2139                 ldloc.1
2140                 ldc.i4.s 10
2141                 blt L1
2143                 ldc.i4.0
2144                 ret
2145         }
2147     // method line 2
2148     .method public static  hidebysig 
2149            default int32 manyargs_callee (int32 a, int32 b, int32 c, int32 d, int32 e, int32 f, int32 g, int32 h, int32 i, int32 j, int32 k, int32 l, int32 m, int32 n, int32 o, int32 p)  cil managed 
2150     {
2151         // Method begins at RVA 0x20f4
2152         // Code size 44 (0x2c)
2153         .maxstack 8
2154         IL_0000:  ldarg.0 
2155         IL_0001:  ldarg.1 
2156         IL_0002:  add 
2157         IL_0003:  ldarg.2 
2158         IL_0004:  add 
2159         IL_0005:  ldarg.3 
2160         IL_0006:  add 
2161         IL_0007:  ldarg.s 4
2162         IL_0009:  add 
2163         IL_000a:  ldarg.s 5
2164         IL_000c:  add 
2165         IL_000d:  ldarg.s 6
2166         IL_000f:  add 
2167         IL_0010:  ldarg.s 7
2168         IL_0012:  add 
2169         IL_0013:  ldarg.s 8
2170         IL_0015:  add 
2171         IL_0016:  ldarg.s 9
2172         IL_0018:  add 
2173         IL_0019:  ldarg.s 10
2174         IL_001b:  add 
2175         IL_001c:  ldarg.s 11
2176         IL_001e:  add 
2177         IL_001f:  ldarg.s 12
2178         IL_0021:  add 
2179         IL_0022:  ldarg.s 13
2180         IL_0024:  add 
2181         IL_0025:  ldarg.s 14
2182         IL_0027:  add 
2183         IL_0028:  ldarg.s 15
2184         IL_002a:  add 
2185         IL_002b:  ret 
2186     } // end of method main::callee
2188     // method line 3
2189     .method public static  hidebysig 
2190            default int32 manyargs_tail_caller (int32 a, int32 b, int32 c, int32 d, int32 e, int32 f, int32 g, int32 h, int32 i, int32 j, int32 k, int32 l, int32 m, int32 n, int32 o, int32 p)  cil managed 
2191     {
2192         // Method begins at RVA 0x2124
2193         // Code size 34 (0x22)
2194         .maxstack 17
2195         IL_0000:  ldarg.0 
2196                           ldc.i4.1
2197                           add
2198         IL_0001:  ldarg.1 
2199         IL_0002:  ldarg.2 
2200         IL_0003:  ldarg.3 
2201         IL_0004:  ldarg.s 4
2202         IL_0006:  ldarg.s 5
2203         IL_0008:  ldarg.s 6
2204         IL_000a:  ldarg.s 7
2205         IL_000c:  ldarg.s 8
2206         IL_000e:  ldarg.s 9
2207         IL_0010:  ldarg.s 10
2208         IL_0012:  ldarg.s 11
2209         IL_0014:  ldarg.s 12
2210         IL_0016:  ldarg.s 13
2211         IL_0018:  ldarg.s 14
2212                           ldc.i4.1
2213                           add
2214         IL_001a:  ldarg.s 15
2215                           ldc.i4.1
2216                           add
2217                   tail.
2218         IL_001c:  call int32 class Tests::manyargs_callee(int32, int32, int32, int32, int32, int32, int32, int32, int32, int32, int32, int32, int32, int32, int32, int32)
2219         IL_0021:  ret 
2220     } // end of method main::caller
2222     // method line 4
2223     .method public static  hidebysig 
2224            default int32 test_139_many_args_tail_call ()  cil managed
2225     {
2226                 // Some platforms might not be able to AOT tail calls
2227                 .custom instance void class [TestDriver]CategoryAttribute::'.ctor'(string) =  (01 00 08 21 46 55 4C 4C 41 4F 54 00 00 ) // ...!FULLAOT..
2229         // Method begins at RVA 0x2154
2230         // Code size 43 (0x2b)
2231         .maxstack 17
2232         IL_0000:  ldc.i4.1 
2233         IL_0001:  ldc.i4.2 
2234         IL_0002:  ldc.i4.3 
2235         IL_0003:  ldc.i4.4 
2236         IL_0004:  ldc.i4.5 
2237         IL_0005:  ldc.i4.6 
2238         IL_0006:  ldc.i4.7 
2239         IL_0007:  ldc.i4.8 
2240         IL_0008:  ldc.i4.s 0x09
2241         IL_000a:  ldc.i4.s 0x0a
2242         IL_000c:  ldc.i4.s 0x0b
2243         IL_000e:  ldc.i4.s 0x0c
2244         IL_0010:  ldc.i4.s 0x0d
2245         IL_0012:  ldc.i4.s 0x0e
2246         IL_0014:  ldc.i4.s 0x0f
2247         IL_0016:  ldc.i4.s 0x10
2248         IL_0018:  call int32 class Tests::manyargs_tail_caller(int32, int32, int32, int32, int32, int32, int32, int32, int32, int32, int32, int32, int32, int32, int32, int32)
2249         IL_0028:  ret 
2250     } // end of method main::Main
2252         .class nested private auto ansi beforefieldinit R1
2253            extends [mscorlib]System.MarshalByRefObject
2254         {
2255                 .field  public  int32 test_field
2257         .method public hidebysig  specialname  rtspecialname
2258                         instance default void '.ctor' ()  cil managed
2259         {
2260                         ret
2261                 }
2262         }
2264         .method public static hidebysig
2265                         default int32 return_0 () cil managed
2266         {
2267                 ldc.i4.0
2268                 ret
2269         }
2271         .method public static hidebysig
2272                         default int32 test_1_volatile_marshalbyref_bug_432673 () cil managed
2273         {
2274                 .locals init (
2275                         class Tests/R1 v_0
2276                 )
2278                 newobj instance void class Tests/R1::.ctor ()
2279                 stloc.0
2280                 ldloc.0
2281                 ldc.i4.0
2282                 volatile.
2283                 stfld int32 Tests/R1::test_field
2284                 call int32 class Tests::return_0 ()
2285                 ldc.i4.1
2286                 add
2287                 ret
2288         }
2290         .method public static default int32 return_2 () cil managed
2291         {
2292                 // Prevent inlining
2293                 ldc.i4.s 16
2294         localloc
2295                 pop
2296                 ldc.i4.s 2
2297                 ret
2298         }
2300         .method public static hidebysig
2301                         default int32 test_1_cmov_opt_regress_463357 () cil managed
2302         {
2303                 call int32 class Tests::return_2 ()
2304                 ldc.i4.0
2305                 ceq
2306                 brfalse L1
2307                 ldc.i4.0
2308                 ret
2309                 br L2
2310         L1: nop
2311         L2: nop
2312                 ldc.i4.1
2313                 ret
2314         }
2316    .method public static hidebysig default int32 cmov_opt_regress_474718_inner (int32 A_1)  cil managed 
2317    {
2318       .maxstack 3
2319       .locals init (int32 V_0, bool V_1, bool V_2)
2320       
2321           ldc.i4.0
2322       IL_000b:  stloc.1 
2323       IL_000d:  br IL_002f
2325           ldc.i4.1    
2326           stloc.2
2327       IL_001e:  ldloc.2 
2328       IL_001f:  brfalse IL_0036
2330       IL_0024:  
2331       IL_002a:  br IL_0041
2332     
2333       IL_002f:  ldloc.1
2334       IL_0030:  stloc.2 
2335       IL_0031:  br IL_001e
2336     
2337       IL_0036:  ldc.i4 0
2338       IL_003b:  stloc.0 
2339       IL_003c:  br IL_0041
2340     
2341       IL_0041:  ldloc.0 
2342       IL_0042:  ret 
2343   } 
2345     .method public static default int32 test_0_cmov_opt_regress_474718 ()  cil managed 
2346     {
2347         .maxstack 16
2348         ldc.i4.1
2349         call int32 Tests::cmov_opt_regress_474718_inner (int32)
2350         ret
2351    }
2353         .method public static default int32 test_5_createarr_newobj () cil managed
2354         {
2355                 .maxstack 16
2357                 ldc.i4 5
2358                 newobj void char[]::.ctor(int32)
2359                 ldlen
2360                 ret
2361         }
2363         .method public static default int32 test_0_initblk_3_regress_481458 () cil managed
2364         {
2365                 .maxstack 16
2366                 .locals init (native int)
2368                 ldc.i4.s 10
2369                 localloc
2370                 stloc.0
2372                 // Set the first value to 3
2373                 ldloc.0
2374                 ldc.i4.0
2375                 add             //addr
2376                 ldc.i4.3        //value
2377                 stind.i1
2379                 // Zero out the first 3 values
2380                 ldloc.0         //addr
2381                 ldc.i4.0        //value
2382                 ldc.i4.s 3      //size
2383                 initblk
2385                 // Load the first value
2386                 ldloc.0
2387                 ldc.i4.0
2388                 add     
2389                 ldind.u1
2390                 conv.i4
2391                 ret
2392         }
2394 /*         Disabled until they can be fixed to run on amd64
2395         .method public static float32 GetFloat32() cil managed noinlining
2396         {
2397                 .maxstack  8
2398                 ldc.r8     0.19975845134874831
2399                 ret
2400         }
2402         .method public static default int32 test_0_implicit_float_to_double_conversion () cil managed
2403         {
2404                 .maxstack 16
2406                 call float32 Tests::GetFloat32()
2407                 ldc.r8     0.19975845134874831
2408                 beq OK
2410                 ldc.i4.1
2411                 ret
2413                 ldc.i4.0
2414                 ret
2415         }
2418         .method public static default int32 test_0_long_to_r8_un_overflow () cil managed
2419         {
2420                 .maxstack 16
2421                 ldc.i8     0x00FFFFFFFFFFFFFF
2422                 conv.r.un
2423                 conv.i8
2424                 ldc.i8 0x100000000000000
2425                 beq OK_1
2427                 ldc.i4.1
2428                 ret
2429 OK_1:
2430                 ldc.i8     0x00FFFFFFFFFFFFFF
2431                 conv.r.un
2432                 conv.r8
2433                 conv.i8
2434                 ldc.i8 0x100000000000000
2435                 beq OK_2
2437                 ldc.i4.2
2438                 ret
2439 OK_2:
2440                 ldc.i4.0
2441                 ret
2442         }
2444         .field public static int32 shift1
2446         .method public static int32 regress_497271_helper (int32 i) cil managed
2447         {
2448                 ldarg.0
2449                 ret
2450         }
2452         .method public static int32 test_0_regalloc_regress_497271 () cil managed
2453         {
2454                 .locals init (int32 var)
2456                 ldc.i4  4
2457                 stsfld  int32 Tests::shift1
2458                 ldsfld  int32 Tests::shift1
2459                 stloc   var
2460                 ldc.i4  4660
2461                 ldloc   var
2462                 shr.un
2463                 ldc.i4  4660
2464                 ldc.i4  32
2465                 ldloc   var
2466                 sub
2467                 shl
2468                 or
2469                 ldc.i4  1073742115
2470                 beq     ?L10
2471 ?L9:
2472                 ldc.i4  1
2473                 call    int32 Tests::regress_497271_helper (int32)
2474                 ret
2475 ?L10:
2476                 ldc.i4  0
2477                 call    int32 Tests::regress_497271_helper (int32)
2478                 ret
2479         }
2481    .field  private static  int32 Value
2483   .method public static hidebysig  specialname 
2484           default int32 regress_513931_inner ()  cil managed 
2485     {                                                                 
2486         // Method begins at RVA 0x225c                                
2487         // Code size 52 (0x34)                                        
2488         .maxstack 2                                                   
2489         .locals init (                                                
2490                 int32   V_0,                                          
2491                 int32   V_1,                                          
2492                 bool    V_2)
2493                        
2494                                 ldc.i4 999
2495                                 stsfld int32 Tests::Value
2497         IL_0000:  nop                                                 
2498         IL_0001:  ldsfld int32 Tests::Value      
2499         IL_0006:  stloc.0                                             
2500         IL_0007:  ldloc.0                                             
2501         IL_0008:  ldc.i4.0                                            
2502         IL_0009:  cgt                                                 
2503         IL_000b:  ldc.i4.0                                            
2504         IL_000c:  ceq                                                 
2505         IL_000e:  stloc.2                                             
2506         IL_000f:  ldloc.2                                             
2507         IL_0010:  brtrue.s IL_0027                                    
2509         IL_0012:  nop 
2510         IL_0013:  ldloc.0 
2511         IL_0014:  ldc.i4.s 0x7b
2512         IL_0016:  ceq          
2513         IL_0018:  ldc.i4.0     
2514         IL_0019:  ceq          
2515         IL_001b:  stloc.2      
2516         IL_001c:  ldloc.2      
2517         IL_001d:  brtrue.s IL_0023
2519         IL_001f:  ldc.i4.m1 
2520         IL_0020:  stloc.1   
2521         IL_0021:  br.s IL_0032
2523         IL_0023:  ldc.i4.1 
2524         IL_0024:  stloc.1  
2525         IL_0025:  br.s IL_0032
2527         IL_0027:  
2528         IL_002c:  newobj instance void class [mscorlib]System.Exception::'.ctor'()
2529         IL_0031:  throw                                                                            
2530         IL_0032:  ldloc.1                                                                          
2531         IL_0033:  ret                                                                              
2532     }
2534         .method public static hidebysig  specialname 
2535          default int32 test_0_regress_513931 ()  cil managed 
2536         {
2537                 call int32 Tests::regress_513931_inner ()
2538                 pop
2539                 ldc.i4.0
2540                 ret
2541         }
2543         .method public static default int32 test_0_newarr_i8 () cil managed
2544         {
2545                 ldc.i4 1000
2546                 conv.i8
2547                 newarr [mscorlib]System.Boolean
2548                 pop
2549                 ldc.i4 0
2550                 ret
2551         }
2553         .method public static specialname 
2554                default int32 return_1_noinline ()  cil managed noinlining 
2555         {
2556                 .maxstack 0
2558                 ldc.i4.1
2559                 ret 
2560         }
2562         // Only happens with -O=-deadce,cmov
2563         .method public static default int32 test_0_cmov_unused_582322 () cil managed
2564         {
2565         .maxstack 2                                                   
2566         .locals init (                                                
2567                                 int32 V_0
2568                 )                               
2569                 call int32 Tests::return_1_noinline ()
2570                 ldc.i4.1
2571                 bne.un L0
2572                 ldloc.s 0
2573                 pop
2574         L0:
2575                 ldc.i4.0
2576                 ret
2577         }
2579     .method public static  hidebysig 
2580            default int32 test_0_regress_586664 ()  cil managed 
2581     {                                        
2582         // Method begins at RVA 0x20f4       
2583         // Code size 76 (0x4c)               
2584         .maxstack 6                          
2585         .locals init (                       
2586                 float64 V_0,                 
2587                 float64[]       V_1)         
2588         IL_0000:  ldc.r8 1.                  
2589         IL_0009:  ldc.r8 2.                  
2590         IL_0012:  ldc.r8 1.                  
2591         IL_001b:  call float64 class [mscorlib]System.Math::Pow(float64, float64)
2592         IL_0020:  div                                                            
2593         IL_0021:  stloc.0                                                        
2594         IL_0022:  ldc.i4.2                                                       
2595         IL_0023:  newarr [mscorlib]System.Double                                 
2596         IL_0028:  dup                                                            
2597         IL_0029:  ldc.i4.0                                                       
2598         IL_002a:  ldloc.0                                                        
2599         IL_002b:  neg                                                            
2600         IL_002c:  stelem.r8                                                      
2601         IL_002d:  dup                                                            
2602         IL_002e:  ldc.i4.1                                                       
2603         IL_002f:  ldloc.0
2604         IL_0030:  neg
2605         IL_0031:  stelem.r8
2606         IL_0032:  stloc.1
2607         IL_0033:  ldloc.1
2608         IL_0034:  ldc.i4.0
2609         IL_0035:  ldelem.r8
2610         IL_0036:  ldc.r8 -0.5
2611         IL_003f:  bne.un IL_004a
2613         IL_0044:  ldc.i4.0
2614         IL_0045:  br IL_004b
2616         IL_004a:  ldc.i4.1
2617         IL_004b:  ret
2618     }
2620         .method public static int32 test_2_leave_multiple_blocks_from_end ()
2621         {
2622                 .locals init (int32 V_0)
2624                 .try {
2625                         .try {
2626                                 nop
2627                                 nop
2628                                 leave END
2629                         } finally {
2630                                 ldloc.0
2631                                 ldc.i4.1
2632                                 add
2633                                 stloc.0
2634                                 endfinally
2635                         }
2636                         nop
2637                         leave END
2638                 } finally {
2639                         ldloc.0
2640                         ldc.i4.1
2641                         add
2642                         stloc.0
2643                         endfinally
2644                 }
2645 END:
2646                 ldloc.0
2647                 ret
2648         }
2650         .method public static int32 test_3_leave_multiple_blocks_from_hole ()
2651         {
2652                 .locals init (int32 V_0)
2654                 .try {
2655                         .try {
2656                                 ldloc.0
2657                                 brtrue REST
2658                                 leave BEFORE_END
2659 REST:
2660                                 nop
2661                                 nop
2662                                 leave END
2663                         } finally {
2664                                 ldloc.0
2665                                 ldc.i4.1
2666                                 add
2667                                 stloc.0
2668                                 endfinally
2669                         }
2670                         nop
2671                         leave END
2672                 } finally {
2673                         ldloc.0
2674                         ldc.i4.1
2675                         add
2676                         stloc.0
2677                         endfinally
2678                 }
2679 BEFORE_END:
2680                 ldloc.0
2681                 ldc.i4.1
2682                 add
2683                 stloc.0
2684 END:
2685                 ldloc.0
2686                 ret
2687         }
2689         .class nested private auto ansi sealed beforefieldinit Pair`2<TKey,TValue>
2690                    extends [mscorlib]System.ValueType
2691         {
2692                 .field  public  !0 key
2693         .field  public  !1 'value'
2694         }
2696     .method private static hidebysig 
2697            default bool ContentEquals<TKey,TValue> (valuetype Tests/Pair`2<!!TKey, !!TValue> v)  cil managed 
2698     {
2699         .maxstack 8
2700         IL_0000:  ldarga.s 0 
2701         IL_0006:  ldnull 
2702                           constrained. valuetype Tests/Pair`2<!!0,!!1>
2703         IL_0007:  callvirt instance bool class [mscorlib]System.Object::Equals(object)
2704                           ret
2705     }
2707     .method public static hidebysig default int32 test_0_constrained_gshared_595863 () cil managed
2708     {
2709                 .locals init (
2710                 valuetype Tests/Pair`2<string, string>  V_0,
2711                 valuetype Tests/Pair`2<string, string>  V_1)
2712         IL_0000:  ldloca.s 0
2713         IL_0002:  initobj valuetype Tests/Pair`2<string,string>
2714         IL_0008:  ldloc.0 
2715         IL_0009:  stloc.1 
2716         IL_000a:  ldloca.s 1
2717         IL_000c:  ldstr "A"
2718         IL_0011:  stfld !0 valuetype Tests/Pair`2<string,string>::key
2719         IL_0016:  ldloca.s 1
2720         IL_0018:  ldstr "B"
2721         IL_001d:  stfld !1 valuetype Tests/Pair`2<string,string>::'value'
2722         IL_0022:  ldloc.1 
2723         IL_0023:  stloc.0 
2724         IL_0024:  ldloc.0 
2725         IL_0025:  call bool class Tests::ContentEquals<string, string> (valuetype Tests/Pair`2<!!0,!!1>)
2726                           brfalse SUCCESS
2727                           ldc.i4.1
2728                           ret
2729         SUCCESS:
2730                           ldc.i4.0
2731                           ret
2732     }
2734         .method public static default int32 test_0_wrap_non_exception_throws () cil managed
2735         {
2736           .try {
2737                     newobj instance void class [mscorlib]System.Object::'.ctor'()
2738                         throw
2739                   leave IL_0
2740           } catch class [mscorlib]System.Runtime.CompilerServices.RuntimeWrappedException {
2741                   leave IL_0
2742                 }
2743                 IL_0:
2744                 ldc.i4.0
2745                 ret
2746     }
2748         .method public static default int32 test_0_typespec_modopt () cil managed {
2749                 ldtoken class Tests modopt (Tests)
2750                 pop
2751                 ldc.i4.0
2752                 ret
2753         }
2755         .method public hidebysig static int32 SizeOfT<T>() cil managed
2756         {
2757                 .maxstack  8
2758     
2759                 sizeof !!0
2760         ret
2761         }
2763         .method public static default int32 test_1_sizeof_gshared () cil managed {
2764             call   int32 Tests::SizeOfT<int8>()
2765                 ldc.i4.1
2766                 ceq
2767                 ret
2768         }
2770         .method public static default int32 test_1_sizeof_ref () cil managed {
2771             call   int32 Tests::SizeOfT<object>()
2772                 sizeof [mscorlib]System.IntPtr
2773                 ceq
2774                 ret
2775         }
2777   .field static public int32 volatile_int
2779         .method public static default int32 test_5_volatile_load_store () cil managed {
2780                 ldsflda int32 class Tests::volatile_int
2781                 ldc.i4 5
2782                 volatile.
2783                 stind.i4
2784                 ldsflda int32 class Tests::volatile_int
2785                 volatile.
2786                 ldind.i4
2787                 ret
2788         }               
2790     .method public static 
2791            default int32 regress_693905_inner (int32 x, int32 acc)  cil managed 
2792     {
2793         // Method begins at RVA 0x2050
2794         // Code size 17 (0x11)
2795         .maxstack 5
2796         IL_0000:  ldarg.0 
2797         IL_0001:  brtrue.s IL_0005
2799         IL_0003:  ldarg.1 
2800         IL_0004:  ret 
2801         IL_0005:  ldarg.0 
2802         IL_0006:  ldc.i4.1 
2803         IL_0007:  sub 
2804         IL_0008:  ldarg.1 
2805         IL_0009:  ldc.i4.1 
2806         IL_000a:  add 
2807         IL_000b:  starg.s 1
2808         IL_000d:  starg.s 0
2809         IL_000f:  br.s IL_0000
2811     } // end of method Test::f
2813     .method public static 
2814            default int32 test_10_regress_693905 ()  cil managed 
2815         {
2816                 ldc.i4.s 0x0a
2817         ldc.i4.0 
2818         call int32 class Tests::regress_693905_inner(int32, int32)
2819                 ret
2820         }
2822         .method public static
2823                         default int32 test_0_llvm_regress_171 () cil managed
2824         {
2825                 .locals init (
2826                         int32 i
2827                 )
2829                 call int32 Tests::return_1_noinline ()
2830                 ldc.i4.1
2831                 beq L1
2832                 ldc.i4.1
2833                 stloc.s 0
2834                 call int32 Tests::return_1_noinline ()
2835                 ldc.i4.0
2836                 beq L1
2837                 L1:
2838                 ldloc.s 0
2839                 ret
2840         }
2842      .field  public static int32 static_a
2844         .method public static
2845                         default int32 test_4_ldfld_stfld_static () cil managed
2846         {
2847                 ldnull
2848                 ldc.i4 2
2849                 stfld int32 Tests::static_a
2850                 ldnull
2851                 ldfld int32 Tests::static_a
2852                 ldnull
2853                 ldflda int32 Tests::static_a
2854                 ldind.i4
2855                 add
2856                 ret
2857         }
2859   .method public static default int32 no_initlocals_inner () cil managed
2860   {
2861     .locals (
2862         int32 V_0,
2863         float32 V_1,
2864         float64 V_2,
2865         valuetype Tests/TailCallStruct V_3)
2866        ldloc V_0
2867        ret
2868   }
2870   .method public static default int32 test_0_no_initlocals () cil managed
2871   {
2872        call int32 Tests::no_initlocals_inner()
2873        pop
2874            ldc.i4.0
2875        ret
2876   }
2878   .method public hidebysig static int32  test_5_r4_fadd_mixed() cil managed
2879   {
2880     // Code size       17 (0x11)
2881     .maxstack  2
2882     .locals init (float32 V_0,
2883              float64 V_1)
2884     IL_0000:  ldc.r4     3
2885     IL_0005:  stloc.0
2886     IL_0006:  ldc.r8     2
2887     IL_000b:  stloc.1
2888     IL_000c:  ldloc.0
2889     IL_000d:  ldloc.1
2890     IL_000e:  add
2891     IL_000f:  conv.i4
2892     IL_0010:  ret
2893   }
2895  .method public hidebysig static int32  test_0_fcmp_eq_r4_mixed() cil managed
2896   {
2897     // Code size       32 (0x20)
2898     .maxstack  2
2899     .locals init (float32 V_0,
2900              float64 V_1)
2901     IL_0000:  ldc.r4     1
2902     IL_0005:  stloc.0
2903     IL_0006:  ldc.r8     1
2904     IL_000f:  stloc.1
2905     IL_0010:  ldloc.0
2906     IL_0012:  ldloc.1
2907     IL_0013:  bne.un     IL_001e
2909     IL_0018:  ldc.i4.0
2910     IL_0019:  br         IL_001f
2912     IL_001e:  ldc.i4.1
2913     IL_001f:  ret
2914   } // end of method Tests::test_0_fcmp_eq_r4_mixed
2916   .method public hidebysig static int32  test_0_fceq_r4_mixed() cil managed
2917   {
2918     // Code size       31 (0x1f)
2919     .maxstack  2
2920     .locals init (float32 V_0,
2921              float64 V_1,
2922              bool V_2)
2923     IL_0000:  ldc.r4     1
2924     IL_0005:  stloc.0
2925     IL_0006:  ldc.r8     1
2926     IL_000b:  stloc.1
2927     IL_000c:  ldloc.0
2928     IL_000d:  ldloc.1
2929     IL_000e:  ceq
2930     IL_0010:  stloc.2
2931     IL_0011:  ldloc.2
2932     IL_0012:  brfalse    IL_001d
2934     IL_0017:  ldc.i4.0
2935     IL_0018:  br         IL_001e
2937     IL_001d:  ldc.i4.1
2938     IL_001e:  ret
2939   } // end of method Tests::test_0_fceq_r4
2941   .method public static int32 test_0_switch_loop () cil managed
2942   {
2943         .maxstack 16
2944         .locals init (valuetype Tests/TailCallStruct V_0, int32 V_1)
2945         ldc.i4.0
2946         ldloc.0
2947         ldloc.1
2948         brtrue L_1
2949         L_0:
2950         ldc.i4.4
2951         switch (L_0)
2952         L_1:
2953         pop
2954         ret
2955   }
2957   .method public static int32 test_2_fault () cil managed
2958   {
2959         .maxstack 16
2960         .locals init (int32 V_0)
2961     IL_0000:  ldc.i4.0
2962     IL_0001:  stloc.0
2963     .try
2964     {
2965       .try
2966       {
2967         IL_0002:  newobj     instance void [mscorlib]System.Exception::.ctor()
2968         IL_0007:  throw
2969                 leave.s    IL_0018
2970       }  // end .try
2971           fault
2972       {
2973         IL_0009:  ldloc.0
2974         IL_000a:  ldc.i4.1
2975         IL_000b:  add
2976         IL_000c:  stloc.0
2977                                   endfinally
2978       }  // end handler
2979       IL_000f:  leave.s    IL_0018
2981     }  // end .try
2982     catch [mscorlib]System.Object
2983     {
2984       IL_0011:  pop
2985       IL_0012:  ldloc.0
2986       IL_0013:  ldc.i4.1
2987       IL_0014:  add
2988       IL_0015:  stloc.0
2989       IL_0016:  leave.s    IL_0018
2991     }  // end handler
2992     IL_0018:  ldloc.0
2993         ret
2994         }
2996   .method public static int32 test_0_fault_no_exception () cil managed
2997   {
2998         .maxstack 16
2999         .locals init (int32 V_0)
3000     IL_0000:  ldc.i4.0
3001     IL_0001:  stloc.0
3002     .try
3003     {
3004       .try
3005       {
3006                 leave.s    IL_0018
3007       }  // end .try
3008           fault
3009       {
3010         IL_0009:  ldloc.0
3011         IL_000a:  ldc.i4.1
3012         IL_000b:  add
3013         IL_000c:  stloc.0
3014                                   endfinally
3015       }  // end handler
3016       IL_000f:  leave.s    IL_0018
3018     }  // end .try
3019     catch [mscorlib]System.Object
3020     {
3021       IL_0011:  pop
3022       IL_0012:  ldloc.0
3023       IL_0013:  ldc.i4.1
3024       IL_0014:  add
3025       IL_0015:  stloc.0
3026       IL_0016:  leave.s    IL_0018
3028     }  // end handler
3029     IL_0018:  ldloc.0
3030         ret
3031         }
3033     .field  private static  int32 byte_val
3034     .field  private static  int32 short_val
3036     .method static int32 widen_arguments (unsigned int8 a, int8 b, int16 c, unsigned int16 d) cil managed noinlining
3037     {
3038                 .maxstack 4
3039                 ldsfld int32 Tests::byte_val
3040                 starg.s 0
3041                 ldarg.0
3042                 ldc.i4 128 //0x80
3043                 beq L_0
3045                 ldc.i4.1
3046                 ret
3047 L_0:
3048                 ldsfld int32 Tests::byte_val
3049                 starg.s 1
3050                 ldarg.1
3051                 ldc.i4 -128 //-0x80
3052                 beq L_1
3054                 ldc.i4.2
3055                 ret
3057 L_1:
3058                 ldsfld int32 Tests::short_val
3059                 starg.s 2
3060                 ldarg.2
3061                 ldc.i4 -32768 //-0x8000
3062                 beq L_2
3064                 ldc.i4.3
3065                 ret
3067 L_2:
3068                 ldsfld int32 Tests::short_val
3069                 starg.s 3
3070                 ldarg.3
3071                 ldc.i4 32768 //0x8000
3072                 beq L_3
3074                 ldc.i4.4
3075                 ret
3077 L_3:
3078                 ldc.i4.0
3079                 ret
3080     }
3082         .method public static int32 test_0_implicit_widen_of_argument_stores () cil managed
3083         {
3084                 .maxstack 5
3085                 /*
3086                 This test verifies that storing an I4 value from the evail stack into a local variable triggers proper widening.
3087                 The values are picked so storing them have different values depending on the sign'ness of the local variable.
3088                 */
3089                 ldc.i4 0x180
3090                 stsfld int32 Tests::byte_val
3091                 ldc.i4 0x18000
3092                 stsfld int32 Tests::short_val
3094                 ldc.i4.0
3095                 ldc.i4.0
3096                 ldc.i4.0
3097                 ldc.i4.0
3098                 call int32 Tests::widen_arguments (unsigned int8 a, int8 b, int16 c, unsigned int16 d)
3099                 ret
3100         }
3102     .method public static int32 test_0_implicit_widen_of_local_stores () cil managed
3103     {
3104                 .maxstack 4
3105                 .locals init (
3106                         unsigned int8   V_0,
3107                         int8    V_1,
3108                         int16   V_2,
3109                         unsigned int16  V_3)
3111                 /*
3112                 This test verifies that storing an I4 value from the evail stack into a local variable triggers proper widening.
3113                 The values are picked so storing them have different values depending on the sign'ness of the local variable.
3114                 */
3115                 ldc.i4 0x180
3116                 stsfld int32 Tests::byte_val
3117                 ldc.i4 0x18000
3118                 stsfld int32 Tests::short_val
3120                 ldsfld int32 Tests::byte_val
3121                 stloc.0
3122                 ldloc.0
3123                 ldc.i4 128 //0x80
3124                 beq L_0
3126                 ldc.i4.1
3127                 ret
3128 L_0:
3129                 ldsfld int32 Tests::byte_val
3130                 stloc.1
3131                 ldloc.1
3132                 ldc.i4 -128 //-0x80
3133                 beq L_1
3135                 ldc.i4.2
3136                 ret
3137 L_1:
3138                 ldsfld int32 Tests::short_val
3139                 stloc.2
3140                 ldloc.2
3141                 ldc.i4 -32768 //-0x8000
3142                 beq L_2
3144                 ldc.i4.3
3145                 ret
3146 L_2:
3147                 ldsfld int32 Tests::short_val
3148                 stloc.3
3149                 ldloc.3
3150                 ldc.i4 32768 //0x8000
3151                 beq L_3
3153                 ldc.i4.4
3154                 ret
3155 L_3:
3156                 ldc.i4.0
3157                 ret
3158     }
3160         .method public static bool llvm_regress_59436 () {
3161                 // Code size       41 (0x29)
3162                 .maxstack  3
3163                 .locals init (float64 V_0,
3164                                           float64 V_1,
3165                                           valuetype [mscorlib]System.Decimal V_2)
3166                 IL_0000:  ldc.r8         1
3167                 IL_0009:  stloc.0
3168                 IL_000a:  ldc.r8         2
3169                 IL_0013:  stloc.1
3170                 IL_0014:  ldloc.0
3171                 IL_0015:  newobj         instance void [mscorlib]System.Decimal::.ctor(float64)
3172                 IL_001a:  ldloca.s   V_2
3173                 IL_001c:  ldloc.1
3174                 IL_001d:  call     instance void [mscorlib]System.Decimal::.ctor(float64)
3175                 IL_0022:  ldloc.2
3176                 IL_0023:  call     bool [mscorlib]System.Decimal::op_LessThanOrEqual(valuetype [mscorlib]System.Decimal,
3177                                                                                                                                                            valuetype [mscorlib]System.Decimal)
3178                 IL_0028:  ret
3179         }
3181   .method private hidebysig static void  fail_inline() cil managed
3182   {
3183     // Code size       9 (0x9)
3184     .maxstack  8
3185     IL_0000:  ldc.i4.s   16
3186     IL_0002:  conv.u
3187     IL_0003:  ldc.i4.1
3188     IL_0004:  mul.ovf.un
3189     IL_0005:  localloc
3190     IL_0007:  pop
3191     IL_0008:  ret
3192   }
3194   .method private hidebysig static int32
3195           always_inline(int32 op) cil managed aggressiveinlining
3196   {
3197     // Code size       24 (0x18)
3198     .maxstack  8
3199     IL_0000:  ldarg.0
3200     IL_0001:  brfalse.s  IL_0009
3202     IL_0003:  ldarg.0
3203     IL_0004:  ldc.i4.2
3204     IL_0005:  beq.s      IL_000b
3206     IL_0007:  br.s       IL_000d
3208     IL_0009:  ldc.i4.0
3209     IL_000a:  ret
3211     IL_000b:  ldc.i4.3
3212     IL_000c:  ret
3214     IL_000d:  call       void Tests::fail_inline()
3215     IL_0012:  newobj     instance void [mscorlib]System.Exception::.ctor()
3216     IL_0017:  throw
3217   }
3219   .method public hidebysig static int32 test_3_regress_59608() cil managed
3220   {
3221     .maxstack  8
3222     IL_0000:  ldc.i4.2
3223     IL_0001:  call       int32 Tests::always_inline(int32)
3224     IL_000c:  ret
3225   }
3227   .method public hidebysig static int32 test_104_conv_u_and_string() cil managed
3228   {
3229     .maxstack  8
3230         ldstr "hello"
3231         conv.u
3232         call int32 [mscorlib]System.Runtime.CompilerServices.RuntimeHelpers::get_OffsetToStringData()
3233         add
3234         ldind.u2
3235         ret
3236   }
3238   .field public static class FLSharedKeys* keys
3240   .method public hidebysig static int32 test_0_regress_60634 () cil managed
3241   {
3242         .maxstack 8
3243         ldsflda     class FLSharedKeys* Tests::keys
3244         initobj    class FLSharedKeys*
3245         ldc.i4.0
3246         ret
3247   }
3249   .method public hidebysig static int32 test_0_github_issue_6721 () cil managed
3250   {
3251        .maxstack 8
3252        ldc.i4.0
3253        conv.i8
3254        ldc.i4.m1
3255        conv.ovf.i8.un
3256        sub.ovf
3257        ldc.i8 0xffffffff00000001
3258        beq.s IL_success
3259        ldc.i4.1
3260        ret
3261        IL_success:
3262        ldc.i4.0
3263        ret
3264   }
3266   .method public hidebysig static int32 test_3_github_issue_15794 () cil managed
3267   {
3268       .maxstack 8
3269       ldc.r8 3.4
3270       conv.r.un
3271       conv.i4
3272       ret
3273   }
3275   .method public hidebysig static int32 test_1_box_r8_r4_autoconv () cil managed
3276   {
3277                 ldc.r8 1.234
3278                 box float64
3279                 unbox float64
3280                 ldind.r8
3281                 box float32
3282                 unbox float32
3283                 ldind.r4
3284                 conv.r8
3285                 conv.i4
3286                 ret
3287         }
3289         .method public hidebysig static int32 test_1_dont_verify_ptr_byrefs () cil managed
3290          {
3291                 .locals init (int32 v_0, int32 *& v_1, int32 *v_2)
3293                 //v_0 = 1
3294                 ldc.i4.1
3295                 stloc.0
3297                 //v_1 = &v_0 < bad store of `int32&` to Ã¬nt32*&` but must work
3298                 ldloca v_0
3299                 stloc.1
3301                 //v_2 = (intptr)v_1
3302                 ldloc.1
3303                 conv.u
3304                 stloc.2
3306                 //return *v_2
3307                 ldloc.2
3308                 ldind.i4
3309                 ret
3310          }
3312         .method private hidebysig static valuetype [mscorlib]System.Nullable`1<int32> ret_some_vt(int32 val) cil managed
3313          {
3314                 .maxstack 8
3315                 ldarg.0
3316                 newobj instance void valuetype [mscorlib]System.Nullable`1<int32>::.ctor(!0)
3317                 ldarg.0
3318                 ldc.i4.0
3319                 ble.s second_vt
3321                 ldarg.0
3322                 ldc.i4.s 40
3323                 add
3324                 newobj instance void valuetype [mscorlib]System.Nullable`1<int32>::.ctor(!0)
3325                 pop
3326                 ret
3328 second_vt_2:
3329                 ldarg.0
3330                 ldc.i4.s 30
3331                 add
3332                 newobj instance void valuetype [mscorlib]System.Nullable`1<int32>::.ctor(!0)
3333                 ret
3335 second_vt:
3336                 pop
3337                 br second_vt_2
3338          }
3340         // https://github.com/mono/mono/issues/17924
3341         .method static public int32 test_0_vt_sp_tracking () cil managed
3342          {
3343                 .maxstack  2
3344                 .locals init (valuetype [mscorlib]System.Nullable`1<int32> V_0)
3346                 ldc.i4.s 10
3347                 call valuetype [mscorlib]System.Nullable`1<int32> Tests::ret_some_vt(int32)
3348                 stloc.0
3349                 ldloca.s V_0
3350                 call instance !0 valuetype [mscorlib]System.Nullable`1<int32>::get_Value()
3351                 ldc.i4.s 10
3352                 bne.un.s wrong
3354                 ldc.i4.0
3355                 ret
3357 wrong:
3358                 ldc.i4.1
3359                 ret
3360         }
3362         .class nested private auto ansi beforefieldinit R1_class
3363         {
3364                 .field  public  int32 test_field
3366                 .method public hidebysig  specialname  rtspecialname instance default void '.ctor' ()  cil managed
3367                 {
3368                         ret
3369                 }
3370         }
3372         .method public hidebysig static int32  test_3_ldstloc_opt () cil managed
3373         {
3374                 .locals init (
3375                         class Tests/R1_class v_0,
3376                         int32 v_1,
3377                         class Tests/R1_class v_2
3378                 )
3380                 /* allocate first object */
3381                 newobj instance void class Tests/R1_class::.ctor ()
3382                 stloc.0
3383                 ldloc.0
3384                 stloc.2
3386                 br L3
3387                 /* dead code for interp opt barrier */
3388                 ldc.i4.1
3389                 ldc.i4.1
3390                 add
3391                 pop
3393                 /* load first object on the stack */
3394                 ldloc.0
3396                 ldc.i4.3
3397                 stloc.1
3398                 ldloc.1
3400                 /* allocate second object */
3401                 newobj instance void class Tests/R1_class::.ctor ()
3402                 /* overwrite first object at loc0 with second object */
3403                 stloc.0
3405                 /* should store '3' into first object.
3406                  * in the buggy case it stores '3' into the second object because it delays the load from loc.0 */
3407                 stfld int32 Tests/R1_class::test_field
3409                 /* load first object on the stack */
3410                 ldloc.2
3411                 /* should read '3' */
3412                 ldfld int32 Tests/R1_class::test_field
3413                 ret
3414         }
3416         .method public hidebysig static void ldstarg_opt_helper (Tests/R1_class a) cil managed
3417         {
3418                 ldarg.0
3420                 /* allocate second object */
3421                 newobj instance void class Tests/R1_class::.ctor ()
3422                 dup
3423                 ldc.i4.1
3424                 /* stores '1' in the field */
3425                 stfld int32 Tests/R1_class::test_field
3426                 /* overwrite first argument */
3427                 starg 0
3429                 ldc.i4.3
3430                 /* stores '3' in the field */
3431                 stfld int32 Tests/R1_class::test_field  /* might get fused with ldarg.0 at start of method */
3432                 ret
3433         }
3435         .method public hidebysig static int32  test_3_ldstarg_opt () cil managed
3436         {
3437                 /* allocate first object */
3438                 newobj instance void class Tests/R1_class::.ctor ()
3439                 dup
3440                 ldc.i4.s 0x1337
3441                 /* stores '0x1337' in the field */
3442                 stfld int32 Tests/R1_class::test_field
3444                 dup
3445                 /* passing first object */
3446                 call void class Tests::ldstarg_opt_helper (Tests/R1_class)
3447                 /* should read '3' from first object */
3448                 ldfld int32 Tests/R1_class::test_field
3449                 ret
3450         }
3453   .method public hidebysig static int32  test_10_rconv_to_u8_ovf_un() cil managed
3454   {
3455     // Code size       20 (0x14)
3456     .maxstack  1
3457     .locals init (uint64 V_0,
3458              float32 V_1,
3459              int32 V_2)
3460     IL_0000:  nop
3461     IL_0001:  ldc.i4.s   10
3462     IL_0003:  conv.i8
3463     IL_0004:  stloc.0
3464     IL_0005:  ldloc.0
3465     IL_0006:  conv.r.un
3466     IL_0007:  conv.r4
3467     IL_0008:  stloc.1
3468     IL_0009:  nop
3469     IL_000a:  ldloc.1
3470     IL_000b:  conv.ovf.u8.un
3471     IL_000c:  stloc.0
3472     IL_000d:  ldloc.0
3473     IL_000e:  conv.ovf.i4.un
3474     IL_000f:  stloc.2
3475     IL_0010:  br.s       IL_0012
3477     IL_0012:  ldloc.2
3478     IL_0013:  ret
3479   } // end of method Tests::test_10_rconv_to_u8_ovf_un
3481   .field private static int64 TestLong
3483 /* Disabled until its fixed on i386
3484   .method public static int32 test_1_stsfld_conv () cil managed
3485   {
3486         ldc.i4.2
3487         stsfld int64 Tests::TestLong
3488         ldsfld int64 Tests::TestLong
3489         ldc.i8 2
3490         ceq
3491         ret
3492    }
3495         .method public hidebysig static string cmov_try_block_helper (string s) cil managed noinlining
3496         {
3497                 // Code size       43 (0x2b)
3498                 .maxstack  2
3499                 .locals init (bool V_0, string V_1)
3500                 IL_0000:  nop
3501                 IL_0001:  ldarg.0
3502                 IL_0002:  callvirt   instance int32 [mscorlib]System.String::get_Length()
3503                 IL_0007:  ldc.i4.0
3504                 IL_0008:  ceq
3505                 IL_000a:  stloc.0
3506                 IL_000b:  ldloc.0
3507                 IL_000c:  brfalse.s  IL_0016
3509                 IL_000e:  ldstr   "Empty"
3510                 IL_0013:  stloc.1
3511                 IL_0014:  br.s    IL_0029
3513                 IL_0016:  nop
3514                 .try
3515                 {
3516                   IL_0017:  nop
3517                   IL_0018:  ldarg.0
3518                   IL_0019:  stloc.1
3519                   IL_001a:  leave.s   IL_0029
3520                 }  // end .try
3521                 catch [mscorlib]System.Exception
3522                 {
3523                   IL_001c:  pop
3524                   IL_001d:  nop
3525                   IL_001e:  nop
3526                   IL_001f:  leave.s   IL_0021
3527                 }  // end handler
3528                 IL_0021:  ldstr  "Should not happen"
3529                 IL_0026:  stloc.1
3530                 IL_0027:  br.s   IL_0029
3532                 IL_0029:  ldloc.1
3533                 IL_002a:  ret
3534         }
3536         .method public hidebysig static int32 test_1_cmov_try_block() cil managed
3537         {
3538                 // Code size       37 (0x25)
3539                 .maxstack  2
3540                 .locals init (string V_0, bool V_1, int32 V_2)
3541                 IL_0000:  nop
3542                 IL_0001:  ldstr  "abc"
3543                 IL_0006:  call   string Tests::cmov_try_block_helper(string)
3544                 IL_000d:  ldstr  "abc"
3545                 IL_0012:  call   bool [mscorlib]System.String::op_Equality(string,string)
3546                 IL_0019:  brfalse.s  IL_001f
3548                 IL_001b:  ldc.i4.1
3549                 IL_001c:  stloc.2
3550                 IL_001d:  br.s   IL_0023
3552                 IL_001f:  ldc.i4.0
3553                 IL_0020:  stloc.2
3554                 IL_0021:  br.s   IL_0023
3556                 IL_0023:  ldloc.2
3557                 IL_0024:  ret
3558          }
3560         .method private hidebysig static int32 validate_alloc_array_length_lbound(class [mscorlib]System.Array test_array) cil managed
3561         {
3562                 // Code size       88 (0x58)
3563                 .maxstack  2
3564                 .locals init ([0] bool V_0, [1] int32 V_1, [2] bool V_2, [3] bool V_3, [4] bool V_4)
3565                 IL_0000:  nop
3566                 IL_0001:  ldarg.0
3567                 IL_0002:  callvirt   instance int32 [mscorlib]System.Array::get_Length()
3568                 IL_0007:  ldc.i4.6
3569                 IL_0008:  ceq
3570                 IL_000a:  ldc.i4.0
3571                 IL_000b:  ceq
3572                 IL_000d:  stloc.0
3573                 IL_000e:  ldloc.0
3574                 IL_000f:  brfalse.s  IL_0015
3575                 IL_0011:  ldc.i4.1
3576                 IL_0012:  stloc.1
3577                 IL_0013:  br.s       IL_0056
3578                 IL_0015:  ldarg.0
3579                 IL_0016:  callvirt   instance int32 [mscorlib]System.Array::get_Rank()
3580                 IL_001b:  ldc.i4.1
3581                 IL_001c:  ceq
3582                 IL_001e:  ldc.i4.0
3583                 IL_001f:  ceq
3584                 IL_0021:  stloc.2
3585                 IL_0022:  ldloc.2
3586                 IL_0023:  brfalse.s  IL_0029
3587                 IL_0025:  ldc.i4.2
3588                 IL_0026:  stloc.1
3589                 IL_0027:  br.s       IL_0056
3590                 IL_0029:  ldarg.0
3591                 IL_002a:  ldc.i4.0
3592                 IL_002b:  callvirt   instance int32 [mscorlib]System.Array::GetLowerBound(int32)
3593                 IL_0030:  ldc.i4 0x2710
3594                 IL_0031:  cgt.un
3595                 IL_0033:  stloc.3
3596                 IL_0034:  ldloc.3
3597                 IL_0035:  brfalse.s  IL_003b
3598                 IL_0037:  ldc.i4.3
3599                 IL_0038:  stloc.1
3600                 IL_0039:  br.s       IL_0056
3601                 IL_003b:  ldarg.0
3602                 IL_003c:  ldc.i4.0
3603                 IL_003d:  callvirt   instance int32 [mscorlib]System.Array::GetUpperBound(int32)
3604                 IL_0042:  ldc.i4 0x2715
3605                 IL_0043:  ceq
3606                 IL_0045:  ldc.i4.0
3607                 IL_0046:  ceq
3608                 IL_0048:  stloc.s    V_4
3609                 IL_004a:  ldloc.s    V_4
3610                 IL_004c:  brfalse.s  IL_0052
3611                 IL_004e:  ldc.i4.4
3612                 IL_004f:  stloc.1
3613                 IL_0050:  br.s       IL_0056
3614                 IL_0052:  ldc.i4.0
3615                 IL_0053:  stloc.1
3616                 IL_0054:  br.s       IL_0056
3617                 IL_0056:  ldloc.1
3618                 IL_0057:  ret
3619         }
3621         .method public hidebysig static int32  test_0_alloc_array_int16_length_lbound() cil managed
3622         {
3623                 .maxstack  2
3624                 .locals init ([0] int16[] test_array, [1] int32 V_1)
3625                 ldc.i4 10000
3626                 ldc.i4 6
3627                 newobj instance void int16[10000...10005]::.ctor(int32, int32)
3628                 call int32 class Tests::validate_alloc_array_length_lbound(class [mscorlib]System.Array)
3629                 ret
3630         }
3632         .method public hidebysig static int32  test_0_alloc_array_int32_length_lbound() cil managed
3633         {
3634                 .maxstack  2
3635                 .locals init ([0] int32[] test_array, [1] int32 V_1)
3636                 ldc.i4 10000
3637                 ldc.i4 6
3638                 newobj instance void int32[10000...10005]::.ctor(int32, int32)
3639                 call int32 class Tests::validate_alloc_array_length_lbound(class [mscorlib]System.Array)
3640                 ret
3641         }
3643         .method public hidebysig static int32  test_0_alloc_array_int64_length_lbound() cil managed
3644         {
3645                 .maxstack  2
3646                 .locals init ([0] int64[] test_array, [1] int32 V_1)
3647                 ldc.i4 10000
3648                 ldc.i4 6
3649                 newobj instance void int64[10000...10005]::.ctor(int32, int32)
3650                 call int32 class Tests::validate_alloc_array_length_lbound(class [mscorlib]System.Array)
3651                 ret
3652         }
3654         .method public hidebysig static int32  test_0_alloc_array_float32_length_lbound() cil managed
3655         {
3656                 .maxstack  2
3657                 .locals init ([0] float32[] test_array, [1] int32 V_1)
3658                 ldc.i4 10000
3659                 ldc.i4 6
3660                 newobj instance void float32[10000...10005]::.ctor(int32, int32)
3661                 call int32 class Tests::validate_alloc_array_length_lbound(class [mscorlib]System.Array)
3662                 ret
3663         }
3665         .method public hidebysig static int32  test_0_alloc_array_float64_length_lbound() cil managed
3666         {
3667                 .maxstack  2
3668                 .locals init ([0] float64[] test_array, [1] int32 V_1)
3669                 ldc.i4 10000
3670                 ldc.i4 6
3671                 newobj instance void float64[10000...10005]::.ctor(int32, int32)
3672                 call int32 class Tests::validate_alloc_array_length_lbound(class [mscorlib]System.Array)
3673                 ret
3674         }
3676         .method private hidebysig static int32 test_0_two_dimensional_array_bounds() cil managed
3677         {
3678                 .maxstack 5
3679                 .locals init (int32[,] arr)
3680                 ldc.i4 100
3681                 ldc.i4 27
3682                 ldc.i4 200
3683                 ldc.i4 31
3684                 newobj instance void int32[,]::.ctor(int32, int32, int32, int32)
3685                 stloc arr
3687                 ldc.i4 1
3688                 ldloc arr
3689                 ldc.i4 0
3690                 callvirt instance int32 [mscorlib]System.Array::GetLowerBound(int32)
3691                 ldc.i4 100
3692                 bne.un exit
3693                 pop
3695                 ldc.i4 2
3696                 ldloc arr
3697                 ldc.i4 0
3698                 callvirt instance int32 [mscorlib]System.Array::GetUpperBound(int32)
3699                 ldc.i4 126
3700                 bne.un exit
3701                 pop
3703                 ldc.i4 3
3704                 ldloc arr
3705                 ldc.i4 1
3706                 callvirt instance int32 [mscorlib]System.Array::GetLowerBound(int32)
3707                 ldc.i4 200
3708                 bne.un exit
3709                 pop
3711                 ldc.i4 4
3712                 ldloc arr
3713                 ldc.i4 1
3714                 callvirt instance int32 [mscorlib]System.Array::GetUpperBound(int32)
3715                 ldc.i4 230
3716                 bne.un exit
3717                 pop
3719                 ldc.i4 5
3720                 ldloc arr
3721                 ldc.i4 100
3722                 ldc.i4 200
3723                 ldc.i4 1234
3724                 call instance void int32[,]::Set(int32, int32, int32)
3725                 ldloc arr
3726                 ldc.i4 100
3727                 ldc.i4 200
3728                 call instance int32 int32[,]::Get(int32, int32)
3729                 ldc.i4 1234
3730                 bne.un exit
3731                 pop
3733                 ldc.i4 6
3734                 ldloc arr
3735                 ldc.i4 126
3736                 ldc.i4 230
3737                 ldc.i4 5678
3738                 call instance void int32[,]::Set(int32, int32, int32)
3739                 ldloc arr
3740                 ldc.i4 126
3741                 ldc.i4 230
3742                 call instance int32 int32[,]::Get(int32, int32)
3743                 ldc.i4 5678
3744                 bne.un exit
3745                 pop
3747                 ldc.i4 0
3748         exit:
3749                 ret
3750         }
3752         .method private hidebysig static int32 test_0_five_dimensional_array() cil managed
3753         {
3754                 .maxstack 12
3755                 .locals init (int32[,,,,] arr)
3756                 ldc.i4 100
3757                 ldc.i4 2
3758                 ldc.i4 200
3759                 ldc.i4 3
3760                 ldc.i4 300
3761                 ldc.i4 4
3762                 ldc.i4 400
3763                 ldc.i4 5
3764                 ldc.i4 500
3765                 ldc.i4 6
3766                 newobj instance void int32[,,,,]::.ctor(
3767                         int32, int32, int32, int32, int32, int32,
3768                         int32, int32, int32, int32)
3769                 stloc arr
3771                 ldc.i4 1
3772                 ldloc arr
3773                 ldc.i4 0
3774                 callvirt instance int32 [mscorlib]System.Array::GetLowerBound(int32)
3775                 ldc.i4 100
3776                 bne.un exit
3777                 pop
3779                 ldc.i4 2
3780                 ldloc arr
3781                 ldc.i4 0
3782                 callvirt instance int32 [mscorlib]System.Array::GetUpperBound(int32)
3783                 ldc.i4 101
3784                 bne.un exit
3785                 pop
3787                 ldc.i4 3
3788                 ldloc arr
3789                 ldc.i4 4
3790                 callvirt instance int32 [mscorlib]System.Array::GetLowerBound(int32)
3791                 ldc.i4 500
3792                 bne.un exit
3793                 pop
3795                 ldc.i4 4
3796                 ldloc arr
3797                 ldc.i4 4
3798                 callvirt instance int32 [mscorlib]System.Array::GetUpperBound(int32)
3799                 ldc.i4 505
3800                 bne.un exit
3801                 pop
3803                 ldc.i4 5
3804                 ldloc arr
3805                 ldc.i4 100
3806                 ldc.i4 200
3807                 ldc.i4 300
3808                 ldc.i4 400
3809                 ldc.i4 500
3810                 ldc.i4 1234
3811                 call instance void int32[,,,,]::Set(int32, int32, int32, int32, int32, int32)
3812                 ldloc arr
3813                 ldc.i4 100
3814                 ldc.i4 200
3815                 ldc.i4 300
3816                 ldc.i4 400
3817                 ldc.i4 500
3818                 call instance int32 int32[,,,,]::Get(int32, int32, int32, int32, int32)
3819                 ldc.i4 1234
3820                 bne.un exit
3821                 pop
3823                 ldc.i4 6
3824                 ldloc arr
3825                 ldc.i4 101
3826                 ldc.i4 202
3827                 ldc.i4 303
3828                 ldc.i4 404
3829                 ldc.i4 505
3830                 ldc.i4 5678
3831                 call instance void int32[,,,,]::Set(int32, int32, int32, int32, int32, int32)
3832                 ldloc arr
3833                 ldc.i4 101
3834                 ldc.i4 202
3835                 ldc.i4 303
3836                 ldc.i4 404
3837                 ldc.i4 505
3838                 call instance int32 int32[,,,,]::Get(int32, int32, int32, int32, int32)
3839                 ldc.i4 5678
3840                 bne.un exit
3841                 pop
3843                 ldc.i4 0
3844         exit:
3845                 ret
3846         }
3848         .method public hidebysig static !!T     createinstance_intrins_primitive<.ctor T>() cil managed noinlining
3849         {
3850                 .maxstack       8
3851                 call                     !!0 [mscorlib]System.Activator::CreateInstance<!!0>()
3852                 ret
3853         }
3855         .method public static int32 test_0_createinstance_intrins_primitive () cil managed
3856         {
3857                 .maxstack       8
3858                 call                     !!0 Tests::createinstance_intrins_primitive<bool>()
3859                 ldc.i4.0
3860                 beq L1
3861                 ldc.i4.1
3862                 ret
3863         L1:
3864                 call                     !!0 Tests::createinstance_intrins_primitive<int64>()
3865                 ldc.i8 0
3866                 beq L2
3867                 ldc.i4.2
3868                 ret
3869         L2:
3870                 ldc.i4.0
3871                 ret
3872         }