summaryrefslogtreecommitdiff
path: root/tests/src/JIT/Regression/JitBlue/DevDiv_544983/DevDiv_544983.il
blob: 8ca630e1d7e04af74ce69c4c6ed0652638bcba21 (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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
// 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.

// The bug that this test captures was a case where a call to a divide helper
// was being removed as dead code, but the GT_FIELD_LIST node for the long
// argument was left. Such nodes must always be contained, and if they become
// dead, all of their children must be marked as unused.

.assembly extern mscorlib { auto }
.assembly extern System.Runtime { auto }
.assembly extern System.Console { auto }

.assembly DevDiv_544983 { }

.class public auto ansi beforefieldinit DevDiv_544983
       extends [System.Runtime]System.Object
{
  .method public hidebysig static int32 
          Test(int32 i) cil managed noinlining
  {
    .locals init ([0] int32 dummy)
        ldloc.0
        not         
        ldc.r8       -4.5508785095998289e-253
        conv.r8     
        conv.ovf.u4.un
        conv.ovf.u8.un
        conv.r.un   
        ldarg        0x0
        conv.r.un   
        dup         
        cgt         
        conv.r.un   
        div         
        conv.u1     
        conv.ovf.i8 
        pop  
        ret
  } // end of method DevDiv_544983:Test

  .method public hidebysig static int16
          Test2(uint16 a, float32 b, int32 c, uint16 d, uint8 e, int16 f, int32 g, int64 h)
  {
    .locals init ([0] int64 i)

        ldc.i8       2
        stloc.0
        ldarg.s      0x2
        ldarg.s      0x5
        div         
        conv.ovf.u2.un
        conv.ovf.u2.un
        ldarg        0x1
        conv.ovf.i4 
        conv.ovf.i8.un
        ldc.i4       0x669FC58A
        neg         
        shl         
        conv.r.un   
        ldloc.s      0x0
        conv.ovf.i8.un
        conv.r.un   
        ldloc        0x0
        conv.r.un   
        div         
        ceq         
        cgt.un      
        conv.r8     
        conv.r.un
        pop         
        ldloc        0x0
        neg         
        not         
        conv.i2
        ret 
   }

  .method public hidebysig static int32  Main() cil managed
  {
    .entrypoint
    .locals init ([0] int32 retVal, [1] int32 testResult)

         ldc.i4.s   100
         stloc.0
         ldc.i4.1
         call       int32 DevDiv_544983::Test(int32)
         stloc.1
         ldloc.1
         ldc.i4.m1
         ceq
         brtrue.s  L2

         ldstr      "Test Result = "
         call       void [System.Console]System.Console::Write(string)
         ldloc.1
         call       void [System.Console]System.Console::WriteLine(int32)
         ldstr      "FAIL"
         call       void [System.Console]System.Console::WriteLine(string)
         ldc.i4.m1
         stloc.0

    L2:  ldc.i4.1
         ldc.r4     2.0
         ldc.i4.3
         ldc.i4.4
         ldc.i4     5
         ldc.i4.6
         ldc.i4.7
         ldc.i8     8
         call       int16 DevDiv_544983::Test2(uint16, float32, int32, uint16, uint8, int16, int32, int64)
         stloc.1
         ldloc.1
         ldc.i4.1
         ceq
         brtrue.s  L3

         ldstr      "Test2 Result = "
         call       void [System.Console]System.Console::Write(string)
         ldloc.1
         call       void [System.Console]System.Console::WriteLine(int32)
         ldstr      "FAIL"
         call       void [System.Console]System.Console::WriteLine(string)
         ldc.i4.m1
         stloc.0
         br         L4

    L3:  ldloc.0
         ldc.i4.s   100
         ceq
         brfalse.s  L4

         ldstr      "PASS"
         call       void [System.Console]System.Console::WriteLine(string)

    L4:  ldloc.0
         ret
  } // end of method DevDiv_544983:Main

  .method public hidebysig specialname rtspecialname 
          instance void  .ctor() cil managed
  {
    // Code size       8 (0x8)
    .maxstack  8
         ldarg.0
         call       instance void [System.Runtime]System.Object::.ctor()
         ret
  } // end of method DevDiv_544983:.ctor

} // end of class DevDiv_544983