summaryrefslogtreecommitdiff
path: root/tests/src/JIT/opt/Inline/regression/mismatch64/mismatch64.il
blob: ba336c06c90d8634d2100c642b6e8c08308c6f3f (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
53
54
55
56
// 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.
//
// By default (when no args are passed) execution avoids
// the problematic callsite, and the app should run without
// failing.

.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 int64 B(int64 X, int64 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
   blt DONE
   newobj instance void F::.ctor()
   ldc.i8 44
   call  int64 B(int64, int64)
   pop

DONE:

   ldc.i4 100
   ret
}