summaryrefslogtreecommitdiff
path: root/tests/src/JIT/Regression/JitBlue/DevDiv_359733/DevDiv_359733.il
blob: 18a712a4ae2e03988795308b0467b746d879491a (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
57
58
59
60
61
62
63
64
65
66
// 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.

// This test originally triggered an assert during remorphing while performing constant propagation when
// extracting the side effects of a discarded tree (specifically, the tree that corresponds to the xor in
// method C::M, which transitively takes exception-producing covnersions as arguments). The assert was
// attempting to ensure that if value numbers were present on the comma node used to hold the side effects,
// then value numbers were also present on the expression being added to the list. This condition may be violated
// when remorphing, however, and the assertion was appropiately weakened.

.assembly extern mscorlib {}
.assembly DevDiv_1359733 {}

.class private C extends [mscorlib]System.Object
{
    .method private static int16 M(bool a0, int16 a1, int16 a2, int32 a3) cil managed noinlining
    {
        .locals init (int32 l0, int16 l1, int64 l2, int16 l3, int8 l4, float32 l5, int8 l6)

        ldloc l3
        ldloc l5
        conv.i8
        conv.r8
        neg
        conv.ovf.u1.un
        ldloc.s l5
        conv.ovf.i8
        ldc.i8 0x4007ACD1
        ldloc l6
        shr
        rem
        nop
        ldc.i8 0x21C591BD
        neg
        cgt.un
        xor
        pop
        ret
    }

    .method private static int32 Main() cil managed
    {
        .entrypoint

        .try
        {
            ldc.i4 0
            ldc.i4 0
            ldc.i4 0
            ldc.i4 0
            call int16 C::M(bool, int16, int16, int32)
            pop
            leave.s done
        }
        catch [mscorlib]System.Exception
        {
            pop
            leave.s done
        }

    done:
        ldc.i4 100
        ret
    }
}