[jit] Fix the saving of the 'cfg->ret_var_set' flag when inlining, it was set to...
[mono.git] / mono / mini / iltests.il
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.
5 }
6 .assembly extern TestDriver {}
7 .assembly extern mscorlib {}
8
9 .class public auto ansi sealed beforefieldinit Tests {
10
11         .method static public int32 Main(string[] args) il managed {
12                 .entrypoint
13                 
14                 ldtoken Tests
15                 call       class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
16                 ldarg.0
17                 call       int32 [TestDriver]TestDriver::RunTests(class [mscorlib]System.Type, string[])
18                 ret
19         }
20
21         // make sure the register allocator works when the return value of
22         // 'div' is discarded
23         .method static public int32 test_0_div_regalloc () il managed {
24                 .locals init (
25                         int32 i
26                 )
27
28                 ldloc 0
29                 ldc.i4.s 0xa
30                 div
31                 pop
32                 ldc.i4.0
33                 ret
34         }
35         
36         
37         .method static public int32 test_1_ceq_to_i4 () il managed {
38                 .locals init (
39                         int32   foo
40                 )
41                 ldc.i4 500
42                 stloc foo
43                 ldloc foo
44                 ldc.i4 500
45                 ceq
46                 stloc foo
47                 ldloc foo
48                 ret
49         }
50         
51         .method static public int32 test_3_shl_regvars () il managed {
52                 .locals init (
53                         int32   a,
54                         int32   b,
55                         int32   r1,
56                         int32   r2,
57                         int32   r3
58                 )
59                         
60                 ldc.i4.2
61                 stloc      a
62                 ldc.i4.1
63                 stloc      b
64         
65                 ldloc      a
66                 ldloc      b
67                 shl 
68                 stloc      r1
69                 
70                 ldloc      a
71                 ldloc      b
72                 shl 
73                 stloc      r2
74                 
75                 ldloc      a
76                 ldloc      b
77                 shl 
78                 stloc      r3
79                 
80                 ldloc      r1
81                 ldc.i4.4
82                 ceq
83                 
84                 ldloc      r2
85                 ldc.i4.4
86                 ceq
87                 
88                 ldloc      r3
89                 ldc.i4.4
90                 ceq
91                 
92                 add
93                 add
94                 
95                 ret
96         }
97         
98         .method static public int32 test_1_fceq_to_i4 () il managed {
99         
100                 .locals init (
101                         float64 foo,
102                         int32   val
103                 )
104
105                 ldc.r8      2
106                 stloc       foo
107                 
108                 ldloc       foo
109                 ldc.r8      2
110                 ceq
111                 stloc       val
112                 
113                 ldloc       val
114                 ret
115         }
116
117         //
118         // This should be manually checked. Basically under -O=linears,
119         // you should not see tons of register spilling.
120         //
121         .method static public int32 test_1_bytedreg_free () il managed {
122                 .locals init (
123                         int32   foo
124                 )
125                 ldc.i4 500
126                 stloc foo
127                 ldloc foo
128                 ldc.i4 500
129                 ceq
130                 stloc foo
131                 
132                 ldloc foo
133                 ldc.i4 1
134                 ceq
135                 stloc foo
136
137                 ldloc foo
138                 ldc.i4 1
139                 ceq
140                 stloc foo
141
142                 ldloc foo
143                 ldc.i4 1
144                 ceq
145                 stloc foo
146                 
147                 ldloc foo
148                 ldc.i4 1
149                 ceq
150                 stloc foo
151                 
152                 ldloc foo
153                 ret
154         }
155         
156         //
157         // This should be manually checked. Basically under -O=linears,
158         // you should not see tons of register spilling.
159         //
160         .method static public int32 test_0_bytesreg1_free () il managed {
161                 .locals init (
162                         unsigned int8      dest,
163                         int32              src,
164                         unsigned int8&     pdest
165                 )
166
167                 ldloca     dest
168                 stloc      pdest
169                 
170                 ldloc      pdest
171                 ldloc      src
172                 stind.i1
173                 
174                 ldloc      pdest
175                 ldloc      src
176                 stind.i1
177                 
178                 ldloc      pdest
179                 ldloc      src
180                 stind.i1
181                 
182                 ldloc      pdest
183                 ldloc      src
184                 stind.i1
185                 
186                 ldloc      pdest
187                 ldloc      src
188                 stind.i1
189                 
190                 ldloc      pdest
191                 ldloc      src
192                 stind.i1
193                 
194                 ldloc      pdest
195                 ldind.i1
196                 ret
197         }
198         
199         .method static public int32 test_1_shift_regvar () il managed {
200         
201                 .locals init (
202                         int32   v7FFFFFFF,
203                         int32   v1
204                 )
205                 
206                 ldc.i4  0x7FFFFFFF
207                 stloc   v7FFFFFFF
208         
209                 ldc.i4.1
210                 stloc v1
211                 
212                 ldloc   v7FFFFFFF
213                 ldloc   v1
214                 shl
215                 ldc.i4  0xFFFFFFFE
216                 ceq
217                 ret
218         }
219         
220         // this only happens with the managed pointer, not an unmanaged one.
221         .method static public int32 test_0_foo () il managed {
222         
223                 .locals init (
224                         int32&  buf
225                 )
226                 
227                 ldc.i4.5
228                 localloc
229                 
230                 stloc buf
231                 ldloc buf
232                 
233                 ldind.i4
234                 
235                 ret
236         }
237
238         .method static public int32 test_0_localloc () cil managed {
239                 .locals init (native int, native int, native int, native int, int32)
240
241                 ldc.i4 6
242                 localloc
243                 conv.i
244                 stloc.0
245
246                 ldc.i4 6
247                 localloc
248                 conv.i
249                 stloc.1
250
251                 ldc.i4 6
252                 localloc
253                 conv.i
254                 stloc.2
255
256                 // Variable length
257                 ldc.i4 128
258                 stloc.s 4
259                 ldloc.s 4
260                 localloc
261                 conv.i
262                 stloc.3
263
264                 // Check zero initialized
265                 ldloc.0
266                 ldind.i4
267                 ldc.i4.0
268                 beq OK1
269                 ldc.i4.1
270                 br FAIL
271
272 OK1:
273                 ldloc.3
274                 ldind.i4
275                 ldc.i4.0
276                 beq OK2
277                 ldc.i4.2
278                 br FAIL
279
280 OK2:
281                 ldloc.3
282                 ldc.i4.s 124
283                 add
284                 ldind.i4
285                 ldc.i4.0
286                 beq OK3
287                 ldc.i4.3
288                 br FAIL
289
290 OK3:
291                 ldloc.1
292                 ldc.i4 999999
293                 stind.i4
294                 ldloc.1
295                 ldind.i4
296                 ldc.i4 999999
297                 beq OK4
298                 ldc.i4.4
299                 br FAIL
300
301 OK4:
302                 ldloc.0
303                 ldc.i4 999999
304                 stind.i4
305                 ldloc.0
306                 ldind.i4
307                 ldc.i4 999999
308                 beq OK5
309                 ldc.i4.5
310                 br FAIL
311
312 OK5:
313                 // Try allocations bigger than one page
314                 ldc.i4 8196
315                 localloc
316                 conv.i
317                 stloc.3
318                 ldloc.3
319                 ldc.i4 8192
320                 add
321                 ldc.i4 99
322                 stind.i4
323                 ldloc.3
324                 ldc.i4 8192
325                 add
326                 ldind.i4
327                 ldc.i4 99
328                 beq PASS
329                 ldc.i4.6
330                 br FAIL
331
332 FAIL:
333                 ret
334
335 PASS:   ldc.i4.0
336                 ret
337         }
338
339     .method private static void do_localloc () cil managed {
340         .maxstack 3
341         .locals init (
342                 unsigned int8*  V_0)
343         IL_0000:  ldc.i4.1
344         IL_0001:  ldc.i4 131072
345         IL_0006:  mul
346         IL_0007:  localloc
347         IL_0009:  stloc.0
348         IL_000a:  ret
349     }
350
351         // Check that localloc cannot be inlined
352         .method static public int32 test_0_localloc_inline () cil managed {
353                 .maxstack 16
354                 .locals init (
355                         int32 i
356                 )
357
358                 ldc.i4.0
359         stloc.0
360         br COND
361
362 START:  call void class Tests::do_localloc()
363         ldloc.0
364         ldc.i4.1
365         add
366         stloc.0
367 COND:   ldloc.0
368         ldc.i4 1000
369         blt START
370
371                 ldc.i4.0
372                 ret
373         }       
374         
375         .method static public int32 test_3_copy_used_bug () il managed {
376
377                 .locals init (
378                         int32 size,
379                         int32 res
380                 )
381
382                 ldc.i4 0
383                 stloc res
384
385                 ldc.i4 1
386                 stloc size
387
388                 ldloc size
389                 ldloc size
390                 ldloc size
391                 add
392                 stloc size
393                 ldloc size
394                 add
395                 stloc res
396
397                 ldloc res
398                 ret
399         }
400
401         // demonstrate that the copy_used_var is not a fix for the above bug
402         .method static public int32 test_3_copy_used_indir_bug () il managed {
403
404                 .locals init (
405                         int32 size,
406                         int32 res
407                 )
408
409                 ldc.i4 0
410                 stloc res
411
412                 ldc.i4 1
413                 stloc size
414
415                 ldloc size
416                 ldloca size
417                 ldloc size
418                 ldloc size
419                 add
420                 stind.i4
421                 ldloc size
422                 add
423                 stloc res
424
425                 ldloc res
426                 ret
427         }
428
429         .method static public void do_nothing (int32 a) il managed {
430                 ret
431         }
432         
433         // demonstrate the block_split failure: needs -O=inline
434         // mini -O=inline --compile Tests:test_0_split_block_bug iltests.exe
435         .method static public int32 test_0_split_block_bug () il managed {
436
437                 .locals init (
438                         int32 i1
439                 )
440
441                 ldc.i4 1
442                 stloc i1
443  test_label:
444                 ldloc i1
445                 call void class Tests::do_nothing (int32)
446                 ldc.i4 0
447                 brtrue test_label
448                 
449                 ldc.i4 0
450                 ret
451         }
452
453         .method public void inline_do_nothing () il managed {
454                 ret
455         }
456         .method static public int32 test_1_checkthis_inlining () il managed {
457                 ldnull
458                 call instance void class Tests::inline_do_nothing ()
459                 ldc.i4 1
460                 ret
461         }
462
463         .class nested private auto ansi sealed beforefieldinit TailCallStruct 
464                 extends [mscorlib]System.ValueType {
465                 .field public int32 a
466                 .field public int32 b
467         }
468
469         .method static valuetype Tests/TailCallStruct tail1 (valuetype Tests/TailCallStruct arg) {
470                 ldarga 0
471                 ldarga 0
472                 ldfld int32 Tests/TailCallStruct::a
473                 ldc.i4.1
474                 add
475                 stfld int32 Tests/TailCallStruct::a
476                 ldarga 0
477                 ldarga 0
478                 ldfld int32 Tests/TailCallStruct::a
479                 ldc.i4.2
480                 add
481                 stfld int32 Tests/TailCallStruct::a
482                 ldarg.0
483                 ret
484         }
485
486         .method static valuetype Tests/TailCallStruct tail2 (valuetype Tests/TailCallStruct arg) {
487                 ldarg.0
488                 tail.
489                 call valuetype Tests/TailCallStruct Tests::tail1 (valuetype Tests/TailCallStruct)
490                 ret
491         }
492
493         .class nested private auto ansi sealed beforefieldinit TailCallStructBig
494                 extends [mscorlib]System.ValueType {
495                 .field public int32 a
496                 .field public int32 b
497                 .field public int32 c
498                 .field public int32 d
499                 .field public int32 e
500         }
501
502         .method static valuetype Tests/TailCallStructBig tail_vret_by_addr_inner (valuetype Tests/TailCallStructBig arg) {
503                 ldarga 0
504                 ldarga 0
505                 ldfld int32 Tests/TailCallStructBig::a
506                 ldc.i4.1
507                 add
508                 stfld int32 Tests/TailCallStructBig::a
509                 ldarg.0
510                 ret
511         }
512
513         .method static valuetype Tests/TailCallStructBig tail_vret_by_addr (valuetype Tests/TailCallStructBig arg) {
514                 ldarg.0
515                 tail.
516                 call valuetype Tests/TailCallStructBig Tests::tail_vret_by_addr_inner (valuetype Tests/TailCallStructBig)
517                 ret
518         }
519
520         .method static public int32 test_3_tail_call_vret_by_addr () il managed {
521                 .maxstack 16
522                 .locals init (
523                         valuetype Tests/TailCallStructBig arg2
524                 )
525
526                 ldloca 0
527                 ldc.i4.2
528                 stfld int32 Tests/TailCallStructBig::a
529                 ldloc.0
530                 call valuetype Tests/TailCallStructBig Tests::tail_vret_by_addr (valuetype Tests/TailCallStructBig)
531                 stloc.0
532
533                 ldloca 0
534                 ldfld int32 Tests/TailCallStructBig::a
535                 ret
536         }
537
538         .method static public int32 test_9_tail_call_vret_by_val () il managed {
539                 .maxstack 16
540                 .locals init (
541                         valuetype Tests/TailCallStruct arg
542                 )
543                 ldloca 0
544                 ldc.i4.2
545                 stfld int32 Tests/TailCallStruct::a
546                 ldloca 0
547                 ldc.i4.4
548                 stfld int32 Tests/TailCallStruct::b
549                 ldloc.0
550                 call valuetype Tests/TailCallStruct Tests::tail2 (valuetype Tests/TailCallStruct)
551                 stloc.0
552
553                 ldloca 0
554                 ldfld int32 Tests/TailCallStruct::a
555                 ldloca 0
556                 ldfld int32 Tests/TailCallStruct::b
557                 add
558                 ret
559         }
560
561         .method static public int32 tail3 (int32 i, int32 j) il managed {
562                 ldarg.0
563                 ldarg.1
564                 add
565                 ret
566         }
567
568         .method static public int32 tail4 (int32 i, int32 j) il managed {
569                 .maxstack 16
570                 .locals init (
571                         int32 k)
572
573                 // Test arg0 allocated to a register
574                 ldarg.0
575                 ldarg.0
576                 ldarg.0
577                 ldarg.0
578                 add
579                 add
580                 add
581                 starg 0
582
583                 // Test switched up argument variables as the actual arguments
584                 ldarg.1
585                 ldarg.0
586                 tail.
587                 call int32 Tests::tail3 (int32, int32)
588                 ret
589         }
590
591         .method static public int32 test_24_tail_calls2 () il managed {
592                 // Some platforms might not be able to AOT tail calls
593                 .custom instance void class [TestDriver]CategoryAttribute::'.ctor'(string) =  (01 00 08 21 46 55 4C 4C 41 4F 54 00 00 ) // ...!FULLAOT..
594
595                 .maxstack 16
596                 .locals init (
597                         int32 i,
598                         int32 j)
599
600                 ldc.i4.4
601                 stloc.0
602                 ldc.i4.8
603                 stloc.1
604
605                 ldloc.0 
606                 ldloc.1
607                 call int32 Tests::tail4 (int32, int32)
608                 ret
609         }
610
611         .method public static int32 test_5_jmp () cil managed {
612                 // Some platforms might not be able to AOT tail calls
613                 .custom instance void class [TestDriver]CategoryAttribute::'.ctor'(string) =  (01 00 08 21 46 55 4C 4C 41 4F 54 00 00 ) // ...!FULLAOT..
614
615                 ldc.i4.1
616                 ldc.i4.2
617                 call int32 Tests::jmp2 (int32, int32)
618                 ret
619         }
620
621         .method public static int32 jmp2 (int32, int32) cil managed {
622                 ldarg.0
623                 ldc.i4.1
624                 add
625                 starg.s 0
626                 ldarg.1
627                 ldc.i4.1
628                 add
629                 starg.s 1
630                 jmp int32 Tests::jmp3 (int32, int32)
631                 ldc.i4.0
632                 ret
633         }               
634
635         .method public static int32 jmp3 (int32 i, int32 j) cil managed {
636                 ldarg.0
637                 ldarg.1
638                 add
639                 ret
640         }
641
642         .method static public int32 test_11_switch_with_nonempty_stack () il managed {
643                 .maxstack 16
644
645                 ldc.i4.5
646                 ldc.i4.6
647                 ldc.i4.1
648                 switch (L0, L1)
649         L0: 
650                 add
651                 ret
652         L1:
653                 add
654                 ret
655         }
656  
657     .method public static int32 test_5_endfinally_with_nonempty_stack () il managed {
658                 .maxstack 16
659
660         .try {
661           leave IL_0
662         }
663         finally  {
664           ldc.i4.0
665           endfinally
666         }
667         IL_0:  ldc.i4.5
668                 ret
669     }
670
671     .method public static int32 test_5_endfinally_llvm_linking () il managed {
672                 .maxstack 16
673
674         .try {
675           leave IL_0
676         }
677         finally  {
678           ldc.i4.0
679                   dup
680                   brtrue L1
681                   pop
682                   br L2
683                 L1:
684                   pop
685                 L2:
686           endfinally
687         }
688         IL_0:  ldc.i4.5
689                 ret
690     }
691
692         .method public static int32 test_0_conv_ovf_i8_neg () il managed {
693                 .maxstack 16
694
695                 ldc.i4.m1
696                 conv.ovf.i8
697                 conv.i4
698                 ldc.i4.m1
699                 beq L_OK
700                 ldc.i4.1
701                 ret
702         L_OK:
703                 ldc.i4.0
704                 ret
705         }               
706
707         .method public static int32 test_1234_conv_u4 () cil managed {
708                 .maxstack 16
709
710                 ldc.i4 1234
711                 conv.u4
712                 conv.i4
713                 ret
714         }
715
716         .method public static int32 test_0_conv_ovf_i_un () cil managed {
717                 .maxstack 16
718
719                 ldc.i4 1234
720                 conv.ovf.i.un
721                 conv.i4
722                 ldc.i4 1234
723                 beq L1
724                 ldc.i4.1
725                 ret
726         L1:
727                 ldc.i4 0x7fffffff
728                 conv.ovf.i.un
729                 conv.i4
730                 ldc.i4 0x7fffffff
731                 beq L2
732                 ldc.i4.2
733                 ret
734         L2:
735                 sizeof [mscorlib]System.IntPtr
736                 ldc.i4 8
737                 beq L5
738                 .try {
739                         ldc.i4 0x80000000
740                         conv.ovf.i.un
741                         leave L4
742                 } catch [mscorlib]System.OverflowException {
743                         pop
744                         leave L5
745                 }
746         L4: 
747                 ldc.i4.3
748                 ret
749         L5:
750                 ldc.i4.0
751                 ret
752         }
753
754         .method public static int32 test_0_conv_ovf_u_un () cil managed {
755                 .maxstack 16
756
757                 ldc.i4 1234
758                 conv.ovf.u.un
759                 conv.i4
760                 ldc.i4 1234
761                 beq L1
762                 ldc.i4.1
763                 ret
764         L1:
765                 ldc.i4.0
766                 ret
767         }
768
769         .method public static int32 test_0_conv_ovf_i () cil managed {
770                 .maxstack 16
771
772                 ldc.i4 1234
773                 conv.ovf.i
774                 conv.i4
775                 ldc.i4 1234
776                 beq L1
777                 ldc.i4.1
778                 ret
779         L1:
780                 ldc.i4.0
781                 ret
782         }
783
784         .method public static int32 test_0_conv_ovf_u () cil managed {
785                 .maxstack 16
786
787                 ldc.i4 1234
788                 conv.ovf.u
789                 conv.i4
790                 ldc.i4 1234
791                 beq L1
792                 ldc.i4.1
793                 ret
794         L1:
795                 ldc.i4.0
796                 ret
797         }
798
799         .method public static int32 test_1234_conv_ovf_i8_un () cil managed {
800                 .maxstack 16
801
802                 ldc.i4 1234
803                 conv.ovf.i8.un
804                 conv.i4
805                 ret
806         }
807
808         .method public static int32 test_0_lconv_ovf_i () cil managed {
809                 .maxstack 16
810
811                 ldc.i4 1234
812                 conv.i8
813                 conv.ovf.i
814                 conv.i4
815                 ldc.i4 1234
816                 beq L1
817                 ldc.i4.1
818                 ret
819         L1:
820                 ldc.i4.0
821                 ret
822         }
823
824         .method public static int32 test_0_lconv_ovf_u () cil managed {
825                 .maxstack 16
826
827                 ldc.i4 1234
828                 conv.i8
829                 conv.ovf.u
830                 conv.i4
831                 ldc.i4 1234
832                 beq L1
833                 ldc.i4.1
834                 ret
835         L1:
836                 ldc.i4.0
837                 ret
838         }
839
840         .method public static int32 test_0_lconv_ovf_i_un () cil managed {
841                 .maxstack 16
842
843                 ldc.i4 1234
844                 conv.i8
845                 conv.ovf.i.un
846                 conv.i4
847                 ldc.i4 1234
848                 beq L1
849                 ldc.i4.1
850                 ret
851         L1:
852                 ldc.i4.0
853                 ret
854         }
855
856         .method public static int32 test_0_lconv_ovf_u_un () cil managed {
857                 .maxstack 16
858
859                 ldc.i4 1234
860                 conv.i8
861                 conv.ovf.u.un
862                 conv.i4
863                 ldc.i4 1234
864                 beq L1
865                 ldc.i4.1
866                 ret
867         L1:
868                 ldc.i4.0
869                 ret
870         }
871
872         .method public static int32 test_0_lconv_to_ovf_i8 () cil managed {
873                 .maxstack 16
874
875                 ldc.i4 1234
876                 conv.i8
877                 conv.ovf.i8
878                 conv.i4
879                 ldc.i4 1234
880                 beq L1
881                 ldc.i4.1
882                 ret
883         L1:
884                 ldc.i4.0
885                 ret
886         }
887
888         .method public static int32 test_0_lconv_to_ovf_u8_un () cil managed {
889                 .maxstack 16
890
891                 ldc.i4 1234
892                 conv.i8
893                 conv.ovf.u8.un
894                 conv.i4
895                 ldc.i4 1234
896                 beq L1
897                 ldc.i4.1
898                 ret
899         L1:
900                 ldc.i4.0
901                 ret
902         }
903
904         .method public static int32 test_2_lconv_to_ovf_i4_un () cil managed {
905                 .maxstack 16
906                 .locals init (int32 res)
907
908                 ldc.i4 0x7fffffff
909                 conv.u8
910                 conv.ovf.i4.un
911                 pop
912
913                 ldc.i4.2
914                 stloc res
915
916         .try {
917                         ldc.i8 0x80000000
918                         conv.ovf.i4.un
919                         pop
920                         ldc.i4.0
921                         stloc res
922                         leave RET
923                 } catch [mscorlib]System.OverflowException {
924                         pop
925                         leave IL_0
926                 }
927
928         IL_0:
929
930         .try {
931                         ldc.i8 0xffffffff80000000
932                         conv.ovf.i4.un
933                         pop
934                         ldc.i4.1
935                         stloc res
936                         leave RET
937                 } catch [mscorlib]System.OverflowException {
938                         pop
939                         leave RET
940                 }
941
942         RET:
943                 ldloc res
944                 ret
945         }
946
947     .method public static int32 test_1_lconv_to_ovf_i_un () cil managed {
948                 .maxstack 16
949                 .locals init (int32 res)
950
951                 ldc.i4 0x7fffffff
952                 conv.u8
953                 conv.ovf.i.un
954                 conv.i4
955                 pop
956
957                 ldc.i4.1
958                 ret
959         }
960
961         .method public static int32 test_32_lconv_to_u8 () cil managed
962         {
963                 .maxstack 16
964
965                 ldc.i4 32
966                 conv.i8
967                 conv.u8
968                 conv.i4
969                 ret
970         }                               
971
972         .method public static int32 test_32_lconv_to_i8 () cil managed
973         {
974                 .maxstack 16
975
976                 ldc.i4 32
977                 conv.i8
978                 conv.i8
979                 conv.i4
980                 ret
981         }                               
982
983         .method public static int32 test_15_lconv_to_u () cil managed
984         {
985         ldc.i8 0x10000000f
986                 conv.u
987                 conv.i4
988                 ret
989         }
990
991         .method public static int32 test_1234_fconv_u () cil managed {
992                 .maxstack 16
993
994                 ldc.r8 1234.0
995                 conv.u
996                 conv.i4
997                 ret
998         }
999
1000         .method public static int32 test_0_get_type_from_handle_on_bblock_boundary () cil managed 
1001         {
1002                 .maxstack 16
1003         
1004                 ldc.i4.1
1005                 brfalse OBJECT
1006         
1007                 ldtoken [mscorlib]System.String
1008                 br AFTER
1009         OBJECT:
1010                 ldtoken [mscorlib]System.Object
1011         AFTER:
1012                 call class [mscorlib]'System.Type' class [mscorlib]'System.Type'::'GetTypeFromHandle'(valuetype [mscorlib]'System.RuntimeTypeHandle')
1013                 callvirt instance string class [mscorlib]System.Type::get_FullName ()
1014                 ldstr "System.String"
1015                 callvirt instance bool class [mscorlib]System.Object::Equals(object)
1016                 ldc.i4.0
1017                 ceq
1018                 ret 
1019         }
1020                 
1021         .method public static int32 test_0_bug59580  ()
1022         {
1023                 ldc.r4          float32(0x7FC00000)
1024                 ldc.r4          float32(0x7FC00000)
1025                 bge.un          pass
1026                 br              fail
1027         pass:
1028                 ldc.i4.0
1029                 ret
1030         fail:
1031                 ldc.i4.1
1032                 ret
1033         }
1034         
1035         .method public static int32 test_1_bug60056  () {
1036                 .locals init (int32 m5)
1037                         
1038                 ldc.i4.m1
1039                 stloc.0
1040                 
1041                 ldc.i4.1
1042                 conv.u8
1043                 
1044                 ldloc.0
1045                 conv.i8
1046                 mul
1047                 
1048                 ldc.i4.m1
1049                 conv.i8
1050                 ceq
1051                 ret
1052         }
1053         
1054         .method public static int32 test_1_conv_u8_cfold  () {
1055                 ldc.i4.m1
1056                 conv.u8
1057                 
1058                 ldc.i8 0x00000000ffffffff
1059                 
1060                 ceq
1061                 ret
1062         }
1063         
1064         .method public static int32 test_1_array_type_mismatch_ldelema  () {
1065                 .locals init (int32 r)
1066                 
1067                         ldc.i4.1
1068                         newarr string
1069                         ldc.i4.0 
1070                         ldelema string
1071                         pop
1072                 
1073                 .try {
1074                         ldc.i4.1
1075                         newarr string
1076                         ldc.i4.0 
1077                         ldelema object
1078                         pop
1079                         
1080                         leave end
1081                 } catch [mscorlib]System.ArrayTypeMismatchException {
1082                         pop
1083                         ldc.i4.1
1084                         stloc.0
1085                         leave end
1086                 }
1087         end:
1088                 ldloc.0
1089                 ret
1090         }
1091
1092         .method public static int32 test_1_conv_ovf_i8_with_i4 () {
1093                         ldc.i4.m1 
1094                         conv.ovf.i8
1095                         conv.ovf.i4
1096                         neg
1097                         ret
1098         }
1099
1100         // bug #72148
1101     .method public static int32 test_0_initlocals_float_ptr () {
1102         .maxstack 3
1103         .locals init (
1104                 float32[]       V_0,
1105                 float32& pinned V_1,
1106                 unsigned int32  V_2)
1107                         ldc.i4.s 0x0f
1108                         newarr [mscorlib]System.Single
1109                         stloc.0 
1110                         ldloc.0 
1111                         ldc.i4.0 
1112                         ldc.r4 1.13
1113                         stelem.r4 
1114                         ldloc.0 
1115                         ldc.i4.0 
1116                         ldelema [mscorlib]System.Single
1117                         stloc.1 
1118                         ldloc.1 
1119                         conv.i 
1120                         ldind.u4 
1121                         stloc.2 
1122                         ldc.i4.0
1123                         ret
1124         }
1125
1126         .method public static int32 test_7_conv_ovf_u8_un () {
1127         .maxstack  2
1128         .locals    init (unsigned int64)
1129
1130         ldc.i4.7
1131         conv.ovf.u8.un
1132         stloc.0
1133                 ldloc.0
1134                 conv.i4
1135         ret
1136         }
1137
1138         .method public static int32 test_7_conv_ovf_u4_un () {
1139         .maxstack  2
1140         .locals    init (unsigned int32)
1141
1142         ldc.i4.7
1143         conv.ovf.u4.un
1144         stloc.0
1145                 ldloc.0
1146                 conv.i4
1147         ret
1148         }
1149
1150         .method public static int32 test_1_bug_74591 () {
1151                 .maxstack 16
1152                 .locals init (int32)
1153
1154                 ldc.i4.m1
1155                 stloc.0
1156                 ldloc.0
1157                 conv.ovf.i8
1158                 ldc.i4.m1
1159                 conv.ovf.i8
1160                 mul.ovf
1161                 conv.i4
1162                 ret
1163         }
1164
1165         .class nested public auto ansi Integer
1166                 extends [mscorlib]System.Object {
1167
1168                 .field public bool n
1169
1170             .method public hidebysig  specialname  rtspecialname 
1171            instance default void .ctor (unsigned int64 i, bool n)  cil managed 
1172             {
1173                         .maxstack 8
1174                         ldarg.0
1175                         call instance void class [mscorlib]System.Object::.ctor()
1176                         ldarg.0
1177                         ldarg.2
1178                         stfld bool Tests/Integer::n
1179                         ret
1180                 }
1181         }
1182
1183         .method public static int32 test_1_bug_74726 () {
1184                 .maxstack 16
1185
1186                 ldc.i4.2
1187                 conv.ovf.u8
1188                 ldc.i4.1
1189                 conv.ovf.u8
1190                 mul.ovf.un
1191                 ldc.i4.1
1192                 newobj instance void class Tests/Integer::.ctor(unsigned int64, bool)
1193                 ldfld bool Tests/Integer::n
1194                 ldc.i4.1
1195                 ceq
1196                 ret
1197         }
1198
1199         .class nested private auto ansi sealed xxx
1200         extends [mscorlib]System.ValueType
1201    {
1202      .field  public   object a
1203
1204      .method public hidebysig  specialname  rtspecialname 
1205             instance default void .ctor ()  cil managed 
1206      {
1207                  .maxstack 8
1208                  ret 
1209      }
1210    } // end of class xxx
1211
1212         .method public static int32 test_0_newobj_vtype () {
1213                 .maxstack 6
1214                 .locals init (
1215                         valuetype Tests/xxx V_0
1216                 )
1217
1218                 newobj instance void valuetype Tests/xxx::.ctor ()
1219                 stloc.0
1220                 ldloca.s 0
1221                 ldfld object Tests/xxx::a
1222                 brfalse OK
1223                 ldc.i4.s 1
1224                 ret
1225         OK:
1226                 ldc.i4.s 0
1227                 ret
1228         }
1229
1230         .method public static int32 test_0_newobj_vtype_primitive () {
1231                 .maxstack 6
1232                 .locals init (
1233                         native int V_0
1234                 )
1235
1236                 ldc.i4.s 10
1237                 newobj instance void native int::'.ctor'(int32)
1238                 stloc.0
1239                 ldloc.0
1240                 ldc.i4.s 10
1241                 beq OK
1242                 ldc.i4.s 1
1243                 ret
1244         OK:
1245                 ldc.i4.s 0
1246                 ret
1247         }
1248
1249         .method public static int32 test_1_filters () {
1250                 .custom instance void [TestDriver]CategoryAttribute::.ctor(string) = ( 01 00 08 21 42 49 54 43 4F 44 45 00 00 )          // ...!BITCODE..
1251                 .maxstack 16
1252                 .locals init (
1253                         int32 res
1254                 )
1255
1256                 .try { // 0
1257                         .try {
1258                                 ldstr "OnErrorSub test Exception"
1259                                 newobj instance void class [mscorlib]System.Exception::.ctor(string)
1260                                 throw 
1261                                 leave.s IL_0033
1262                         }
1263                         filter {
1264                                 pop
1265                                 ldc.i4.0
1266                                 endfilter
1267                         } {
1268                                 pop
1269                                 // Should not be called
1270                                 ldc.i4.2
1271                                 stloc res
1272                                 leave.s IL_0033
1273                         }
1274                 }
1275                 filter {
1276                         pop
1277                         ldc.i4.1
1278                         endfilter 
1279                 } {
1280                   pop
1281                   ldc.i4.1
1282                   stloc res       
1283                   leave.s IL_0033
1284
1285                 }
1286                 IL_0033:
1287                 ldloc res
1288                 ret
1289         }
1290
1291         .class nested private auto ansi sealed beforefieldinit TheStruct
1292                 extends [mscorlib]System.ValueType {
1293                 .field public int32 a
1294                 .field public int32 b
1295         }
1296
1297         .method public static int32 test_5_cpobj () {
1298                 .maxstack 8
1299                 .locals init (  
1300                                 valuetype Tests/TheStruct v_0, 
1301                                 valuetype Tests/TheStruct v_1
1302                                          )
1303
1304                 ldloca v_0
1305                 ldc.i4.2
1306                 stfld int32 Tests/TheStruct::a
1307
1308                 ldloca v_0
1309                 ldc.i4.3
1310                 stfld int32 Tests/TheStruct::b
1311
1312                 ldloca v_1
1313                 ldloca v_0
1314                 cpobj Tests/TheStruct
1315
1316                 ldloca v_1
1317                 ldfld int32 Tests/TheStruct::a
1318                 ldloca v_1
1319                 ldfld int32 Tests/TheStruct::b
1320                 add
1321
1322                 ret
1323         }
1324
1325         .method public static int32 test_5_ldobj_stloc_optimization () {
1326                 .maxstack 8
1327                 .locals init (  
1328                                 valuetype Tests/TheStruct v_0, 
1329                                 valuetype Tests/TheStruct v_1
1330                                          )
1331
1332                 ldloca v_0
1333                 ldc.i4.2
1334                 stfld int32 Tests/TheStruct::a
1335
1336                 ldloca v_0
1337                 ldc.i4.3
1338                 stfld int32 Tests/TheStruct::b
1339
1340                 ldloca v_0
1341                 ldobj valuetype Tests/TheStruct
1342                 stloc.s v_1
1343
1344                 ldloca v_1
1345                 ldfld int32 Tests/TheStruct::a
1346                 ldloca v_1
1347                 ldfld int32 Tests/TheStruct::b
1348                 add
1349
1350                 ret
1351         }
1352
1353         .method public static int32 test_1_cpobj_reference () {
1354                 .maxstack 8
1355                 .locals init (  
1356                                 object v_0, 
1357                                 object v_1
1358                                          )
1359
1360                 newobj instance void object::.ctor()
1361                 stloc v_0
1362
1363                 ldloca v_1
1364                 ldloca v_0
1365                 cpobj object
1366
1367                 ldloc v_0
1368                 ldloc v_1
1369                 ceq
1370                 ret
1371         }
1372
1373         .method public static int32 test_1_initobj_reference () {
1374                 .maxstack 8
1375                 .locals init (  
1376                                 object v_0
1377                                          )
1378
1379                 newobj instance void object::.ctor()
1380                 stloc v_0
1381
1382                 ldloca v_0
1383                 initobj object
1384
1385                 ldloc v_0
1386                 ldnull
1387                 ceq
1388                 ret
1389         }
1390
1391         .method public static int32 test_1_ldobj_reference () {
1392                 .maxstack 8
1393                 .locals init (  
1394                                 object v_0
1395                                          )
1396
1397                 newobj instance void object::.ctor()
1398                 stloc v_0
1399
1400                 ldloc v_0
1401                 ldloca v_0
1402                 ldobj object
1403                 ceq
1404                 ret
1405         }
1406
1407         .method public static int32 test_5_vtype_on_bb_boundary () {
1408                 .maxstack 8
1409                 .locals init (  
1410                                 valuetype Tests/TheStruct v_0, 
1411                                 valuetype Tests/TheStruct v_1
1412                                          )
1413
1414                 ldloca v_0
1415                 ldc.i4.2
1416                 stfld int32 Tests/TheStruct::a
1417
1418                 ldloca v_0
1419                 ldc.i4.3
1420                 stfld int32 Tests/TheStruct::b
1421
1422                 ldloc v_0
1423                 br L_0
1424         L_0: stloc v_1
1425
1426                 ldloca v_1
1427                 ldfld int32 Tests/TheStruct::a
1428                 ldloca v_1
1429                 ldfld int32 Tests/TheStruct::b
1430                 add
1431                 ret
1432         }
1433
1434         .method public static int32 test_5_different_in_stacks () cil managed {
1435                 .maxstack 16
1436
1437                         ldc.i4.1
1438                         ldc.i4.1
1439                         beq L_0
1440
1441                         ldc.i4.3
1442                         ldc.i4.3
1443                         br L_1
1444                         ldc.i4.3
1445                         ldc.i4.3
1446                         br L_2
1447          L_0:   ldc.i4.2
1448                         ldc.i4.3
1449                         ldc.i4.1
1450                         ldc.i4.1
1451                         beq L_2
1452          L_1:   add
1453                         ret
1454          L_2:   add
1455                         ret
1456         }
1457
1458         .method public static int32 test_3_larray_get_set () {
1459                 .locals init (
1460                         int32[2]        V_0)
1461                           
1462                         ldc.i4.2 
1463                         newobj instance void int32[0...]::.ctor(int32)
1464                         stloc.0 
1465                         ldloc.0 
1466                         ldc.i4.0 
1467                         ldc.i4 1
1468                         call instance void int32[0...]::Set(int32, int32)
1469                     ldloc.0 
1470                     ldc.i4.1 
1471                         ldc.i4 2
1472                         call instance void int32[0...]::Set(int32, int32)
1473
1474                         ldloc.0
1475                         ldc.i4.0
1476                         call instance int32 int32[0...]::Get(int32)
1477                         ldloc.0
1478                         ldc.i4.1
1479                         call instance int32 int32[0...]::Get(int32)
1480                         add
1481                         ret
1482         }
1483
1484         .method public static int32 test_0_pop_side_effects () {
1485                 .try {
1486                         ldc.r8 1
1487                         ldc.r8 0
1488                         div
1489                         ckfinite
1490                         pop
1491                         leave FAIL
1492                 }
1493                 catch [mscorlib]System.ArithmeticException {
1494                         pop
1495                         leave L_0
1496                 }
1497                 L_0:
1498                 ldc.i4.0
1499                 ret
1500                 FAIL:
1501                 ldc.i4.1
1502                 ret
1503         }
1504
1505         .method public static void regalloc_regress_78314_helper (object o) cil managed
1506         {
1507                 ret
1508         }
1509
1510         .method public static int32 test_1_regalloc_regress_78314 () cil managed
1511         {
1512     // Code size       68 (0x44)
1513     .maxstack  6
1514     .locals init (int32 V_0, bool V_1)
1515     IL_0000:  ldc.i4.0
1516     IL_0001:  stloc.0
1517     IL_0002:  br.s       IL_003b
1518
1519     IL_0004:
1520     IL_001e:  ldc.i4.s   10
1521     IL_0020:  ldloc.0
1522     IL_0021:  shl
1523     IL_0022:  ldc.i4.s   10
1524     IL_0024:  ldloc.0
1525     IL_0025:  shl
1526     IL_0026:  ceq
1527     IL_0028:  box        [mscorlib]System.Boolean
1528     IL_0032:  call       void Tests::regalloc_regress_78314_helper(object)
1529     IL_0037:  ldloc.0
1530     IL_0038:  ldc.i4.1
1531     IL_0039:  add
1532     IL_003a:  stloc.0
1533     IL_003b:  ldloc.0
1534     IL_003c:  ldc.i4.8
1535     IL_003f:  blt.s      IL_0004
1536
1537         ldloc.0
1538         ldc.i4.8
1539         ceq
1540         conv.i4
1541         ret     
1542   }
1543
1544         .method public static void try_block_end_remove_if_useless () cil managed {
1545             .maxstack  8
1546
1547             T_START:
1548                 ldstr   "Start"
1549                         pop
1550                 leave.s COMPLETE
1551             T1_END:
1552
1553             COMPLETE:
1554                 ret
1555
1556             F1_START:
1557                 ldstr   "Finally1"
1558                         pop
1559                 endfinally
1560             F1_END:
1561
1562             .try T_START to T1_END finally handler F1_START to F1_END
1563         }
1564
1565         .method public static int32 test_0_try_block_end_remove_if_useless () cil managed {
1566                 call void class Tests::try_block_end_remove_if_useless ()
1567                 ldc.i4.0
1568                 ret
1569         }
1570
1571    .method private static int32 test_0_regress_78629_switch_next_ins_target ()  cil managed
1572     {
1573         ldc.i4.0
1574         switch (target)
1575         target: ldstr "bar"
1576                 pop
1577                 ldc.i4.0
1578         ret
1579     }
1580
1581         // This belongs to basic-float.cs, but its hard to tell mcs/csc to
1582         // generate the non .un version of the opcodes
1583     .method private static  hidebysig 
1584            default int32 test_4_float_branch_nan ()  cil managed 
1585     {
1586         // Method begins at RVA 0x27a4
1587         // Code size 74 (0x4a)
1588         .maxstack 2
1589         .locals init (
1590                 float64 V_0,
1591                 float64 V_1,
1592                 int32   V_2)
1593         IL_0000:  ldc.r8 (00 00 00 00 00 00 f8 ff)
1594         IL_0009:  stloc.0 
1595         IL_000a:  ldc.r8 1.
1596         IL_0013:  stloc.1 
1597         IL_0014:  ldc.i4.0 
1598         IL_0015:  stloc.2 
1599         IL_0016:  ldloc.0 
1600         IL_0017:  ldloc.1 
1601         IL_0018:  bge.s IL_001a
1602
1603                                 br L1
1604         IL_001a:  ldloc.2 
1605         IL_001b:  ret 
1606         L1:
1607         IL_001c:  ldloc.2 
1608         IL_001d:  ldc.i4.1 
1609         IL_001e:  add 
1610         IL_001f:  stloc.2 
1611         IL_0020:  ldloc.0 
1612         IL_0021:  ldloc.1 
1613         IL_0022:  ble.s IL_002e
1614                                 br L2
1615         IL_002e:  ldloc.2 
1616         IL_002f:  ret 
1617         L2:
1618         IL_0030:  ldloc.2 
1619         IL_0031:  ldc.i4.1 
1620         IL_0032:  add 
1621         IL_0033:  stloc.2 
1622         IL_0034:  ldloc.0 
1623         IL_0035:  ldloc.1 
1624         IL_0036:  blt.s IL_0038
1625                                 br L3           
1626         IL_0038:  ldloc.2 
1627         IL_0039:  ret 
1628         L3:
1629         IL_003a:  ldloc.2 
1630         IL_003b:  ldc.i4.1 
1631         IL_003c:  add 
1632         IL_003d:  stloc.2 
1633         IL_003e:  ldloc.0 
1634         IL_003f:  ldloc.1 
1635         IL_0040:  bgt.s IL_0042
1636                                 br L4
1637         IL_0042:  ldloc.2 
1638         IL_0043:  ret 
1639         L4:
1640         IL_0044:  ldloc.2 
1641         IL_0045:  ldc.i4.1 
1642         IL_0046:  add 
1643         IL_0047:  stloc.2 
1644         IL_0048:  ldloc.2 
1645         IL_0049:  ret 
1646     } // end of method Tests::test_5_float_branch_nan
1647
1648     .method private static  hidebysig
1649            default void regress_80622_inner (object x)  cil managed
1650     {
1651                 .locals init (unsigned int8 i)
1652         // Method begins at RVA 0x2050
1653         // Code size 14 (0xe)
1654         .maxstack 8
1655         IL_1000:  ldarg.0
1656         IL_1001:  unbox unsigned int8
1657         IL_1006:  ldobj unsigned int8
1658         IL_000b:  conv.ovf.i4.un
1659         IL_000c:  pop
1660         IL_000d:  ret
1661     }
1662
1663     // method line 2
1664     .method private static  hidebysig
1665            default int32 test_0_regress_80622 ()  cil managed
1666     {
1667         .maxstack 8
1668         IL_0000:  ldc.i4 255
1669         IL_0005:  box unsigned int8
1670         IL_000a:  call void class Tests::regress_80622_inner (object)
1671                 ldc.i4.0
1672         IL_000f:  ret
1673     }
1674
1675         .method private static default int32 test_0_regresss_80190 () cil managed
1676         {
1677             .maxstack  2
1678             .locals init (int32 V_0,
1679                      int32* V_1)
1680             IL_0000:  nop
1681             IL_0001:  nop
1682             IL_0002:  ldloca.s   V_0
1683             IL_0004:  conv.u
1684             IL_0005:  stloc.1
1685             IL_0006:  ldloc.1
1686             IL_0007:  ldc.i4.3
1687             IL_0008:  stind.i4
1688             IL_0009:  nop
1689                                   ldc.i4.0
1690                                   ret
1691         }
1692
1693         .class interface nested public auto ansi abstract IFaceWithStaticMethod
1694         {
1695             .method public static  specialname 
1696                default void foo ()  cil managed noinlining 
1697             {
1698                 .maxstack 0
1699                 IL_0000:  ret 
1700         }
1701         }
1702         
1703         .class nested public auto ansi AClass extends [mscorlib]System.Object implements Tests/IFaceWithStaticMethod
1704         {
1705             .method public hidebysig  specialname  rtspecialname 
1706            instance default void .ctor ()  cil managed 
1707             {
1708                         .maxstack 8
1709                         ret
1710                 }
1711
1712         }
1713
1714         // Test that static methods in interfaces are ignored during vtable construction
1715         .method private static default int32 test_0_ifaces_with_static_methods () cil managed
1716         {
1717                 .maxstack 16
1718
1719                 newobj instance void class Tests/AClass::.ctor()
1720                 pop
1721                 ldc.i4.0
1722                 ret
1723         }
1724
1725         .method private static hidebysig default int32 Foo<T> (!!T n)  cil managed {
1726                 ldarg.0
1727                 box !!0
1728                 brtrue HAS_VALUE
1729                 ldc.i4.0
1730                 ret
1731 HAS_VALUE:      ldc.i4.1
1732                 ret
1733         }
1734
1735         // bug 78019
1736         .method static public int32 test_0_nullable_box_brtrue () cil managed {
1737
1738                 .locals init (valuetype [mscorlib]System.Nullable`1<int32> V_0)
1739
1740                 ldloc.0
1741                 call int32 class Tests::Foo<valuetype [mscorlib]System.Nullable`1<int32>> (!!0)
1742                 ret
1743         }
1744
1745         //Bug 372410
1746         .method static public int32 test_0_ldelema_type_check () cil managed {
1747                 .maxstack 16
1748                 .locals init (object[] V_0,
1749                                           object[,] V_1)
1750
1751                 ldc.i4.1
1752                 newarr object
1753                 stloc.0
1754
1755                 .try {
1756                         ldloc.0
1757                         ldc.i4.0
1758                         ldelema object
1759                         leave L1
1760                 } catch [mscorlib]System.ArrayTypeMismatchException {
1761                         leave ERROR1
1762                 }
1763
1764         L1:
1765                 ldc.i4.1
1766                 newarr string
1767                 stloc.0
1768
1769                 .try {
1770                         ldloc.0
1771                         ldc.i4.0
1772                         ldelema object
1773                         leave ERROR2
1774                 } catch [mscorlib]System.ArrayTypeMismatchException {
1775                         leave L2
1776                 }
1777
1778         L2:
1779                         ldc.i4.1
1780                 newarr string
1781                 stloc.0
1782
1783                 .try {
1784                         ldloc.0
1785                         ldc.i4.0
1786                         readonly. ldelema object
1787                         leave L3
1788                 } catch [mscorlib]System.ArrayTypeMismatchException {
1789                         leave ERROR3
1790                 }
1791
1792         L3:
1793                 ldc.i4.0
1794                 ret
1795
1796
1797         ERROR1:
1798                 ldc.i4.1
1799                 ret
1800
1801         ERROR2:
1802                 ldc.i4.2
1803                 ret
1804
1805         ERROR3:
1806                 ldc.i4.3
1807                 ret
1808         }
1809
1810
1811         //Bug 372410
1812         .method static public int32 test_0_array_address_type_check () cil managed {
1813                 .maxstack 16
1814                 .locals init (object[] V_0,
1815                                           object[,] V_1)
1816
1817                 ldc.i4.1 
1818             ldc.i4.1 
1819             newobj instance void object[,]::.ctor(int32, int32)
1820                 stloc.1
1821
1822                 .try {
1823                         ldloc.1
1824                         ldc.i4.0
1825                         ldc.i4.0
1826                         call instance object&  object[,]::Address(int32, int32)
1827                         leave L4
1828                 } catch [mscorlib]System.ArrayTypeMismatchException {
1829                         leave ERROR4
1830                 }
1831
1832         L4:
1833                 ldc.i4.1 
1834             ldc.i4.1 
1835             newobj instance void string[,]::.ctor(int32, int32)
1836                 stloc.1
1837
1838                 .try {
1839                         ldloc.1
1840                         ldc.i4.0
1841                         ldc.i4.0
1842                         call instance object&  object[,]::Address(int32, int32)
1843                         leave ERROR5
1844                 } catch [mscorlib]System.ArrayTypeMismatchException {
1845                         leave L5
1846                 }
1847
1848         L5:
1849                 ldc.i4.1 
1850             ldc.i4.1 
1851             newobj instance void string[,]::.ctor(int32, int32)
1852                 stloc.1
1853
1854                 .try {
1855                         ldloc.1
1856                         ldc.i4.0
1857                         ldc.i4.0
1858                         readonly. call instance object&  object[,]::Address(int32, int32)
1859                         leave L6
1860                 } catch [mscorlib]System.ArrayTypeMismatchException {
1861                         leave ERROR6
1862                 }
1863
1864         L6:
1865                 ldc.i4.0
1866                 ret
1867         ERROR4:
1868                 ldc.i4.4
1869                 ret
1870
1871         ERROR5:
1872                 ldc.i4.5
1873                 ret
1874
1875         ERROR6:
1876                 ldc.i4.6
1877                 ret
1878         }
1879
1880         .field public  static unsigned int64 'ull'
1881
1882         .field public  static int32 'shift2'
1883
1884         .method public static int32 test_0_long_shift_regalloc () cil managed
1885         {
1886                 .locals init (unsigned int32 'cilsimp.28', unsigned int64 'cilsimp.27', int32 'cilsimp.26')
1887
1888                 .maxstack 4
1889
1890                 ldc.i8  81985529234382576
1891                 stsfld  unsigned int64 Tests::ull
1892             ldc.i4      60
1893                 stsfld  int32 Tests::shift2
1894
1895                 ldsfld  unsigned int64 Tests::ull
1896                 stloc   'cilsimp.27'
1897                 ldsfld  int32 Tests::shift2
1898                 stloc   'cilsimp.28'
1899                 ldloc   'cilsimp.27'
1900                 ldloc   'cilsimp.28'
1901                 shr.un
1902                 ldloc   'cilsimp.27'
1903                 ldc.i4  64
1904                 ldloc   'cilsimp.28'
1905                 sub
1906                 shl
1907                 or
1908                 ldc.i8  1311768467750121216
1909                 ceq
1910                 ldc.i4.1
1911                 xor
1912                 conv.u4
1913                 ret
1914         }
1915
1916         // Test calling ldfld directly on a vtype instead of a vtype address
1917         .method public static int32 test_5_call_ldfld_vtype () cil managed
1918         {
1919                 .maxstack 16
1920                 .locals init (
1921                         valuetype Tests/TailCallStruct arg
1922                 )
1923                 ldloca 0
1924                 ldc.i4.2
1925                 stfld int32 Tests/TailCallStruct::a
1926                 ldloca 0
1927                 ldc.i4.4
1928                 stfld int32 Tests/TailCallStruct::b
1929                 ldloc.0
1930                 call valuetype Tests/TailCallStruct Tests::tail2 (valuetype Tests/TailCallStruct)
1931                 ldfld int32 Tests/TailCallStruct::a
1932                 ret
1933         }
1934
1935         .method public static int32 throw_ret () cil managed
1936         {
1937                 ldstr "FOO"
1938                 newobj instance void class [mscorlib]System.OverflowException::.ctor(string)
1939                 throw
1940                 ldc.i4.4
1941                 ret
1942         }
1943
1944         .method public static int32 throw2_ret () cil managed
1945         {
1946                 // Disable inlining
1947                 ldc.i4.5
1948                 localloc
1949                 pop
1950
1951                 call int32 Tests::throw_ret ()
1952                 ret
1953         }
1954
1955         // Test inlining a method which contains just a throw
1956         .method public static int32 test_0_inline_throw () cil managed
1957         {
1958                 .maxstack 16
1959                 .locals init (
1960                                 int32 v_0
1961                 )
1962
1963                 .try {
1964                         call int32 Tests::throw2_ret ()
1965                         stloc.0
1966                         leave L0
1967                 } catch [mscorlib]System.OverflowException {
1968                         pop
1969                         leave L1
1970                 }
1971
1972                 L0:
1973                         ldc.i4.1
1974                         ret
1975                 L1:
1976                         ldc.i4.0
1977                         ret                     
1978         }
1979
1980     .method public static int32 test_0_stelem_any_null_opt () cil managed
1981     {
1982                 .maxstack 16
1983                 .locals init (
1984                                 object[]        V_0,
1985                                 int32   V_1)
1986
1987                 ldc.i4.s 10
1988                 newarr [mscorlib]System.Object
1989                 stloc.0
1990
1991                 ldc.i4.0
1992                 stloc.1
1993                 br L0
1994
1995         L1:
1996                 ldloc.0
1997                 ldloc.1
1998                 ldnull
1999                 stelem.any [mscorlib]System.Object
2000                 ldloc.1
2001                 ldc.i4.1
2002                 add
2003                 stloc.1
2004         L0:
2005                 ldloc.1
2006                 ldc.i4.s 10
2007                 blt L1
2008
2009                 ldc.i4.0
2010                 ret
2011         }
2012
2013     // method line 2
2014     .method public static  hidebysig 
2015            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 
2016     {
2017         // Method begins at RVA 0x20f4
2018         // Code size 44 (0x2c)
2019         .maxstack 8
2020         IL_0000:  ldarg.0 
2021         IL_0001:  ldarg.1 
2022         IL_0002:  add 
2023         IL_0003:  ldarg.2 
2024         IL_0004:  add 
2025         IL_0005:  ldarg.3 
2026         IL_0006:  add 
2027         IL_0007:  ldarg.s 4
2028         IL_0009:  add 
2029         IL_000a:  ldarg.s 5
2030         IL_000c:  add 
2031         IL_000d:  ldarg.s 6
2032         IL_000f:  add 
2033         IL_0010:  ldarg.s 7
2034         IL_0012:  add 
2035         IL_0013:  ldarg.s 8
2036         IL_0015:  add 
2037         IL_0016:  ldarg.s 9
2038         IL_0018:  add 
2039         IL_0019:  ldarg.s 10
2040         IL_001b:  add 
2041         IL_001c:  ldarg.s 11
2042         IL_001e:  add 
2043         IL_001f:  ldarg.s 12
2044         IL_0021:  add 
2045         IL_0022:  ldarg.s 13
2046         IL_0024:  add 
2047         IL_0025:  ldarg.s 14
2048         IL_0027:  add 
2049         IL_0028:  ldarg.s 15
2050         IL_002a:  add 
2051         IL_002b:  ret 
2052     } // end of method main::callee
2053
2054     // method line 3
2055     .method public static  hidebysig 
2056            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 
2057     {
2058         // Method begins at RVA 0x2124
2059         // Code size 34 (0x22)
2060         .maxstack 17
2061         IL_0000:  ldarg.0 
2062                           ldc.i4.1
2063                           add
2064         IL_0001:  ldarg.1 
2065         IL_0002:  ldarg.2 
2066         IL_0003:  ldarg.3 
2067         IL_0004:  ldarg.s 4
2068         IL_0006:  ldarg.s 5
2069         IL_0008:  ldarg.s 6
2070         IL_000a:  ldarg.s 7
2071         IL_000c:  ldarg.s 8
2072         IL_000e:  ldarg.s 9
2073         IL_0010:  ldarg.s 10
2074         IL_0012:  ldarg.s 11
2075         IL_0014:  ldarg.s 12
2076         IL_0016:  ldarg.s 13
2077         IL_0018:  ldarg.s 14
2078                           ldc.i4.1
2079                           add
2080         IL_001a:  ldarg.s 15
2081                           ldc.i4.1
2082                           add
2083                   tail.
2084         IL_001c:  call int32 class Tests::manyargs_callee(int32, int32, int32, int32, int32, int32, int32, int32, int32, int32, int32, int32, int32, int32, int32, int32)
2085         IL_0021:  ret 
2086     } // end of method main::caller
2087
2088     // method line 4
2089     .method public static  hidebysig 
2090            default int32 test_139_many_args_tail_call ()  cil managed
2091     {
2092                 // Some platforms might not be able to AOT tail calls
2093                 .custom instance void class [TestDriver]CategoryAttribute::'.ctor'(string) =  (01 00 08 21 46 55 4C 4C 41 4F 54 00 00 ) // ...!FULLAOT..
2094
2095         // Method begins at RVA 0x2154
2096         // Code size 43 (0x2b)
2097         .maxstack 17
2098         IL_0000:  ldc.i4.1 
2099         IL_0001:  ldc.i4.2 
2100         IL_0002:  ldc.i4.3 
2101         IL_0003:  ldc.i4.4 
2102         IL_0004:  ldc.i4.5 
2103         IL_0005:  ldc.i4.6 
2104         IL_0006:  ldc.i4.7 
2105         IL_0007:  ldc.i4.8 
2106         IL_0008:  ldc.i4.s 0x09
2107         IL_000a:  ldc.i4.s 0x0a
2108         IL_000c:  ldc.i4.s 0x0b
2109         IL_000e:  ldc.i4.s 0x0c
2110         IL_0010:  ldc.i4.s 0x0d
2111         IL_0012:  ldc.i4.s 0x0e
2112         IL_0014:  ldc.i4.s 0x0f
2113         IL_0016:  ldc.i4.s 0x10
2114         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)
2115         IL_0028:  ret 
2116     } // end of method main::Main
2117
2118         .class nested private auto ansi beforefieldinit R1
2119            extends [mscorlib]System.MarshalByRefObject
2120         {
2121                 .field  public  int32 test_field
2122
2123         .method public hidebysig  specialname  rtspecialname
2124                         instance default void '.ctor' ()  cil managed
2125         {
2126                         ret
2127                 }
2128         }
2129
2130         .method public static hidebysig
2131                         default int32 return_0 () cil managed
2132         {
2133                 ldc.i4.0
2134                 ret
2135         }
2136
2137         .method public static hidebysig
2138                         default int32 test_1_volatile_marshalbyref_bug_432673 () cil managed
2139         {
2140                 .locals init (
2141                         class Tests/R1 v_0
2142                 )
2143
2144                 newobj instance void class Tests/R1::.ctor ()
2145                 stloc.0
2146                 ldloc.0
2147                 ldc.i4.0
2148                 volatile.
2149                 stfld int32 Tests/R1::test_field
2150                 call int32 class Tests::return_0 ()
2151                 ldc.i4.1
2152                 add
2153                 ret
2154         }
2155
2156         .method public static default int32 return_2 () cil managed
2157         {
2158                 // Prevent inlining
2159                 ldc.i4.s 16
2160         localloc
2161                 pop
2162                 ldc.i4.s 2
2163                 ret
2164         }
2165
2166         .method public static hidebysig
2167                         default int32 test_1_cmov_opt_regress_463357 () cil managed
2168         {
2169                 call int32 class Tests::return_2 ()
2170                 ldc.i4.0
2171                 ceq
2172                 brfalse L1
2173                 ldc.i4.0
2174                 ret
2175                 br L2
2176         L1: nop
2177         L2: nop
2178                 ldc.i4.1
2179                 ret
2180         }
2181
2182    .method public static hidebysig default int32 cmov_opt_regress_474718_inner (int32 A_1)  cil managed 
2183    {
2184       .maxstack 3
2185       .locals init (int32 V_0, bool V_1, bool V_2)
2186       
2187           ldc.i4.0
2188       IL_000b:  stloc.1 
2189       IL_000d:  br IL_002f
2190
2191           ldc.i4.1    
2192           stloc.2
2193       IL_001e:  ldloc.2 
2194       IL_001f:  brfalse IL_0036
2195
2196       IL_0024:  
2197       IL_002a:  br IL_0041
2198     
2199       IL_002f:  ldloc.1
2200       IL_0030:  stloc.2 
2201       IL_0031:  br IL_001e
2202     
2203       IL_0036:  ldc.i4 0
2204       IL_003b:  stloc.0 
2205       IL_003c:  br IL_0041
2206     
2207       IL_0041:  ldloc.0 
2208       IL_0042:  ret 
2209   } 
2210
2211     .method public static default int32 test_0_cmov_opt_regress_474718 ()  cil managed 
2212     {
2213         .maxstack 16
2214         ldc.i4.1
2215         call int32 Tests::cmov_opt_regress_474718_inner (int32)
2216         ret
2217    }
2218
2219         .method public static default int32 test_5_createarr_newobj () cil managed
2220         {
2221                 .maxstack 16
2222
2223                 ldc.i4 5
2224                 newobj void char[]::.ctor(int32)
2225                 ldlen
2226                 ret
2227         }
2228
2229         .method public static default int32 test_0_initblk_3_regress_481458 () cil managed
2230         {
2231                 .maxstack 16
2232                 .locals init (native int)
2233
2234                 ldc.i4.s 10
2235                 localloc
2236                 stloc.0
2237
2238                 // Set the first value to 3
2239                 ldloc.0
2240                 ldc.i4.0
2241                 add             //addr
2242                 ldc.i4.3        //value
2243                 stind.i1
2244
2245                 // Zero out the first 3 values
2246                 ldloc.0         //addr
2247                 ldc.i4.0        //value
2248                 ldc.i4.s 3      //size
2249                 initblk
2250
2251                 // Load the first value
2252                 ldloc.0
2253                 ldc.i4.0
2254                 add     
2255                 ldind.u1
2256                 conv.i4
2257                 ret
2258         }
2259
2260         .method public static float32 GetFloat32() cil managed noinlining
2261         {
2262                 .maxstack  8
2263                 ldc.r8     0.19975845134874831
2264                 ret
2265         }
2266
2267 /*         Disabled until they can be fixed to run on amd64
2268         .method public static default int32 test_0_implicit_float_to_double_conversion () cil managed
2269         {
2270                 .maxstack 16
2271
2272                 call float32 Tests::GetFloat32()
2273                 ldc.r8     0.19975845134874831
2274                 beq OK
2275
2276                 ldc.i4.1
2277                 ret
2278 OK:
2279                 ldc.i4.0
2280                 ret
2281         }
2282 */
2283
2284         .method public static default int32 test_0_long_to_r8_un_overflow () cil managed
2285         {
2286                 .maxstack 16
2287                 ldc.i8     0x00FFFFFFFFFFFFFF
2288                 conv.r.un
2289                 conv.i8
2290                 ldc.i8 0x100000000000000
2291                 beq OK_1
2292
2293                 ldc.i4.1
2294                 ret
2295 OK_1:
2296                 ldc.i8     0x00FFFFFFFFFFFFFF
2297                 conv.r.un
2298                 conv.r8
2299                 conv.i8
2300                 ldc.i8 0x100000000000000
2301                 beq OK_2
2302
2303                 ldc.i4.2
2304                 ret
2305 OK_2:
2306                 ldc.i4.0
2307                 ret
2308         }
2309
2310         .field public static int32 shift1
2311
2312         .method public static int32 regress_497271_helper (int32 i) cil managed
2313         {
2314                 ldarg.0
2315                 ret
2316         }
2317
2318         .method public static int32 test_0_regalloc_regress_497271 () cil managed
2319         {
2320                 .locals init (int32 var)
2321
2322                 ldc.i4  4
2323                 stsfld  int32 Tests::shift1
2324                 ldsfld  int32 Tests::shift1
2325                 stloc   var
2326                 ldc.i4  4660
2327                 ldloc   var
2328                 shr.un
2329                 ldc.i4  4660
2330                 ldc.i4  32
2331                 ldloc   var
2332                 sub
2333                 shl
2334                 or
2335                 ldc.i4  1073742115
2336                 beq     ?L10
2337 ?L9:
2338                 ldc.i4  1
2339                 call    int32 Tests::regress_497271_helper (int32)
2340                 ret
2341 ?L10:
2342                 ldc.i4  0
2343                 call    int32 Tests::regress_497271_helper (int32)
2344                 ret
2345         }
2346
2347    .field  private static  int32 Value
2348
2349   .method public static hidebysig  specialname 
2350           default int32 regress_513931_inner ()  cil managed 
2351     {                                                                 
2352         // Method begins at RVA 0x225c                                
2353         // Code size 52 (0x34)                                        
2354         .maxstack 2                                                   
2355         .locals init (                                                
2356                 int32   V_0,                                          
2357                 int32   V_1,                                          
2358                 bool    V_2)
2359                        
2360                                 ldc.i4 999
2361                                 stsfld int32 Tests::Value
2362
2363         IL_0000:  nop                                                 
2364         IL_0001:  ldsfld int32 Tests::Value      
2365         IL_0006:  stloc.0                                             
2366         IL_0007:  ldloc.0                                             
2367         IL_0008:  ldc.i4.0                                            
2368         IL_0009:  cgt                                                 
2369         IL_000b:  ldc.i4.0                                            
2370         IL_000c:  ceq                                                 
2371         IL_000e:  stloc.2                                             
2372         IL_000f:  ldloc.2                                             
2373         IL_0010:  brtrue.s IL_0027                                    
2374
2375         IL_0012:  nop 
2376         IL_0013:  ldloc.0 
2377         IL_0014:  ldc.i4.s 0x7b
2378         IL_0016:  ceq          
2379         IL_0018:  ldc.i4.0     
2380         IL_0019:  ceq          
2381         IL_001b:  stloc.2      
2382         IL_001c:  ldloc.2      
2383         IL_001d:  brtrue.s IL_0023
2384
2385         IL_001f:  ldc.i4.m1 
2386         IL_0020:  stloc.1   
2387         IL_0021:  br.s IL_0032
2388
2389         IL_0023:  ldc.i4.1 
2390         IL_0024:  stloc.1  
2391         IL_0025:  br.s IL_0032
2392
2393         IL_0027:  
2394         IL_002c:  newobj instance void class [mscorlib]System.Exception::'.ctor'()
2395         IL_0031:  throw                                                                            
2396         IL_0032:  ldloc.1                                                                          
2397         IL_0033:  ret                                                                              
2398     }
2399
2400         .method public static hidebysig  specialname 
2401          default int32 test_0_regress_513931 ()  cil managed 
2402         {
2403                 call int32 Tests::regress_513931_inner ()
2404                 pop
2405                 ldc.i4.0
2406                 ret
2407         }
2408
2409         .method public static default int32 test_0_newarr_i8 () cil managed
2410         {
2411                 ldc.i4 1000
2412                 conv.i8
2413                 newarr [mscorlib]System.Boolean
2414                 pop
2415                 ldc.i4 0
2416                 ret
2417         }
2418
2419         .method public static specialname 
2420                default int32 return_1_noinline ()  cil managed noinlining 
2421         {
2422                 .maxstack 0
2423
2424                 ldc.i4.1
2425                 ret 
2426         }
2427
2428         // Only happens with -O=-deadce,cmov
2429         .method public static default int32 test_0_cmov_unused_582322 () cil managed
2430         {
2431         .maxstack 2                                                   
2432         .locals init (                                                
2433                                 int32 V_0
2434                 )                               
2435                 call int32 Tests::return_1_noinline ()
2436                 ldc.i4.1
2437                 bne.un L0
2438                 ldloc.s 0
2439                 pop
2440         L0:
2441                 ldc.i4.0
2442                 ret
2443         }
2444
2445     .method public static  hidebysig 
2446            default int32 test_0_regress_586664 ()  cil managed 
2447     {                                        
2448         // Method begins at RVA 0x20f4       
2449         // Code size 76 (0x4c)               
2450         .maxstack 6                          
2451         .locals init (                       
2452                 float64 V_0,                 
2453                 float64[]       V_1)         
2454         IL_0000:  ldc.r8 1.                  
2455         IL_0009:  ldc.r8 2.                  
2456         IL_0012:  ldc.r8 1.                  
2457         IL_001b:  call float64 class [mscorlib]System.Math::Pow(float64, float64)
2458         IL_0020:  div                                                            
2459         IL_0021:  stloc.0                                                        
2460         IL_0022:  ldc.i4.2                                                       
2461         IL_0023:  newarr [mscorlib]System.Double                                 
2462         IL_0028:  dup                                                            
2463         IL_0029:  ldc.i4.0                                                       
2464         IL_002a:  ldloc.0                                                        
2465         IL_002b:  neg                                                            
2466         IL_002c:  stelem.r8                                                      
2467         IL_002d:  dup                                                            
2468         IL_002e:  ldc.i4.1                                                       
2469         IL_002f:  ldloc.0
2470         IL_0030:  neg
2471         IL_0031:  stelem.r8
2472         IL_0032:  stloc.1
2473         IL_0033:  ldloc.1
2474         IL_0034:  ldc.i4.0
2475         IL_0035:  ldelem.r8
2476         IL_0036:  ldc.r8 -0.5
2477         IL_003f:  bne.un IL_004a
2478
2479         IL_0044:  ldc.i4.0
2480         IL_0045:  br IL_004b
2481
2482         IL_004a:  ldc.i4.1
2483         IL_004b:  ret
2484     }
2485
2486         .method public static int32 test_2_leave_multiple_blocks_from_end ()
2487         {
2488                 .locals init (int32 V_0)
2489
2490                 .try {
2491                         .try {
2492                                 nop
2493                                 nop
2494                                 leave END
2495                         } finally {
2496                                 ldloc.0
2497                                 ldc.i4.1
2498                                 add
2499                                 stloc.0
2500                                 endfinally
2501                         }
2502                         nop
2503                         leave END
2504                 } finally {
2505                         ldloc.0
2506                         ldc.i4.1
2507                         add
2508                         stloc.0
2509                         endfinally
2510                 }
2511 END:
2512                 ldloc.0
2513                 ret
2514         }
2515
2516         .method public static int32 test_3_leave_multiple_blocks_from_hole ()
2517         {
2518                 .locals init (int32 V_0)
2519
2520                 .try {
2521                         .try {
2522                                 ldloc.0
2523                                 brtrue REST
2524                                 leave BEFORE_END
2525 REST:
2526                                 nop
2527                                 nop
2528                                 leave END
2529                         } finally {
2530                                 ldloc.0
2531                                 ldc.i4.1
2532                                 add
2533                                 stloc.0
2534                                 endfinally
2535                         }
2536                         nop
2537                         leave END
2538                 } finally {
2539                         ldloc.0
2540                         ldc.i4.1
2541                         add
2542                         stloc.0
2543                         endfinally
2544                 }
2545 BEFORE_END:
2546                 ldloc.0
2547                 ldc.i4.1
2548                 add
2549                 stloc.0
2550 END:
2551                 ldloc.0
2552                 ret
2553         }
2554
2555         .class nested private auto ansi sealed beforefieldinit Pair`2<TKey,TValue>
2556                    extends [mscorlib]System.ValueType
2557         {
2558                 .field  public  !0 key
2559         .field  public  !1 'value'
2560         }
2561
2562     .method private static hidebysig 
2563            default bool ContentEquals<TKey,TValue> (valuetype Tests/Pair`2<!!TKey, !!TValue> v)  cil managed 
2564     {
2565         .maxstack 8
2566         IL_0000:  ldarga.s 0 
2567         IL_0006:  ldnull 
2568                           constrained. valuetype Tests/Pair`2<!!0,!!1>
2569         IL_0007:  callvirt instance bool class [mscorlib]System.Object::Equals(object)
2570                           ret
2571     }
2572
2573     .method public static hidebysig default int32 test_0_constrained_gshared_595863 () cil managed
2574     {
2575                 .locals init (
2576                 valuetype Tests/Pair`2<string, string>  V_0,
2577                 valuetype Tests/Pair`2<string, string>  V_1)
2578         IL_0000:  ldloca.s 0
2579         IL_0002:  initobj valuetype Tests/Pair`2<string,string>
2580         IL_0008:  ldloc.0 
2581         IL_0009:  stloc.1 
2582         IL_000a:  ldloca.s 1
2583         IL_000c:  ldstr "A"
2584         IL_0011:  stfld !0 valuetype Tests/Pair`2<string,string>::key
2585         IL_0016:  ldloca.s 1
2586         IL_0018:  ldstr "B"
2587         IL_001d:  stfld !1 valuetype Tests/Pair`2<string,string>::'value'
2588         IL_0022:  ldloc.1 
2589         IL_0023:  stloc.0 
2590         IL_0024:  ldloc.0 
2591         IL_0025:  call bool class Tests::ContentEquals<string, string> (valuetype Tests/Pair`2<!!0,!!1>)
2592                           brfalse SUCCESS
2593                           ldc.i4.1
2594                           ret
2595         SUCCESS:
2596                           ldc.i4.0
2597                           ret
2598     }
2599
2600         .method public static default int32 test_0_wrap_non_exception_throws () cil managed
2601         {
2602           .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.
2603           .try {
2604                     newobj instance void class [mscorlib]System.Object::'.ctor'()
2605                         throw
2606                   leave IL_0
2607           } catch class [mscorlib]System.Runtime.CompilerServices.RuntimeWrappedException {
2608                   leave IL_0
2609                 }
2610                 IL_0:
2611                 ldc.i4.0
2612                 ret
2613     }
2614
2615         .method public static default int32 test_0_typespec_modopt () cil managed {
2616                 ldtoken class Tests modopt (Tests)
2617                 pop
2618                 ldc.i4.0
2619                 ret
2620         }
2621
2622         .method public hidebysig static int32 SizeOfT<T>() cil managed
2623         {
2624                 .maxstack  8
2625     
2626                 sizeof !!0
2627         ret
2628         }
2629
2630         .method public static default int32 test_1_sizeof_gshared () cil managed {
2631             call   int32 Tests::SizeOfT<int8>()
2632                 ldc.i4.1
2633                 ceq
2634                 ret
2635         }
2636
2637         .method public static default int32 test_1_sizeof_ref () cil managed {
2638             call   int32 Tests::SizeOfT<object>()
2639                 sizeof [mscorlib]System.IntPtr
2640                 ceq
2641                 ret
2642         }
2643
2644   .field static public int32 volatile_int
2645
2646         .method public static default int32 test_5_volatile_load_store () cil managed {
2647                 ldsflda int32 class Tests::volatile_int
2648                 ldc.i4 5
2649                 volatile.
2650                 stind.i4
2651                 ldsflda int32 class Tests::volatile_int
2652                 volatile.
2653                 ldind.i4
2654                 ret
2655         }               
2656
2657     .method public static 
2658            default int32 regress_693905_inner (int32 x, int32 acc)  cil managed 
2659     {
2660         // Method begins at RVA 0x2050
2661         // Code size 17 (0x11)
2662         .maxstack 5
2663         IL_0000:  ldarg.0 
2664         IL_0001:  brtrue.s IL_0005
2665
2666         IL_0003:  ldarg.1 
2667         IL_0004:  ret 
2668         IL_0005:  ldarg.0 
2669         IL_0006:  ldc.i4.1 
2670         IL_0007:  sub 
2671         IL_0008:  ldarg.1 
2672         IL_0009:  ldc.i4.1 
2673         IL_000a:  add 
2674         IL_000b:  starg.s 1
2675         IL_000d:  starg.s 0
2676         IL_000f:  br.s IL_0000
2677
2678     } // end of method Test::f
2679
2680     .method public static 
2681            default int32 test_10_regress_693905 ()  cil managed 
2682         {
2683                 ldc.i4.s 0x0a
2684         ldc.i4.0 
2685         call int32 class Tests::regress_693905_inner(int32, int32)
2686                 ret
2687         }
2688
2689         .method public static
2690                         default int32 test_0_llvm_regress_171 () cil managed
2691         {
2692                 .locals init (
2693                         int32 i
2694                 )
2695
2696                 call int32 Tests::return_1_noinline ()
2697                 ldc.i4.1
2698                 beq L1
2699                 ldc.i4.1
2700                 stloc.s 0
2701                 call int32 Tests::return_1_noinline ()
2702                 ldc.i4.0
2703                 beq L1
2704                 L1:
2705                 ldloc.s 0
2706                 ret
2707         }
2708
2709      .field  public static int32 static_a
2710
2711         .method public static
2712                         default int32 test_4_ldfld_stfld_static () cil managed
2713         {
2714                 ldnull
2715                 ldc.i4 2
2716                 stfld int32 Tests::static_a
2717                 ldnull
2718                 ldfld int32 Tests::static_a
2719                 ldnull
2720                 ldflda int32 Tests::static_a
2721                 ldind.i4
2722                 add
2723                 ret
2724         }
2725
2726   .method public static default int32 no_initlocals_inner () cil managed
2727   {
2728     .locals (
2729         int32 V_0,
2730         float32 V_1,
2731         float64 V_2,
2732         valuetype Tests/TailCallStruct V_3)
2733        ldloc V_0
2734        ret
2735   }
2736
2737   .method public static default int32 test_0_no_initlocals () cil managed
2738   {
2739        call int32 Tests::no_initlocals_inner()
2740        pop
2741            ldc.i4.0
2742        ret
2743   }
2744
2745   .method public hidebysig static int32  test_5_r4_fadd_mixed() cil managed
2746   {
2747     // Code size       17 (0x11)
2748     .maxstack  2
2749     .locals init (float32 V_0,
2750              float64 V_1)
2751     IL_0000:  ldc.r4     3
2752     IL_0005:  stloc.0
2753     IL_0006:  ldc.r8     2
2754     IL_000b:  stloc.1
2755     IL_000c:  ldloc.0
2756     IL_000d:  ldloc.1
2757     IL_000e:  add
2758     IL_000f:  conv.i4
2759     IL_0010:  ret
2760   }
2761
2762  .method public hidebysig static int32  test_0_fcmp_eq_r4_mixed() cil managed
2763   {
2764     // Code size       32 (0x20)
2765     .maxstack  2
2766     .locals init (float32 V_0,
2767              float64 V_1)
2768     IL_0000:  ldc.r4     1
2769     IL_0005:  stloc.0
2770     IL_0006:  ldc.r8     1
2771     IL_000f:  stloc.1
2772     IL_0010:  ldloc.0
2773     IL_0012:  ldloc.1
2774     IL_0013:  bne.un     IL_001e
2775
2776     IL_0018:  ldc.i4.0
2777     IL_0019:  br         IL_001f
2778
2779     IL_001e:  ldc.i4.1
2780     IL_001f:  ret
2781   } // end of method Tests::test_0_fcmp_eq_r4_mixed
2782
2783   .method public hidebysig static int32  test_0_fceq_r4_mixed() cil managed
2784   {
2785     // Code size       31 (0x1f)
2786     .maxstack  2
2787     .locals init (float32 V_0,
2788              float64 V_1,
2789              bool V_2)
2790     IL_0000:  ldc.r4     1
2791     IL_0005:  stloc.0
2792     IL_0006:  ldc.r8     1
2793     IL_000b:  stloc.1
2794     IL_000c:  ldloc.0
2795     IL_000d:  ldloc.1
2796     IL_000e:  ceq
2797     IL_0010:  stloc.2
2798     IL_0011:  ldloc.2
2799     IL_0012:  brfalse    IL_001d
2800
2801     IL_0017:  ldc.i4.0
2802     IL_0018:  br         IL_001e
2803
2804     IL_001d:  ldc.i4.1
2805     IL_001e:  ret
2806   } // end of method Tests::test_0_fceq_r4
2807
2808   .method public static int32 test_0_switch_loop () cil managed
2809   {
2810         .maxstack 16
2811         .locals init (valuetype Tests/TailCallStruct V_0, int32 V_1)
2812         ldc.i4.0
2813         ldloc.0
2814         ldloc.1
2815         brtrue L_1
2816         L_0:
2817         ldc.i4.4
2818         switch (L_0)
2819         L_1:
2820         pop
2821         ret
2822   }
2823
2824   .method public static int32 test_2_fault () cil managed
2825   {
2826         .maxstack 16
2827         .locals init (int32 V_0)
2828     IL_0000:  ldc.i4.0
2829     IL_0001:  stloc.0
2830     .try
2831     {
2832       .try
2833       {
2834         IL_0002:  newobj     instance void [mscorlib]System.Exception::.ctor()
2835         IL_0007:  throw
2836                 leave.s    IL_0018
2837       }  // end .try
2838           fault
2839       {
2840         IL_0009:  ldloc.0
2841         IL_000a:  ldc.i4.1
2842         IL_000b:  add
2843         IL_000c:  stloc.0
2844                                   endfinally
2845       }  // end handler
2846       IL_000f:  leave.s    IL_0018
2847
2848     }  // end .try
2849     catch [mscorlib]System.Object
2850     {
2851       IL_0011:  pop
2852       IL_0012:  ldloc.0
2853       IL_0013:  ldc.i4.1
2854       IL_0014:  add
2855       IL_0015:  stloc.0
2856       IL_0016:  leave.s    IL_0018
2857
2858     }  // end handler
2859     IL_0018:  ldloc.0
2860         ret
2861         }
2862
2863   .method public static int32 test_0_fault_no_exception () cil managed
2864   {
2865         .maxstack 16
2866         .locals init (int32 V_0)
2867     IL_0000:  ldc.i4.0
2868     IL_0001:  stloc.0
2869     .try
2870     {
2871       .try
2872       {
2873                 leave.s    IL_0018
2874       }  // end .try
2875           fault
2876       {
2877         IL_0009:  ldloc.0
2878         IL_000a:  ldc.i4.1
2879         IL_000b:  add
2880         IL_000c:  stloc.0
2881                                   endfinally
2882       }  // end handler
2883       IL_000f:  leave.s    IL_0018
2884
2885     }  // end .try
2886     catch [mscorlib]System.Object
2887     {
2888       IL_0011:  pop
2889       IL_0012:  ldloc.0
2890       IL_0013:  ldc.i4.1
2891       IL_0014:  add
2892       IL_0015:  stloc.0
2893       IL_0016:  leave.s    IL_0018
2894
2895     }  // end handler
2896     IL_0018:  ldloc.0
2897         ret
2898         }
2899
2900     .field  private static  int32 byte_val
2901     .field  private static  int32 short_val
2902
2903     .method static int32 widen_arguments (unsigned int8 a, int8 b, int16 c, unsigned int16 d) cil managed noinlining
2904     {
2905                 .maxstack 4
2906                 ldsfld int32 Tests::byte_val
2907                 starg.s 0
2908                 ldarg.0
2909                 ldc.i4 128 //0x80
2910                 beq L_0
2911
2912                 ldc.i4.1
2913                 ret
2914 L_0:
2915                 ldsfld int32 Tests::byte_val
2916                 starg.s 1
2917                 ldarg.1
2918                 ldc.i4 -128 //-0x80
2919                 beq L_1
2920
2921                 ldc.i4.2
2922                 ret
2923
2924 L_1:
2925                 ldsfld int32 Tests::short_val
2926                 starg.s 2
2927                 ldarg.2
2928                 ldc.i4 -32768 //-0x8000
2929                 beq L_2
2930
2931                 ldc.i4.3
2932                 ret
2933
2934 L_2:
2935                 ldsfld int32 Tests::short_val
2936                 starg.s 3
2937                 ldarg.3
2938                 ldc.i4 32768 //0x8000
2939                 beq L_3
2940
2941                 ldc.i4.4
2942                 ret
2943
2944 L_3:
2945                 ldc.i4.0
2946                 ret
2947     }
2948
2949         .method public static int32 test_0_implicit_widen_of_argument_stores () cil managed
2950         {
2951                 .maxstack 5
2952                 /*
2953                 This test verifies that storing an I4 value from the evail stack into a local variable triggers proper widening.
2954                 The values are picked so storing them have different values depending on the sign'ness of the local variable.
2955                 */
2956                 ldc.i4 0x180
2957                 stsfld int32 Tests::byte_val
2958                 ldc.i4 0x18000
2959                 stsfld int32 Tests::short_val
2960
2961                 ldc.i4.0
2962                 ldc.i4.0
2963                 ldc.i4.0
2964                 ldc.i4.0
2965                 call int32 Tests::widen_arguments (unsigned int8 a, int8 b, int16 c, unsigned int16 d)
2966                 ret
2967         }
2968
2969     .method public static int32 test_0_implicit_widen_of_local_stores () cil managed
2970     {
2971                 .maxstack 4
2972                 .locals init (
2973                         unsigned int8   V_0,
2974                         int8    V_1,
2975                         int16   V_2,
2976                         unsigned int16  V_3)
2977
2978                 /*
2979                 This test verifies that storing an I4 value from the evail stack into a local variable triggers proper widening.
2980                 The values are picked so storing them have different values depending on the sign'ness of the local variable.
2981                 */
2982                 ldc.i4 0x180
2983                 stsfld int32 Tests::byte_val
2984                 ldc.i4 0x18000
2985                 stsfld int32 Tests::short_val
2986
2987                 ldsfld int32 Tests::byte_val
2988                 stloc.0
2989                 ldloc.0
2990                 ldc.i4 128 //0x80
2991                 beq L_0
2992
2993                 ldc.i4.1
2994                 ret
2995 L_0:
2996                 ldsfld int32 Tests::byte_val
2997                 stloc.1
2998                 ldloc.1
2999                 ldc.i4 -128 //-0x80
3000                 beq L_1
3001
3002                 ldc.i4.2
3003                 ret
3004 L_1:
3005                 ldsfld int32 Tests::short_val
3006                 stloc.2
3007                 ldloc.2
3008                 ldc.i4 -32768 //-0x8000
3009                 beq L_2
3010
3011                 ldc.i4.3
3012                 ret
3013 L_2:
3014                 ldsfld int32 Tests::short_val
3015                 stloc.3
3016                 ldloc.3
3017                 ldc.i4 32768 //0x8000
3018                 beq L_3
3019
3020                 ldc.i4.4
3021                 ret
3022 L_3:
3023                 ldc.i4.0
3024                 ret
3025     }
3026
3027         .method public static bool llvm_regress_59436 () {
3028                 // Code size       41 (0x29)
3029                 .maxstack  3
3030                 .locals init (float64 V_0,
3031                                           float64 V_1,
3032                                           valuetype [mscorlib]System.Decimal V_2)
3033                 IL_0000:  ldc.r8         1
3034                 IL_0009:  stloc.0
3035                 IL_000a:  ldc.r8         2
3036                 IL_0013:  stloc.1
3037                 IL_0014:  ldloc.0
3038                 IL_0015:  newobj         instance void [mscorlib]System.Decimal::.ctor(float64)
3039                 IL_001a:  ldloca.s   V_2
3040                 IL_001c:  ldloc.1
3041                 IL_001d:  call     instance void [mscorlib]System.Decimal::.ctor(float64)
3042                 IL_0022:  ldloc.2
3043                 IL_0023:  call     bool [mscorlib]System.Decimal::op_LessThanOrEqual(valuetype [mscorlib]System.Decimal,
3044                                                                                                                                                            valuetype [mscorlib]System.Decimal)
3045                 IL_0028:  ret
3046         }
3047
3048   .method private hidebysig static void  fail_inline() cil managed
3049   {
3050     // Code size       9 (0x9)
3051     .maxstack  8
3052     IL_0000:  ldc.i4.s   16
3053     IL_0002:  conv.u
3054     IL_0003:  ldc.i4.1
3055     IL_0004:  mul.ovf.un
3056     IL_0005:  localloc
3057     IL_0007:  pop
3058     IL_0008:  ret
3059   }
3060
3061   .method private hidebysig static int32
3062           always_inline(int32 op) cil managed aggressiveinlining
3063   {
3064     // Code size       24 (0x18)
3065     .maxstack  8
3066     IL_0000:  ldarg.0
3067     IL_0001:  brfalse.s  IL_0009
3068
3069     IL_0003:  ldarg.0
3070     IL_0004:  ldc.i4.2
3071     IL_0005:  beq.s      IL_000b
3072
3073     IL_0007:  br.s       IL_000d
3074
3075     IL_0009:  ldc.i4.0
3076     IL_000a:  ret
3077
3078     IL_000b:  ldc.i4.3
3079     IL_000c:  ret
3080
3081     IL_000d:  call       void Tests::fail_inline()
3082     IL_0012:  newobj     instance void [mscorlib]System.Exception::.ctor()
3083     IL_0017:  throw
3084   }
3085
3086   .method public hidebysig static int32 test_3_regress_59608() cil managed
3087   {
3088     .maxstack  8
3089     IL_0000:  ldc.i4.2
3090     IL_0001:  call       int32 Tests::always_inline(int32)
3091     IL_000c:  ret
3092   }
3093
3094 }