summaryrefslogtreecommitdiff
path: root/tests/src/JIT/opt/Inline/regression/mismatch32/mismatch32.il
blob: e23b0a8346ad4280b980a9254209df7c5981a892 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

// When the jit considers inlining B it can get itself into
// trouble because of the type mismatch. This test tries to
// ensure the jit backs out of the inline successfully.

.assembly extern mscorlib { }
.assembly extern System.Console
{
  .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A )
  .ver 4:0:0:0
}
.assembly main {}
.module main.exe

.class public sealed F extends System.ValueType
{

.method public instance void .ctor()
{
   ret
}

.field public string A
}

.method private static int32 B(int32 X, int32 Y)
{
   ldarg.0
   ret
}

.method public hidebysig static int32 Main(string[] args) cil managed
{
   .entrypoint
   .locals init (valuetype F v_0)
   ldarg.0
   ldlen
   ldc.i4 1
   bgt DONE
   newobj instance void F::.ctor()
   ldc.i4 33
   call  int32 B(int32, int32)
   pop

DONE:

   ldc.i4 100
   ret
}