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