Wrap always_inline and noinline attributes in compiler checks and use MSVC equivalent.
[mono.git] / mono / mini / iltests.il.in
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 can't 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_0_conv_ovf_i8_neg () il managed {
672                 .maxstack 16
673
674                 ldc.i4.m1
675                 conv.ovf.i8
676                 conv.i4
677                 ldc.i4.m1
678                 beq L_OK
679                 ldc.i4.1
680                 ret
681         L_OK:
682                 ldc.i4.0
683                 ret
684         }               
685
686         .method public static int32 test_1234_conv_u4 () cil managed {
687                 .maxstack 16
688
689                 ldc.i4 1234
690                 conv.u4
691                 conv.i4
692                 ret
693         }
694
695         .method public static int32 test_0_conv_ovf_i_un () cil managed {
696                 .maxstack 16
697
698                 ldc.i4 1234
699                 conv.ovf.i.un
700                 conv.i4
701                 ldc.i4 1234
702                 beq L1
703                 ldc.i4.1
704                 ret
705         L1:
706                 ldc.i4 0x7fffffff
707                 conv.ovf.i.un
708                 conv.i4
709                 ldc.i4 0x7fffffff
710                 beq L2
711                 ldc.i4.2
712                 ret
713         L2:
714                 sizeof [mscorlib]System.IntPtr
715                 ldc.i4 8
716                 beq L5
717                 .try {
718                         ldc.i4 0x80000000
719                         conv.ovf.i.un
720                         leave L4
721                 } catch [mscorlib]System.OverflowException {
722                         pop
723                         leave L5
724                 }
725         L4: 
726                 ldc.i4.3
727                 ret
728         L5:
729                 ldc.i4.0
730                 ret
731         }
732
733         .method public static int32 test_0_conv_ovf_u_un () cil managed {
734                 .maxstack 16
735
736                 ldc.i4 1234
737                 conv.ovf.u.un
738                 conv.i4
739                 ldc.i4 1234
740                 beq L1
741                 ldc.i4.1
742                 ret
743         L1:
744                 ldc.i4.0
745                 ret
746         }
747
748         .method public static int32 test_0_conv_ovf_i () cil managed {
749                 .maxstack 16
750
751                 ldc.i4 1234
752                 conv.ovf.i
753                 conv.i4
754                 ldc.i4 1234
755                 beq L1
756                 ldc.i4.1
757                 ret
758         L1:
759                 ldc.i4.0
760                 ret
761         }
762
763         .method public static int32 test_0_conv_ovf_u () cil managed {
764                 .maxstack 16
765
766                 ldc.i4 1234
767                 conv.ovf.u
768                 conv.i4
769                 ldc.i4 1234
770                 beq L1
771                 ldc.i4.1
772                 ret
773         L1:
774                 ldc.i4.0
775                 ret
776         }
777
778         .method public static int32 test_1234_conv_ovf_i8_un () cil managed {
779                 .maxstack 16
780
781                 ldc.i4 1234
782                 conv.ovf.i8.un
783                 conv.i4
784                 ret
785         }
786
787         .method public static int32 test_0_lconv_ovf_i () cil managed {
788                 .maxstack 16
789
790                 ldc.i4 1234
791                 conv.i8
792                 conv.ovf.i
793                 conv.i4
794                 ldc.i4 1234
795                 beq L1
796                 ldc.i4.1
797                 ret
798         L1:
799                 ldc.i4.0
800                 ret
801         }
802
803         .method public static int32 test_0_lconv_ovf_u () cil managed {
804                 .maxstack 16
805
806                 ldc.i4 1234
807                 conv.i8
808                 conv.ovf.u
809                 conv.i4
810                 ldc.i4 1234
811                 beq L1
812                 ldc.i4.1
813                 ret
814         L1:
815                 ldc.i4.0
816                 ret
817         }
818
819         .method public static int32 test_0_lconv_ovf_i_un () cil managed {
820                 .maxstack 16
821
822                 ldc.i4 1234
823                 conv.i8
824                 conv.ovf.i.un
825                 conv.i4
826                 ldc.i4 1234
827                 beq L1
828                 ldc.i4.1
829                 ret
830         L1:
831                 ldc.i4.0
832                 ret
833         }
834
835         .method public static int32 test_0_lconv_ovf_u_un () cil managed {
836                 .maxstack 16
837
838                 ldc.i4 1234
839                 conv.i8
840                 conv.ovf.u.un
841                 conv.i4
842                 ldc.i4 1234
843                 beq L1
844                 ldc.i4.1
845                 ret
846         L1:
847                 ldc.i4.0
848                 ret
849         }
850
851         .method public static int32 test_0_lconv_to_ovf_i8 () cil managed {
852                 .maxstack 16
853
854                 ldc.i4 1234
855                 conv.i8
856                 conv.ovf.i8
857                 conv.i4
858                 ldc.i4 1234
859                 beq L1
860                 ldc.i4.1
861                 ret
862         L1:
863                 ldc.i4.0
864                 ret
865         }
866
867         .method public static int32 test_0_lconv_to_ovf_u8_un () cil managed {
868                 .maxstack 16
869
870                 ldc.i4 1234
871                 conv.i8
872                 conv.ovf.u8.un
873                 conv.i4
874                 ldc.i4 1234
875                 beq L1
876                 ldc.i4.1
877                 ret
878         L1:
879                 ldc.i4.0
880                 ret
881         }
882
883         .method public static int32 test_2_lconv_to_ovf_i4_un () cil managed {
884                 .maxstack 16
885                 .locals init (int32 res)
886
887                 ldc.i4 0x7fffffff
888                 conv.u8
889                 conv.ovf.i4.un
890                 pop
891
892                 ldc.i4.2
893                 stloc res
894
895         .try {
896                         ldc.i8 0x80000000
897                         conv.ovf.i4.un
898                         pop
899                         ldc.i4.0
900                         stloc res
901                         leave RET
902                 } catch [mscorlib]System.OverflowException {
903                         pop
904                         leave IL_0
905                 }
906
907         IL_0:
908
909         .try {
910                         ldc.i8 0xffffffff80000000
911                         conv.ovf.i4.un
912                         pop
913                         ldc.i4.1
914                         stloc res
915                         leave RET
916                 } catch [mscorlib]System.OverflowException {
917                         pop
918                         leave RET
919                 }
920
921         RET:
922                 ldloc res
923                 ret
924         }
925
926     .method public static int32 test_1_lconv_to_ovf_i_un () cil managed {
927                 .maxstack 16
928                 .locals init (int32 res)
929
930                 ldc.i4 0x7fffffff
931                 conv.u8
932                 conv.ovf.i.un
933                 conv.i4
934                 pop
935
936                 ldc.i4.1
937                 ret
938         }
939
940         .method public static int32 test_32_lconv_to_u8 () cil managed
941         {
942                 .maxstack 16
943
944                 ldc.i4 32
945                 conv.i8
946                 conv.u8
947                 conv.i4
948                 ret
949         }                               
950
951         .method public static int32 test_32_lconv_to_i8 () cil managed
952         {
953                 .maxstack 16
954
955                 ldc.i4 32
956                 conv.i8
957                 conv.i8
958                 conv.i4
959                 ret
960         }                               
961
962         .method public static int32 test_15_lconv_to_u () cil managed
963         {
964         ldc.i8 0x10000000f
965                 conv.u
966                 conv.i4
967                 ret
968         }
969
970 #if !defined(__ppc__) && !defined(__powerpc__) && !defined(__arm__) && !defined(__sparc__) && !defined(__mips__)
971         // PPC handles overflow by clipping, but this test assumes
972         // no overflow handling.  According to ECMA the result of
973         // float->int conversion is undefined if overflow occurs, so
974         // both behaviours are valid.
975         .method public static int32 test_0_fconv_to_i () cil managed {
976                 .maxstack 16
977
978                 ldc.r8 2147483648.0
979                 conv.i
980                 ldc.i8 2147483648
981                 conv.i
982                 beq L1
983                 ldc.i4.1
984                 ret
985         L1:
986                 ldc.i4.0
987                 ret
988         }
989 #endif
990
991         .method public static int32 test_0_get_type_from_handle_on_bblock_boundary () cil managed 
992         {
993                 .maxstack 16
994         
995                 ldc.i4.1
996                 brfalse OBJECT
997         
998                 ldtoken [mscorlib]System.String
999                 br AFTER
1000         OBJECT:
1001                 ldtoken [mscorlib]System.Object
1002         AFTER:
1003                 call class [mscorlib]'System.Type' class [mscorlib]'System.Type'::'GetTypeFromHandle'(valuetype [mscorlib]'System.RuntimeTypeHandle')
1004                 callvirt instance string class [mscorlib]System.Type::get_FullName ()
1005                 ldstr "System.String"
1006                 callvirt instance bool class [mscorlib]System.Object::Equals(object)
1007                 ldc.i4.0
1008                 ceq
1009                 ret 
1010         }
1011                 
1012         .method public static int32 test_0_bug59580  ()
1013         {
1014                 ldc.r4          float32(0x7FC00000)
1015                 ldc.r4          float32(0x7FC00000)
1016                 bge.un          pass
1017                 br              fail
1018         pass:
1019                 ldc.i4.0
1020                 ret
1021         fail:
1022                 ldc.i4.1
1023                 ret
1024         }
1025         
1026         .method public static int32 test_1_bug60056  () {
1027                 .locals init (int32 m5)
1028                         
1029                 ldc.i4.m1
1030                 stloc.0
1031                 
1032                 ldc.i4.1
1033                 conv.u8
1034                 
1035                 ldloc.0
1036                 conv.i8
1037                 mul
1038                 
1039                 ldc.i4.m1
1040                 conv.i8
1041                 ceq
1042                 ret
1043         }
1044         
1045         .method public static int32 test_1_conv_u8_cfold  () {
1046                 ldc.i4.m1
1047                 conv.u8
1048                 
1049                 ldc.i8 0x00000000ffffffff
1050                 
1051                 ceq
1052                 ret
1053         }
1054         
1055         .method public static int32 test_1_array_type_mismatch_ldelema  () {
1056                 .locals init (int32 r)
1057                 
1058                         ldc.i4.1
1059                         newarr string
1060                         ldc.i4.0 
1061                         ldelema string
1062                         pop
1063                 
1064                 .try {
1065                         ldc.i4.1
1066                         newarr string
1067                         ldc.i4.0 
1068                         ldelema object
1069                         pop
1070                         
1071                         leave end
1072                 } catch [mscorlib]System.ArrayTypeMismatchException {
1073                         pop
1074                         ldc.i4.1
1075                         stloc.0
1076                         leave end
1077                 }
1078         end:
1079                 ldloc.0
1080                 ret
1081         }
1082
1083         .method public static int32 test_1_conv_ovf_i8_with_i4 () {
1084                         ldc.i4.m1 
1085                         conv.ovf.i8
1086                         conv.ovf.i4
1087                         neg
1088                         ret
1089         }
1090
1091         // bug #72148
1092     .method public static int32 test_0_initlocals_float_ptr () {
1093         .maxstack 3
1094         .locals init (
1095                 float32[]       V_0,
1096                 float32& pinned V_1,
1097                 unsigned int32  V_2)
1098                         ldc.i4.s 0x0f
1099                         newarr [mscorlib]System.Single
1100                         stloc.0 
1101                         ldloc.0 
1102                         ldc.i4.0 
1103                         ldc.r4 1.13
1104                         stelem.r4 
1105                         ldloc.0 
1106                         ldc.i4.0 
1107                         ldelema [mscorlib]System.Single
1108                         stloc.1 
1109                         ldloc.1 
1110                         conv.i 
1111                         ldind.u4 
1112                         stloc.2 
1113                         ldc.i4.0
1114                         ret
1115         }
1116
1117         .method public static int32 test_7_conv_ovf_u8_un () {
1118         .maxstack  2
1119         .locals    init (unsigned int64)
1120
1121         ldc.i4.7
1122         conv.ovf.u8.un
1123         stloc.0
1124                 ldloc.0
1125                 conv.i4
1126         ret
1127         }
1128
1129         .method public static int32 test_7_conv_ovf_u4_un () {
1130         .maxstack  2
1131         .locals    init (unsigned int32)
1132
1133         ldc.i4.7
1134         conv.ovf.u4.un
1135         stloc.0
1136                 ldloc.0
1137                 conv.i4
1138         ret
1139         }
1140
1141         .method public static int32 test_1_bug_74591 () {
1142                 .maxstack 16
1143                 .locals init (int32)
1144
1145                 ldc.i4.m1
1146                 stloc.0
1147                 ldloc.0
1148                 conv.ovf.i8
1149                 ldc.i4.m1
1150                 conv.ovf.i8
1151                 mul.ovf
1152                 conv.i4
1153                 ret
1154         }
1155
1156         .class nested public auto ansi Integer
1157                 extends [mscorlib]System.Object {
1158
1159                 .field public bool n
1160
1161             .method public hidebysig  specialname  rtspecialname 
1162            instance default void .ctor (unsigned int64 i, bool n)  cil managed 
1163             {
1164                         .maxstack 8
1165                         ldarg.0
1166                         call instance void class [mscorlib]System.Object::.ctor()
1167                         ldarg.0
1168                         ldarg.2
1169                         stfld bool Tests/Integer::n
1170                         ret
1171                 }
1172         }
1173
1174         .method public static int32 test_1_bug_74726 () {
1175                 .maxstack 16
1176
1177                 ldc.i4.2
1178                 conv.ovf.u8
1179                 ldc.i4.1
1180                 conv.ovf.u8
1181                 mul.ovf.un
1182                 ldc.i4.1
1183                 newobj instance void class Tests/Integer::.ctor(unsigned int64, bool)
1184                 ldfld bool Tests/Integer::n
1185                 ldc.i4.1
1186                 ceq
1187                 ret
1188         }
1189
1190         .class nested private auto ansi sealed xxx
1191         extends [mscorlib]System.ValueType
1192    {
1193      .field  public   object a
1194
1195      .method public hidebysig  specialname  rtspecialname 
1196             instance default void .ctor ()  cil managed 
1197      {
1198                  .maxstack 8
1199                  ret 
1200      }
1201    } // end of class xxx
1202
1203         .method public static int32 test_0_newobj_vtype () {
1204                 .maxstack 6
1205                 .locals init (
1206                         valuetype Tests/xxx V_0
1207                 )
1208
1209                 newobj instance void valuetype Tests/xxx::.ctor ()
1210                 stloc.0
1211                 ldloca.s 0
1212                 ldfld object Tests/xxx::a
1213                 brfalse OK
1214                 ldc.i4.s 1
1215                 ret
1216         OK:
1217                 ldc.i4.s 0
1218                 ret
1219         }
1220
1221         .method public static int32 test_0_newobj_vtype_primitive () {
1222                 .maxstack 6
1223                 .locals init (
1224                         native int V_0
1225                 )
1226
1227                 ldc.i4.s 10
1228                 newobj instance void native int::'.ctor'(int32)
1229                 stloc.0
1230                 ldloc.0
1231                 ldc.i4.s 10
1232                 beq OK
1233                 ldc.i4.s 1
1234                 ret
1235         OK:
1236                 ldc.i4.s 0
1237                 ret
1238         }
1239
1240         .method public static int32 test_1_filters () {
1241                 .maxstack 16
1242                 .locals init (
1243                         int32 res
1244                 )
1245
1246                 .try { // 0
1247                         .try {
1248                                 ldstr "OnErrorSub test Exception"
1249                                 newobj instance void class [mscorlib]System.Exception::.ctor(string)
1250                                 throw 
1251                                 leave.s IL_0033
1252                         }
1253                         filter {
1254                                 pop
1255                                 ldc.i4.0
1256                                 endfilter
1257                         } {
1258                                 pop
1259                                 // Should not be called
1260                                 ldc.i4.2
1261                                 stloc res
1262                                 leave.s IL_0033
1263                         }
1264                 }
1265                 filter {
1266                         pop
1267                         ldc.i4.1
1268                         endfilter 
1269                 } {
1270                   pop
1271                   ldc.i4.1
1272                   stloc res       
1273                   leave.s IL_0033
1274
1275                 }
1276                 IL_0033:
1277                 ldloc res
1278                 ret
1279         }
1280
1281         .class nested private auto ansi sealed beforefieldinit TheStruct
1282                 extends [mscorlib]System.ValueType {
1283                 .field public int32 a
1284                 .field public int32 b
1285         }
1286
1287         .method public static int32 test_5_cpobj () {
1288                 .maxstack 8
1289                 .locals init (  
1290                                 valuetype Tests/TheStruct v_0, 
1291                                 valuetype Tests/TheStruct v_1
1292                                          )
1293
1294                 ldloca v_0
1295                 ldc.i4.2
1296                 stfld int32 Tests/TheStruct::a
1297
1298                 ldloca v_0
1299                 ldc.i4.3
1300                 stfld int32 Tests/TheStruct::b
1301
1302                 ldloca v_1
1303                 ldloca v_0
1304                 cpobj Tests/TheStruct
1305
1306                 ldloca v_1
1307                 ldfld int32 Tests/TheStruct::a
1308                 ldloca v_1
1309                 ldfld int32 Tests/TheStruct::b
1310                 add
1311
1312                 ret
1313         }
1314
1315         .method public static int32 test_5_ldobj_stloc_optimization () {
1316                 .maxstack 8
1317                 .locals init (  
1318                                 valuetype Tests/TheStruct v_0, 
1319                                 valuetype Tests/TheStruct v_1
1320                                          )
1321
1322                 ldloca v_0
1323                 ldc.i4.2
1324                 stfld int32 Tests/TheStruct::a
1325
1326                 ldloca v_0
1327                 ldc.i4.3
1328                 stfld int32 Tests/TheStruct::b
1329
1330                 ldloca v_0
1331                 ldobj valuetype Tests/TheStruct
1332                 stloc.s v_1
1333
1334                 ldloca v_1
1335                 ldfld int32 Tests/TheStruct::a
1336                 ldloca v_1
1337                 ldfld int32 Tests/TheStruct::b
1338                 add
1339
1340                 ret
1341         }
1342
1343         .method public static int32 test_1_cpobj_reference () {
1344                 .maxstack 8
1345                 .locals init (  
1346                                 object v_0, 
1347                                 object v_1
1348                                          )
1349
1350                 newobj instance void object::.ctor()
1351                 stloc v_0
1352
1353                 ldloca v_1
1354                 ldloca v_0
1355                 cpobj object
1356
1357                 ldloc v_0
1358                 ldloc v_1
1359                 ceq
1360                 ret
1361         }
1362
1363         .method public static int32 test_1_initobj_reference () {
1364                 .maxstack 8
1365                 .locals init (  
1366                                 object v_0
1367                                          )
1368
1369                 newobj instance void object::.ctor()
1370                 stloc v_0
1371
1372                 ldloca v_0
1373                 initobj object
1374
1375                 ldloc v_0
1376                 ldnull
1377                 ceq
1378                 ret
1379         }
1380
1381         .method public static int32 test_1_ldobj_reference () {
1382                 .maxstack 8
1383                 .locals init (  
1384                                 object v_0
1385                                          )
1386
1387                 newobj instance void object::.ctor()
1388                 stloc v_0
1389
1390                 ldloc v_0
1391                 ldloca v_0
1392                 ldobj object
1393                 ceq
1394                 ret
1395         }
1396
1397         .method public static int32 test_5_vtype_on_bb_boundary () {
1398                 .maxstack 8
1399                 .locals init (  
1400                                 valuetype Tests/TheStruct v_0, 
1401                                 valuetype Tests/TheStruct v_1
1402                                          )
1403
1404                 ldloca v_0
1405                 ldc.i4.2
1406                 stfld int32 Tests/TheStruct::a
1407
1408                 ldloca v_0
1409                 ldc.i4.3
1410                 stfld int32 Tests/TheStruct::b
1411
1412                 ldloc v_0
1413                 br L_0
1414         L_0: stloc v_1
1415
1416                 ldloca v_1
1417                 ldfld int32 Tests/TheStruct::a
1418                 ldloca v_1
1419                 ldfld int32 Tests/TheStruct::b
1420                 add
1421                 ret
1422         }
1423
1424         .method public static int32 test_5_different_in_stacks () cil managed {
1425                 .maxstack 16
1426
1427                         ldc.i4.1
1428                         ldc.i4.1
1429                         beq L_0
1430
1431                         ldc.i4.3
1432                         ldc.i4.3
1433                         br L_1
1434                         ldc.i4.3
1435                         ldc.i4.3
1436                         br L_2
1437          L_0:   ldc.i4.2
1438                         ldc.i4.3
1439                         ldc.i4.1
1440                         ldc.i4.1
1441                         beq L_2
1442          L_1:   add
1443                         ret
1444          L_2:   add
1445                         ret
1446         }
1447
1448         .method public static int32 test_3_larray_get_set () {
1449                 .locals init (
1450                         int32[2]        V_0)
1451                           
1452                         ldc.i4.2 
1453                         newobj instance void int32[0...]::.ctor(int32)
1454                         stloc.0 
1455                         ldloc.0 
1456                         ldc.i4.0 
1457                         ldc.i4 1
1458                         call instance void int32[0...]::Set(int32, int32)
1459                     ldloc.0 
1460                     ldc.i4.1 
1461                         ldc.i4 2
1462                         call instance void int32[0...]::Set(int32, int32)
1463
1464                         ldloc.0
1465                         ldc.i4.0
1466                         call instance int32 int32[0...]::Get(int32)
1467                         ldloc.0
1468                         ldc.i4.1
1469                         call instance int32 int32[0...]::Get(int32)
1470                         add
1471                         ret
1472         }
1473
1474         .method public static int32 test_0_pop_side_effects () {
1475                 .try {
1476                         ldc.r8 1
1477                         ldc.r8 0
1478                         div
1479                         ckfinite
1480                         pop
1481                         leave FAIL
1482                 }
1483                 catch [mscorlib]System.ArithmeticException {
1484                         pop
1485                         leave L_0
1486                 }
1487                 L_0:
1488                 ldc.i4.0
1489                 ret
1490                 FAIL:
1491                 ldc.i4.1
1492                 ret
1493         }
1494
1495         .method public static void regalloc_regress_78314_helper (object o) cil managed
1496         {
1497                 ret
1498         }
1499
1500         .method public static int32 test_1_regalloc_regress_78314 () cil managed
1501         {
1502     // Code size       68 (0x44)
1503     .maxstack  6
1504     .locals init (int32 V_0, bool V_1)
1505     IL_0000:  ldc.i4.0
1506     IL_0001:  stloc.0
1507     IL_0002:  br.s       IL_003b
1508
1509     IL_0004:
1510     IL_001e:  ldc.i4.s   10
1511     IL_0020:  ldloc.0
1512     IL_0021:  shl
1513     IL_0022:  ldc.i4.s   10
1514     IL_0024:  ldloc.0
1515     IL_0025:  shl
1516     IL_0026:  ceq
1517     IL_0028:  box        [mscorlib]System.Boolean
1518     IL_0032:  call       void Tests::regalloc_regress_78314_helper(object)
1519     IL_0037:  ldloc.0
1520     IL_0038:  ldc.i4.1
1521     IL_0039:  add
1522     IL_003a:  stloc.0
1523     IL_003b:  ldloc.0
1524     IL_003c:  ldc.i4.8
1525     IL_003f:  blt.s      IL_0004
1526
1527         ldloc.0
1528         ldc.i4.8
1529         ceq
1530         conv.i4
1531         ret     
1532   }
1533
1534         .method public static void try_block_end_remove_if_useless () cil managed {
1535             .maxstack  8
1536
1537             T_START:
1538                 ldstr   "Start"
1539                         pop
1540                 leave.s COMPLETE
1541             T1_END:
1542
1543             COMPLETE:
1544                 ret
1545
1546             F1_START:
1547                 ldstr   "Finally1"
1548                         pop
1549                 endfinally
1550             F1_END:
1551
1552             .try T_START to T1_END finally handler F1_START to F1_END
1553         }
1554
1555         .method public static int32 test_0_try_block_end_remove_if_useless () cil managed {
1556                 call void class Tests::try_block_end_remove_if_useless ()
1557                 ldc.i4.0
1558                 ret
1559         }
1560
1561    .method private static int32 test_0_regress_78629_switch_next_ins_target ()  cil managed
1562     {
1563         ldc.i4.0
1564         switch (target)
1565         target: ldstr "bar"
1566                 pop
1567                 ldc.i4.0
1568         ret
1569     }
1570
1571         // This belongs to basic-float.cs, but its hard to tell mcs/csc to
1572         // generate the non .un version of the opcodes
1573     .method private static  hidebysig 
1574            default int32 test_4_float_branch_nan ()  cil managed 
1575     {
1576         // Method begins at RVA 0x27a4
1577         // Code size 74 (0x4a)
1578         .maxstack 2
1579         .locals init (
1580                 float64 V_0,
1581                 float64 V_1,
1582                 int32   V_2)
1583         IL_0000:  ldc.r8 (00 00 00 00 00 00 f8 ff)
1584         IL_0009:  stloc.0 
1585         IL_000a:  ldc.r8 1.
1586         IL_0013:  stloc.1 
1587         IL_0014:  ldc.i4.0 
1588         IL_0015:  stloc.2 
1589         IL_0016:  ldloc.0 
1590         IL_0017:  ldloc.1 
1591         IL_0018:  bge.s IL_001a
1592
1593                                 br L1
1594         IL_001a:  ldloc.2 
1595         IL_001b:  ret 
1596         L1:
1597         IL_001c:  ldloc.2 
1598         IL_001d:  ldc.i4.1 
1599         IL_001e:  add 
1600         IL_001f:  stloc.2 
1601         IL_0020:  ldloc.0 
1602         IL_0021:  ldloc.1 
1603         IL_0022:  ble.s IL_002e
1604                                 br L2
1605         IL_002e:  ldloc.2 
1606         IL_002f:  ret 
1607         L2:
1608         IL_0030:  ldloc.2 
1609         IL_0031:  ldc.i4.1 
1610         IL_0032:  add 
1611         IL_0033:  stloc.2 
1612         IL_0034:  ldloc.0 
1613         IL_0035:  ldloc.1 
1614         IL_0036:  blt.s IL_0038
1615                                 br L3           
1616         IL_0038:  ldloc.2 
1617         IL_0039:  ret 
1618         L3:
1619         IL_003a:  ldloc.2 
1620         IL_003b:  ldc.i4.1 
1621         IL_003c:  add 
1622         IL_003d:  stloc.2 
1623         IL_003e:  ldloc.0 
1624         IL_003f:  ldloc.1 
1625         IL_0040:  bgt.s IL_0042
1626                                 br L4
1627         IL_0042:  ldloc.2 
1628         IL_0043:  ret 
1629         L4:
1630         IL_0044:  ldloc.2 
1631         IL_0045:  ldc.i4.1 
1632         IL_0046:  add 
1633         IL_0047:  stloc.2 
1634         IL_0048:  ldloc.2 
1635         IL_0049:  ret 
1636     } // end of method Tests::test_5_float_branch_nan
1637
1638     .method private static  hidebysig
1639            default void regress_80622_inner (object x)  cil managed
1640     {
1641                 .locals (unsigned int8 i)
1642         // Method begins at RVA 0x2050
1643         // Code size 14 (0xe)
1644         .maxstack 8
1645         IL_1000:  ldarg.0
1646         IL_1001:  unbox unsigned int8
1647         IL_1006:  ldobj unsigned int8
1648         IL_000b:  conv.ovf.i4.un
1649         IL_000c:  pop
1650         IL_000d:  ret
1651     }
1652
1653     // method line 2
1654     .method private static  hidebysig
1655            default int32 test_0_regress_80622 ()  cil managed
1656     {
1657         .maxstack 8
1658         IL_0000:  ldc.i4 255
1659         IL_0005:  box unsigned int8
1660         IL_000a:  call void class Tests::regress_80622_inner (object)
1661                 ldc.i4.0
1662         IL_000f:  ret
1663     }
1664
1665         .method private static default int32 test_0_regresss_80190 () cil managed
1666         {
1667             .maxstack  2
1668             .locals init (int32 V_0,
1669                      int32* V_1)
1670             IL_0000:  nop
1671             IL_0001:  nop
1672             IL_0002:  ldloca.s   V_0
1673             IL_0004:  conv.u
1674             IL_0005:  stloc.1
1675             IL_0006:  ldloc.1
1676             IL_0007:  ldc.i4.3
1677             IL_0008:  stind.i4
1678             IL_0009:  nop
1679                                   ldc.i4.0
1680                                   ret
1681         }
1682
1683         .class interface nested public auto ansi abstract IFaceWithStaticMethod
1684         {
1685             .method public static  specialname 
1686                default void foo ()  cil managed noinlining 
1687             {
1688                 .maxstack 0
1689                 IL_0000:  ret 
1690         }
1691         }
1692         
1693         .class nested public auto ansi AClass extends [mscorlib]System.Object implements Tests/IFaceWithStaticMethod
1694         {
1695             .method public hidebysig  specialname  rtspecialname 
1696            instance default void .ctor ()  cil managed 
1697             {
1698                         .maxstack 8
1699                         ret
1700                 }
1701
1702         }
1703
1704         // Test that static methods in interfaces are ignored during vtable construction
1705         .method private static default int32 test_0_ifaces_with_static_methods () cil managed
1706         {
1707                 .maxstack 16
1708
1709                 newobj instance void class Tests/AClass::.ctor()
1710                 pop
1711                 ldc.i4.0
1712                 ret
1713         }
1714
1715         .method private static hidebysig default int32 Foo<T> (!!T n)  cil managed {
1716                 ldarg.0
1717                 box !!0
1718                 brtrue HAS_VALUE
1719                 ldc.i4.0
1720                 ret
1721 HAS_VALUE:      ldc.i4.1
1722                 ret
1723         }
1724
1725         // bug 78019
1726         .method static public int32 test_0_nullable_box_brtrue () cil managed {
1727
1728                 .locals init (valuetype [mscorlib]System.Nullable`1<int32> V_0)
1729
1730                 ldloc.0
1731                 call int32 class Tests::Foo<valuetype [mscorlib]System.Nullable`1<int32>> (!!0)
1732                 ret
1733         }
1734
1735         //Bug 372410
1736         .method static public int32 test_0_ldelema_type_check () cil managed {
1737                 .maxstack 16
1738                 .locals init (object[] V_0,
1739                                           object[,] V_1)
1740
1741                 ldc.i4.1
1742                 newarr object
1743                 stloc.0
1744
1745                 .try {
1746                         ldloc.0
1747                         ldc.i4.0
1748                         ldelema object
1749                         leave L1
1750                 } catch [mscorlib]System.ArrayTypeMismatchException {
1751                         leave ERROR1
1752                 }
1753
1754         L1:
1755                 ldc.i4.1
1756                 newarr string
1757                 stloc.0
1758
1759                 .try {
1760                         ldloc.0
1761                         ldc.i4.0
1762                         ldelema object
1763                         leave ERROR2
1764                 } catch [mscorlib]System.ArrayTypeMismatchException {
1765                         leave L2
1766                 }
1767
1768         L2:
1769                         ldc.i4.1
1770                 newarr string
1771                 stloc.0
1772
1773                 .try {
1774                         ldloc.0
1775                         ldc.i4.0
1776                         readonly. ldelema object
1777                         leave L3
1778                 } catch [mscorlib]System.ArrayTypeMismatchException {
1779                         leave ERROR3
1780                 }
1781
1782         L3:
1783                 ldc.i4.0
1784                 ret
1785
1786
1787         ERROR1:
1788                 ldc.i4.1
1789                 ret
1790
1791         ERROR2:
1792                 ldc.i4.2
1793                 ret
1794
1795         ERROR3:
1796                 ldc.i4.3
1797                 ret
1798         }
1799
1800
1801         //Bug 372410
1802         .method static public int32 test_0_array_address_type_check () cil managed {
1803                 .maxstack 16
1804                 .locals init (object[] V_0,
1805                                           object[,] V_1)
1806
1807                 ldc.i4.1 
1808             ldc.i4.1 
1809             newobj instance void object[,]::.ctor(int32, int32)
1810                 stloc.1
1811
1812                 .try {
1813                         ldloc.1
1814                         ldc.i4.0
1815                         ldc.i4.0
1816                         call instance object&  object[,]::Address(int32, int32)
1817                         leave L4
1818                 } catch [mscorlib]System.ArrayTypeMismatchException {
1819                         leave ERROR4
1820                 }
1821
1822         L4:
1823                 ldc.i4.1 
1824             ldc.i4.1 
1825             newobj instance void string[,]::.ctor(int32, int32)
1826                 stloc.1
1827
1828                 .try {
1829                         ldloc.1
1830                         ldc.i4.0
1831                         ldc.i4.0
1832                         call instance object&  object[,]::Address(int32, int32)
1833                         leave ERROR5
1834                 } catch [mscorlib]System.ArrayTypeMismatchException {
1835                         leave L5
1836                 }
1837
1838         L5:
1839                 ldc.i4.1 
1840             ldc.i4.1 
1841             newobj instance void string[,]::.ctor(int32, int32)
1842                 stloc.1
1843
1844                 .try {
1845                         ldloc.1
1846                         ldc.i4.0
1847                         ldc.i4.0
1848                         readonly. call instance object&  object[,]::Address(int32, int32)
1849                         leave L6
1850                 } catch [mscorlib]System.ArrayTypeMismatchException {
1851                         leave ERROR6
1852                 }
1853
1854         L6:
1855                 ldc.i4.0
1856                 ret
1857         ERROR4:
1858                 ldc.i4.4
1859                 ret
1860
1861         ERROR5:
1862                 ldc.i4.5
1863                 ret
1864
1865         ERROR6:
1866                 ldc.i4.6
1867                 ret
1868         }
1869
1870         .field public  static unsigned int64 'ull'
1871
1872         .field public  static int32 'shift2'
1873
1874         .method public static int32 test_0_long_shift_regalloc () cil managed
1875         {
1876                 .locals (unsigned int32 'cilsimp.28', unsigned int64 'cilsimp.27', int32 'cilsimp.26')
1877
1878                 .maxstack 4
1879
1880                 ldc.i8  81985529234382576
1881                 stsfld  unsigned int64 Tests::ull
1882             ldc.i4      60
1883                 stsfld  int32 Tests::shift2
1884
1885                 ldsfld  unsigned int64 Tests::ull
1886                 stloc   'cilsimp.27'
1887                 ldsfld  int32 Tests::shift2
1888                 stloc   'cilsimp.28'
1889                 ldloc   'cilsimp.27'
1890                 ldloc   'cilsimp.28'
1891                 shr.un
1892                 ldloc   'cilsimp.27'
1893                 ldc.i4  64
1894                 ldloc   'cilsimp.28'
1895                 sub
1896                 shl
1897                 or
1898                 ldc.i8  1311768467750121216
1899                 ceq
1900                 ldc.i4.1
1901                 xor
1902                 conv.u4
1903                 ret
1904         }
1905
1906         // Test calling ldfld directly on a vtype instead of a vtype address
1907         .method public static int32 test_5_call_ldfld_vtype () cil managed
1908         {
1909                 .maxstack 16
1910                 .locals init (
1911                         valuetype Tests/TailCallStruct arg
1912                 )
1913                 ldloca 0
1914                 ldc.i4.2
1915                 stfld int32 Tests/TailCallStruct::a
1916                 ldloca 0
1917                 ldc.i4.4
1918                 stfld int32 Tests/TailCallStruct::b
1919                 ldloc.0
1920                 call valuetype Tests/TailCallStruct Tests::tail2 (valuetype Tests/TailCallStruct)
1921                 ldfld int32 Tests/TailCallStruct::a
1922                 ret
1923         }
1924
1925         .method public static int32 throw_ret () cil managed
1926         {
1927                 ldstr "FOO"
1928                 newobj instance void class [mscorlib]System.OverflowException::.ctor(string)
1929                 throw
1930                 ldc.i4.4
1931                 ret
1932         }
1933
1934         .method public static int32 throw2_ret () cil managed
1935         {
1936                 // Disable inlining
1937                 ldc.i4.5
1938                 localloc
1939                 pop
1940
1941                 call int32 Tests::throw_ret ()
1942                 ret
1943         }
1944
1945         // Test inlining a method which contains just a throw
1946         .method public static int32 test_0_inline_throw () cil managed
1947         {
1948                 .maxstack 16
1949                 .locals init (
1950                                 int32 v_0
1951                 )
1952
1953                 .try {
1954                         call int32 Tests::throw2_ret ()
1955                         stloc.0
1956                         leave L0
1957                 } catch [mscorlib]System.OverflowException {
1958                         pop
1959                         leave L1
1960                 }
1961
1962                 L0:
1963                         ldc.i4.1
1964                         ret
1965                 L1:
1966                         ldc.i4.0
1967                         ret                     
1968         }
1969
1970     .method public static int32 test_0_stelem_any_null_opt () cil managed
1971     {
1972                 .maxstack 16
1973                 .locals init (
1974                                 object[]        V_0,
1975                                 int32   V_1)
1976
1977                 ldc.i4.s 10
1978                 newarr [mscorlib]System.Object
1979                 stloc.0
1980
1981                 ldc.i4.0
1982                 stloc.1
1983                 br L0
1984
1985         L1:
1986                 ldloc.0
1987                 ldloc.1
1988                 ldnull
1989                 stelem.any [mscorlib]System.Object
1990                 ldloc.1
1991                 ldc.i4.1
1992                 add
1993                 stloc.1
1994         L0:
1995                 ldloc.1
1996                 ldc.i4.s 10
1997                 blt L1
1998
1999                 ldc.i4.0
2000                 ret
2001         }
2002
2003     // method line 2
2004     .method public static  hidebysig 
2005            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 
2006     {
2007         // Method begins at RVA 0x20f4
2008         // Code size 44 (0x2c)
2009         .maxstack 8
2010         IL_0000:  ldarg.0 
2011         IL_0001:  ldarg.1 
2012         IL_0002:  add 
2013         IL_0003:  ldarg.2 
2014         IL_0004:  add 
2015         IL_0005:  ldarg.3 
2016         IL_0006:  add 
2017         IL_0007:  ldarg.s 4
2018         IL_0009:  add 
2019         IL_000a:  ldarg.s 5
2020         IL_000c:  add 
2021         IL_000d:  ldarg.s 6
2022         IL_000f:  add 
2023         IL_0010:  ldarg.s 7
2024         IL_0012:  add 
2025         IL_0013:  ldarg.s 8
2026         IL_0015:  add 
2027         IL_0016:  ldarg.s 9
2028         IL_0018:  add 
2029         IL_0019:  ldarg.s 10
2030         IL_001b:  add 
2031         IL_001c:  ldarg.s 11
2032         IL_001e:  add 
2033         IL_001f:  ldarg.s 12
2034         IL_0021:  add 
2035         IL_0022:  ldarg.s 13
2036         IL_0024:  add 
2037         IL_0025:  ldarg.s 14
2038         IL_0027:  add 
2039         IL_0028:  ldarg.s 15
2040         IL_002a:  add 
2041         IL_002b:  ret 
2042     } // end of method main::callee
2043
2044     // method line 3
2045     .method public static  hidebysig 
2046            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 
2047     {
2048         // Method begins at RVA 0x2124
2049         // Code size 34 (0x22)
2050         .maxstack 17
2051         IL_0000:  ldarg.0 
2052         IL_0001:  ldarg.1 
2053         IL_0002:  ldarg.2 
2054         IL_0003:  ldarg.3 
2055         IL_0004:  ldarg.s 4
2056         IL_0006:  ldarg.s 5
2057         IL_0008:  ldarg.s 6
2058         IL_000a:  ldarg.s 7
2059         IL_000c:  ldarg.s 8
2060         IL_000e:  ldarg.s 9
2061         IL_0010:  ldarg.s 10
2062         IL_0012:  ldarg.s 11
2063         IL_0014:  ldarg.s 12
2064         IL_0016:  ldarg.s 13
2065         IL_0018:  ldarg.s 14
2066         IL_001a:  ldarg.s 15
2067                   tail.
2068         IL_001c:  call int32 class Tests::manyargs_callee(int32, int32, int32, int32, int32, int32, int32, int32, int32, int32, int32, int32, int32, int32, int32, int32)
2069         IL_0021:  ret 
2070     } // end of method main::caller
2071
2072     // method line 4
2073     .method public static  hidebysig 
2074            default int32 test_0_many_args_tail_call ()  cil managed 
2075     {
2076                 // Some platforms might not be able to AOT tail calls
2077                 .custom instance void class [TestDriver]CategoryAttribute::'.ctor'(string) =  (01 00 08 21 46 55 4C 4C 41 4F 54 00 00 ) // ...!FULLAOT..
2078
2079         // Method begins at RVA 0x2154
2080         // Code size 43 (0x2b)
2081         .maxstack 17
2082         IL_0000:  ldc.i4.1 
2083         IL_0001:  ldc.i4.2 
2084         IL_0002:  ldc.i4.3 
2085         IL_0003:  ldc.i4.4 
2086         IL_0004:  ldc.i4.5 
2087         IL_0005:  ldc.i4.6 
2088         IL_0006:  ldc.i4.7 
2089         IL_0007:  ldc.i4.8 
2090         IL_0008:  ldc.i4.s 0x09
2091         IL_000a:  ldc.i4.s 0x0a
2092         IL_000c:  ldc.i4.s 0x0b
2093         IL_000e:  ldc.i4.s 0x0c
2094         IL_0010:  ldc.i4.s 0x0d
2095         IL_0012:  ldc.i4.s 0x0e
2096         IL_0014:  ldc.i4.s 0x0f
2097         IL_0016:  ldc.i4.s 0x10
2098         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)
2099         IL_001d:  ldc.i4 136
2100         IL_0022:  beq IL_0029
2101
2102         IL_0027:  ldc.i4.1 
2103         IL_0028:  ret 
2104         IL_0029:  ldc.i4.0 
2105         IL_002a:  ret 
2106     } // end of method main::Main
2107
2108         .class nested private auto ansi beforefieldinit R1
2109            extends [mscorlib]System.MarshalByRefObject
2110         {
2111                 .field  public  int32 test_field
2112
2113         .method public hidebysig  specialname  rtspecialname
2114                         instance default void '.ctor' ()  cil managed
2115         {
2116                         ret
2117                 }
2118         }
2119
2120         .method public static hidebysig
2121                         default int32 return_0 () cil managed
2122         {
2123                 ldc.i4.0
2124                 ret
2125         }
2126
2127         .method public static hidebysig
2128                         default int32 test_1_volatile_marshalbyref_bug_432673 () cil managed
2129         {
2130                 .locals init (
2131                         class Tests/R1 v_0
2132                 )
2133
2134                 newobj instance void class Tests/R1::.ctor ()
2135                 stloc.0
2136                 ldloc.0
2137                 ldc.i4.0
2138                 volatile.
2139                 stfld int32 Tests/R1::test_field
2140                 call int32 class Tests::return_0 ()
2141                 ldc.i4.1
2142                 add
2143                 ret
2144         }
2145
2146         .method public static default int32 return_2 () cil managed
2147         {
2148                 // Prevent inlining
2149                 ldc.i4.s 16
2150         localloc
2151                 pop
2152                 ldc.i4.s 2
2153                 ret
2154         }
2155
2156         .method public static hidebysig
2157                         default int32 test_1_cmov_opt_regress_463357 () cil managed
2158         {
2159                 call int32 class Tests::return_2 ()
2160                 ldc.i4.0
2161                 ceq
2162                 brfalse L1
2163                 ldc.i4.0
2164                 ret
2165                 br L2
2166         L1: nop
2167         L2: nop
2168                 ldc.i4.1
2169                 ret
2170         }
2171
2172    .method public static hidebysig default int32 cmov_opt_regress_474718_inner (int32 A_1)  cil managed 
2173    {
2174       .maxstack 3
2175       .locals init (int32 V_0, bool V_1, bool V_2)
2176       
2177           ldc.i4.0
2178       IL_000b:  stloc.1 
2179       IL_000d:  br IL_002f
2180
2181           ldc.i4.1    
2182           stloc.2
2183       IL_001e:  ldloc.2 
2184       IL_001f:  brfalse IL_0036
2185
2186       IL_0024:  
2187       IL_002a:  br IL_0041
2188     
2189       IL_002f:  ldloc.1
2190       IL_0030:  stloc.2 
2191       IL_0031:  br IL_001e
2192     
2193       IL_0036:  ldc.i4 0
2194       IL_003b:  stloc.0 
2195       IL_003c:  br IL_0041
2196     
2197       IL_0041:  ldloc.0 
2198       IL_0042:  ret 
2199   } 
2200
2201     .method public static default int32 test_0_cmov_opt_regress_474718 ()  cil managed 
2202     {
2203         .maxstack 16
2204         ldc.i4.1
2205         call int32 Tests::cmov_opt_regress_474718_inner (int32)
2206         ret
2207    }
2208
2209         .method public static default int32 test_5_createarr_newobj () cil managed
2210         {
2211                 .maxstack 16
2212
2213                 ldc.i4 5
2214                 newobj void char[]::.ctor(int32)
2215                 ldlen
2216                 ret
2217         }
2218
2219         .method public static default int32 test_0_initblk_3_regress_481458 () cil managed
2220         {
2221                 .maxstack 16
2222                 .locals init (native int)
2223
2224                 ldc.i4.s 10
2225                 localloc
2226                 stloc.0
2227
2228                 // Set the first value to 3
2229                 ldloc.0
2230                 ldc.i4.0
2231                 add             //addr
2232                 ldc.i4.3        //value
2233                 stind.i1
2234
2235                 // Zero out the first 3 values
2236                 ldloc.0         //addr
2237                 ldc.i4.0        //value
2238                 ldc.i4.s 3      //size
2239                 initblk
2240
2241                 // Load the first value
2242                 ldloc.0
2243                 ldc.i4.0
2244                 add     
2245                 ldind.u1
2246                 conv.i4
2247                 ret
2248         }
2249
2250         .method public static float32 GetFloat32() cil managed noinlining
2251         {
2252                 .maxstack  8
2253                 ldc.r8     0.19975845134874831
2254                 ret
2255         }
2256
2257 /*         Disabled until they can be fixed to run on amd64
2258         .method public static default int32 test_0_implicit_float_to_double_conversion () cil managed
2259         {
2260                 .maxstack 16
2261
2262                 call float32 Tests::GetFloat32()
2263                 ldc.r8     0.19975845134874831
2264                 beq OK
2265
2266                 ldc.i4.1
2267                 ret
2268 OK:
2269                 ldc.i4.0
2270                 ret
2271         }
2272 */
2273
2274         .method public static default int32 test_0_long_to_r8_un_overflow () cil managed
2275         {
2276                 .maxstack 16
2277                 ldc.i8     0x00FFFFFFFFFFFFFF
2278                 conv.r.un
2279                 conv.i8
2280                 ldc.i8 0x100000000000000
2281                 beq OK_1
2282
2283                 ldc.i4.1
2284                 ret
2285 OK_1:
2286                 ldc.i8     0x00FFFFFFFFFFFFFF
2287                 conv.r.un
2288                 conv.r8
2289                 conv.i8
2290                 ldc.i8 0x100000000000000
2291                 beq OK_2
2292
2293                 ldc.i4.2
2294                 ret
2295 OK_2:
2296                 ldc.i4.0
2297                 ret
2298         }
2299
2300         .field public static int32 shift1
2301
2302         .method public static int32 regress_497271_helper (int32 i) cil managed
2303         {
2304                 ldarg.0
2305                 ret
2306         }
2307
2308         .method public static int32 test_0_regalloc_regress_497271 () cil managed
2309         {
2310                 .locals (int32 var)
2311
2312                 ldc.i4  4
2313                 stsfld  int32 Tests::shift1
2314                 ldsfld  int32 Tests::shift1
2315                 stloc   var
2316                 ldc.i4  4660
2317                 ldloc   var
2318                 shr.un
2319                 ldc.i4  4660
2320                 ldc.i4  32
2321                 ldloc   var
2322                 sub
2323                 shl
2324                 or
2325                 ldc.i4  1073742115
2326                 beq     ?L10
2327 ?L9:
2328                 ldc.i4  1
2329                 call    int32 Tests::regress_497271_helper (int32)
2330                 ret
2331 ?L10:
2332                 ldc.i4  0
2333                 call    int32 Tests::regress_497271_helper (int32)
2334                 ret
2335         }
2336
2337    .field  private static  int32 Value
2338
2339   .method public static hidebysig  specialname 
2340           default int32 regress_513931_inner ()  cil managed 
2341     {                                                                 
2342         // Method begins at RVA 0x225c                                
2343         // Code size 52 (0x34)                                        
2344         .maxstack 2                                                   
2345         .locals init (                                                
2346                 int32   V_0,                                          
2347                 int32   V_1,                                          
2348                 bool    V_2)
2349                        
2350                                 ldc.i4 999
2351                                 stsfld int32 Tests::Value
2352
2353         IL_0000:  nop                                                 
2354         IL_0001:  ldsfld int32 Tests::Value      
2355         IL_0006:  stloc.0                                             
2356         IL_0007:  ldloc.0                                             
2357         IL_0008:  ldc.i4.0                                            
2358         IL_0009:  cgt                                                 
2359         IL_000b:  ldc.i4.0                                            
2360         IL_000c:  ceq                                                 
2361         IL_000e:  stloc.2                                             
2362         IL_000f:  ldloc.2                                             
2363         IL_0010:  brtrue.s IL_0027                                    
2364
2365         IL_0012:  nop 
2366         IL_0013:  ldloc.0 
2367         IL_0014:  ldc.i4.s 0x7b
2368         IL_0016:  ceq          
2369         IL_0018:  ldc.i4.0     
2370         IL_0019:  ceq          
2371         IL_001b:  stloc.2      
2372         IL_001c:  ldloc.2      
2373         IL_001d:  brtrue.s IL_0023
2374
2375         IL_001f:  ldc.i4.m1 
2376         IL_0020:  stloc.1   
2377         IL_0021:  br.s IL_0032
2378
2379         IL_0023:  ldc.i4.1 
2380         IL_0024:  stloc.1  
2381         IL_0025:  br.s IL_0032
2382
2383         IL_0027:  
2384         IL_002c:  newobj instance void class [mscorlib]System.Exception::'.ctor'()
2385         IL_0031:  throw                                                                            
2386         IL_0032:  ldloc.1                                                                          
2387         IL_0033:  ret                                                                              
2388     }
2389
2390         .method public static hidebysig  specialname 
2391          default int32 test_0_regress_513931 ()  cil managed 
2392         {
2393                 call int32 Tests::regress_513931_inner ()
2394                 pop
2395                 ldc.i4.0
2396                 ret
2397         }
2398
2399         .method public static default int32 test_0_newarr_i8 () cil managed
2400         {
2401                 ldc.i4 1000
2402                 conv.i8
2403                 newarr [mscorlib]System.Boolean
2404                 pop
2405                 ldc.i4 0
2406                 ret
2407         }
2408
2409         .method public static specialname 
2410                default int32 return_1_noinline ()  cil managed noinlining 
2411         {
2412                 .maxstack 0
2413
2414                 ldc.i4.1
2415                 ret 
2416         }
2417
2418         // Only happens with -O=-deadce,cmov
2419         .method public static default int32 test_0_cmov_unused_582322 () cil managed
2420         {
2421         .maxstack 2                                                   
2422         .locals init (                                                
2423                                 int32 V_0
2424                 )                               
2425                 call int32 Tests::return_1_noinline ()
2426                 ldc.i4.1
2427                 bne.un L0
2428                 ldloc.s 0
2429                 pop
2430         L0:
2431                 ldc.i4.0
2432                 ret
2433         }
2434
2435     .method public static  hidebysig 
2436            default int32 test_0_regress_586664 ()  cil managed 
2437     {                                        
2438         // Method begins at RVA 0x20f4       
2439         // Code size 76 (0x4c)               
2440         .maxstack 6                          
2441         .locals init (                       
2442                 float64 V_0,                 
2443                 float64[]       V_1)         
2444         IL_0000:  ldc.r8 1.                  
2445         IL_0009:  ldc.r8 2.                  
2446         IL_0012:  ldc.r8 1.                  
2447         IL_001b:  call float64 class [mscorlib]System.Math::Pow(float64, float64)
2448         IL_0020:  div                                                            
2449         IL_0021:  stloc.0                                                        
2450         IL_0022:  ldc.i4.2                                                       
2451         IL_0023:  newarr [mscorlib]System.Double                                 
2452         IL_0028:  dup                                                            
2453         IL_0029:  ldc.i4.0                                                       
2454         IL_002a:  ldloc.0                                                        
2455         IL_002b:  neg                                                            
2456         IL_002c:  stelem.r8                                                      
2457         IL_002d:  dup                                                            
2458         IL_002e:  ldc.i4.1                                                       
2459         IL_002f:  ldloc.0
2460         IL_0030:  neg
2461         IL_0031:  stelem.r8
2462         IL_0032:  stloc.1
2463         IL_0033:  ldloc.1
2464         IL_0034:  ldc.i4.0
2465         IL_0035:  ldelem.r8
2466         IL_0036:  ldc.r8 -0.5
2467         IL_003f:  bne.un IL_004a
2468
2469         IL_0044:  ldc.i4.0
2470         IL_0045:  br IL_004b
2471
2472         IL_004a:  ldc.i4.1
2473         IL_004b:  ret
2474     }
2475
2476         .method public static int32 test_2_leave_multiple_blocks_from_end ()
2477         {
2478                 .locals init (int32 V_0)
2479
2480                 .try {
2481                         .try {
2482                                 nop
2483                                 nop
2484                                 leave END
2485                         } finally {
2486                                 ldloc.0
2487                                 ldc.i4.1
2488                                 add
2489                                 stloc.0
2490                                 endfinally
2491                         }
2492                         nop
2493                         leave END
2494                 } finally {
2495                         ldloc.0
2496                         ldc.i4.1
2497                         add
2498                         stloc.0
2499                         endfinally
2500                 }
2501 END:
2502                 ldloc.0
2503                 ret
2504         }
2505
2506         .method public static int32 test_3_leave_multiple_blocks_from_hole ()
2507         {
2508                 .locals init (int32 V_0)
2509
2510                 .try {
2511                         .try {
2512                                 ldloc.0
2513                                 brtrue REST
2514                                 leave BEFORE_END
2515 REST:
2516                                 nop
2517                                 nop
2518                                 leave END
2519                         } finally {
2520                                 ldloc.0
2521                                 ldc.i4.1
2522                                 add
2523                                 stloc.0
2524                                 endfinally
2525                         }
2526                         nop
2527                         leave END
2528                 } finally {
2529                         ldloc.0
2530                         ldc.i4.1
2531                         add
2532                         stloc.0
2533                         endfinally
2534                 }
2535 BEFORE_END:
2536                 ldloc.0
2537                 ldc.i4.1
2538                 add
2539                 stloc.0
2540 END:
2541                 ldloc.0
2542                 ret
2543         }
2544
2545         .class nested private auto ansi sealed beforefieldinit Pair`2<TKey,TValue>
2546                    extends [mscorlib]System.ValueType
2547         {
2548                 .field  public  !0 key
2549         .field  public  !1 'value'
2550         }
2551
2552     .method private static hidebysig 
2553            default bool ContentEquals<TKey,TValue> (valuetype Tests/Pair`2<!!TKey, !!TValue> v)  cil managed 
2554     {
2555         .maxstack 8
2556         IL_0000:  ldarga.s 0 
2557         IL_0006:  ldnull 
2558                           constrained. valuetype Tests/Pair`2<!!0,!!1>
2559         IL_0007:  callvirt instance bool class [mscorlib]System.Object::Equals(object)
2560                           ret
2561     }
2562
2563     .method public static hidebysig default int32 test_0_constrained_gshared_595863 () cil managed
2564     {
2565                 .locals init (
2566                 valuetype Tests/Pair`2<string, string>  V_0,
2567                 valuetype Tests/Pair`2<string, string>  V_1)
2568         IL_0000:  ldloca.s 0
2569         IL_0002:  initobj valuetype Tests/Pair`2<string,string>
2570         IL_0008:  ldloc.0 
2571         IL_0009:  stloc.1 
2572         IL_000a:  ldloca.s 1
2573         IL_000c:  ldstr "A"
2574         IL_0011:  stfld !0 valuetype Tests/Pair`2<string,string>::key
2575         IL_0016:  ldloca.s 1
2576         IL_0018:  ldstr "B"
2577         IL_001d:  stfld !1 valuetype Tests/Pair`2<string,string>::'value'
2578         IL_0022:  ldloc.1 
2579         IL_0023:  stloc.0 
2580         IL_0024:  ldloc.0 
2581         IL_0025:  call bool class Tests::ContentEquals<string, string> (valuetype Tests/Pair`2<!!0,!!1>)
2582                           brfalse SUCCESS
2583                           ldc.i4.1
2584                           ret
2585         SUCCESS:
2586                           ldc.i4.0
2587                           ret
2588     }
2589
2590         .method public static default int32 test_0_wrap_non_exception_throws () cil managed
2591         {
2592           .try {
2593                     newobj instance void class [mscorlib]System.Object::'.ctor'()
2594                         throw
2595                   leave IL_0
2596           } catch class [mscorlib]System.Runtime.CompilerServices.RuntimeWrappedException {
2597                   leave IL_0
2598                 }
2599                 IL_0:
2600                 ldc.i4.0
2601                 ret
2602     }
2603
2604         .method public static default int32 test_0_typespec_modopt () cil managed {
2605                 ldtoken class Tests modopt (Tests)
2606                 pop
2607                 ldc.i4.0
2608                 ret
2609         }
2610
2611         .method public hidebysig static int32 SizeOfT<T>() cil managed
2612         {
2613                 .maxstack  8
2614     
2615                 sizeof !!0
2616         ret
2617         }
2618
2619         .method public static default int32 test_1_sizeof_gshared () cil managed {
2620             call   int32 Tests::SizeOfT<int8>()
2621                 ldc.i4.1
2622                 ceq
2623                 ret
2624         }
2625
2626   .field static public int32 volatile_int
2627
2628         .method public static default int32 test_5_volatile_load_store () cil managed {
2629                 ldsflda int32 class Tests::volatile_int
2630                 ldc.i4 5
2631                 volatile.
2632                 stind.i4
2633                 ldsflda int32 class Tests::volatile_int
2634                 volatile.
2635                 ldind.i4
2636                 ret
2637         }               
2638
2639     .method public static 
2640            default int32 regress_693905_inner (int32 x, int32 acc)  cil managed 
2641     {
2642         // Method begins at RVA 0x2050
2643         // Code size 17 (0x11)
2644         .maxstack 5
2645         IL_0000:  ldarg.0 
2646         IL_0001:  brtrue.s IL_0005
2647
2648         IL_0003:  ldarg.1 
2649         IL_0004:  ret 
2650         IL_0005:  ldarg.0 
2651         IL_0006:  ldc.i4.1 
2652         IL_0007:  sub 
2653         IL_0008:  ldarg.1 
2654         IL_0009:  ldc.i4.1 
2655         IL_000a:  add 
2656         IL_000b:  starg.s 1
2657         IL_000d:  starg.s 0
2658         IL_000f:  br.s IL_0000
2659
2660     } // end of method Test::f
2661
2662     .method public static 
2663            default int32 test_10_regress_693905 ()  cil managed 
2664         {
2665                 ldc.i4.s 0x0a
2666         ldc.i4.0 
2667         call int32 class Tests::regress_693905_inner(int32, int32)
2668                 ret
2669         }
2670
2671         .method public static
2672                         default int32 test_0_llvm_regress_171 () cil managed
2673         {
2674                 .locals init (
2675                         int32 i
2676                 )
2677
2678                 call int32 Tests::return_1_noinline ()
2679                 ldc.i4.1
2680                 beq L1
2681                 ldc.i4.1
2682                 stloc.s 0
2683                 call int32 Tests::return_1_noinline ()
2684                 ldc.i4.0
2685                 beq L1
2686                 L1:
2687                 ldloc.s 0
2688                 ret
2689         }
2690
2691      .field  public static int32 static_a
2692
2693         .method public static
2694                         default int32 test_4_ldfld_stfld_static () cil managed
2695         {
2696                 ldnull
2697                 ldc.i4 2
2698                 stfld int32 Tests::static_a
2699                 ldnull
2700                 ldfld int32 Tests::static_a
2701                 ldnull
2702                 ldflda int32 Tests::static_a
2703                 ldind.i4
2704                 add
2705                 ret
2706         }
2707 }