1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -O3 -mtriple=i686-pc-windows-msvc -mattr=+cmov < %s | FileCheck %s
4 define float @ceil(float %x) #0 {
7 ; CHECK-NEXT: subl $12, %esp
8 ; CHECK-NEXT: flds {{[0-9]+}}(%esp)
9 ; CHECK-NEXT: fstpl (%esp)
11 ; CHECK-NEXT: calll _ceil
12 ; CHECK-NEXT: fstps {{[0-9]+}}(%esp)
13 ; CHECK-NEXT: flds {{[0-9]+}}(%esp)
15 ; CHECK-NEXT: addl $12, %esp
17 %result = call float @llvm.experimental.constrained.ceil.f32(float %x, metadata !"fpexcept.strict") #0
21 define float @cos(float %x) #0 {
24 ; CHECK-NEXT: subl $12, %esp
25 ; CHECK-NEXT: flds {{[0-9]+}}(%esp)
26 ; CHECK-NEXT: fstpl (%esp)
28 ; CHECK-NEXT: calll _cos
29 ; CHECK-NEXT: fstps {{[0-9]+}}(%esp)
30 ; CHECK-NEXT: flds {{[0-9]+}}(%esp)
32 ; CHECK-NEXT: addl $12, %esp
34 %result = call float @llvm.experimental.constrained.cos.f32(float %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
38 define float @exp(float %x) #0 {
41 ; CHECK-NEXT: subl $12, %esp
42 ; CHECK-NEXT: flds {{[0-9]+}}(%esp)
43 ; CHECK-NEXT: fstpl (%esp)
45 ; CHECK-NEXT: calll _exp
46 ; CHECK-NEXT: fstps {{[0-9]+}}(%esp)
47 ; CHECK-NEXT: flds {{[0-9]+}}(%esp)
49 ; CHECK-NEXT: addl $12, %esp
51 %result = call float @llvm.experimental.constrained.exp.f32(float %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
55 define float @floor(float %x) #0 {
58 ; CHECK-NEXT: subl $12, %esp
59 ; CHECK-NEXT: flds {{[0-9]+}}(%esp)
60 ; CHECK-NEXT: fstpl (%esp)
62 ; CHECK-NEXT: calll _floor
63 ; CHECK-NEXT: fstps {{[0-9]+}}(%esp)
64 ; CHECK-NEXT: flds {{[0-9]+}}(%esp)
66 ; CHECK-NEXT: addl $12, %esp
68 %result = call float @llvm.experimental.constrained.floor.f32(float %x, metadata !"fpexcept.strict") #0
72 define float @frem(float %x, float %y) #0 {
75 ; CHECK-NEXT: subl $20, %esp
76 ; CHECK-NEXT: flds {{[0-9]+}}(%esp)
77 ; CHECK-NEXT: flds {{[0-9]+}}(%esp)
78 ; CHECK-NEXT: fxch %st(1)
79 ; CHECK-NEXT: fstpl {{[0-9]+}}(%esp)
80 ; CHECK-NEXT: fstpl (%esp)
82 ; CHECK-NEXT: calll _fmod
83 ; CHECK-NEXT: fstps {{[0-9]+}}(%esp)
84 ; CHECK-NEXT: flds {{[0-9]+}}(%esp)
86 ; CHECK-NEXT: addl $20, %esp
88 %result = call float @llvm.experimental.constrained.frem.f32(float %x, float %y, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
92 define float @log(float %x) #0 {
95 ; CHECK-NEXT: subl $12, %esp
96 ; CHECK-NEXT: flds {{[0-9]+}}(%esp)
97 ; CHECK-NEXT: fstpl (%esp)
99 ; CHECK-NEXT: calll _log
100 ; CHECK-NEXT: fstps {{[0-9]+}}(%esp)
101 ; CHECK-NEXT: flds {{[0-9]+}}(%esp)
103 ; CHECK-NEXT: addl $12, %esp
105 %result = call float @llvm.experimental.constrained.log.f32(float %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
109 define float @log10(float %x) #0 {
110 ; CHECK-LABEL: log10:
112 ; CHECK-NEXT: subl $12, %esp
113 ; CHECK-NEXT: flds {{[0-9]+}}(%esp)
114 ; CHECK-NEXT: fstpl (%esp)
116 ; CHECK-NEXT: calll _log10
117 ; CHECK-NEXT: fstps {{[0-9]+}}(%esp)
118 ; CHECK-NEXT: flds {{[0-9]+}}(%esp)
120 ; CHECK-NEXT: addl $12, %esp
122 %result = call float @llvm.experimental.constrained.log10.f32(float %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
126 define float @pow(float %x, float %y) #0 {
129 ; CHECK-NEXT: subl $20, %esp
130 ; CHECK-NEXT: flds {{[0-9]+}}(%esp)
131 ; CHECK-NEXT: flds {{[0-9]+}}(%esp)
132 ; CHECK-NEXT: fxch %st(1)
133 ; CHECK-NEXT: fstpl {{[0-9]+}}(%esp)
134 ; CHECK-NEXT: fstpl (%esp)
136 ; CHECK-NEXT: calll _pow
137 ; CHECK-NEXT: fstps {{[0-9]+}}(%esp)
138 ; CHECK-NEXT: flds {{[0-9]+}}(%esp)
140 ; CHECK-NEXT: addl $20, %esp
142 %result = call float @llvm.experimental.constrained.pow.f32(float %x, float %y, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
146 define float @sin(float %x) #0 {
149 ; CHECK-NEXT: subl $12, %esp
150 ; CHECK-NEXT: flds {{[0-9]+}}(%esp)
151 ; CHECK-NEXT: fstpl (%esp)
153 ; CHECK-NEXT: calll _sin
154 ; CHECK-NEXT: fstps {{[0-9]+}}(%esp)
155 ; CHECK-NEXT: flds {{[0-9]+}}(%esp)
157 ; CHECK-NEXT: addl $12, %esp
159 %result = call float @llvm.experimental.constrained.sin.f32(float %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
163 define float @tan(float %x) #0 {
166 ; CHECK-NEXT: subl $12, %esp
167 ; CHECK-NEXT: flds {{[0-9]+}}(%esp)
168 ; CHECK-NEXT: fstpl (%esp)
170 ; CHECK-NEXT: calll _tan
171 ; CHECK-NEXT: fstps {{[0-9]+}}(%esp)
172 ; CHECK-NEXT: flds {{[0-9]+}}(%esp)
174 ; CHECK-NEXT: addl $12, %esp
176 %result = call float @llvm.experimental.constrained.tan.f32(float %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
180 define float @acos(float %x) #0 {
183 ; CHECK-NEXT: subl $12, %esp
184 ; CHECK-NEXT: flds {{[0-9]+}}(%esp)
185 ; CHECK-NEXT: fstpl (%esp)
187 ; CHECK-NEXT: calll _acos
188 ; CHECK-NEXT: fstps {{[0-9]+}}(%esp)
189 ; CHECK-NEXT: flds {{[0-9]+}}(%esp)
191 ; CHECK-NEXT: addl $12, %esp
193 %result = call float @llvm.experimental.constrained.acos.f32(float %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
197 define float @asin(float %x) #0 {
200 ; CHECK-NEXT: subl $12, %esp
201 ; CHECK-NEXT: flds {{[0-9]+}}(%esp)
202 ; CHECK-NEXT: fstpl (%esp)
204 ; CHECK-NEXT: calll _asin
205 ; CHECK-NEXT: fstps {{[0-9]+}}(%esp)
206 ; CHECK-NEXT: flds {{[0-9]+}}(%esp)
208 ; CHECK-NEXT: addl $12, %esp
210 %result = call float @llvm.experimental.constrained.asin.f32(float %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
214 define float @atan(float %x) #0 {
217 ; CHECK-NEXT: subl $12, %esp
218 ; CHECK-NEXT: flds {{[0-9]+}}(%esp)
219 ; CHECK-NEXT: fstpl (%esp)
221 ; CHECK-NEXT: calll _atan
222 ; CHECK-NEXT: fstps {{[0-9]+}}(%esp)
223 ; CHECK-NEXT: flds {{[0-9]+}}(%esp)
225 ; CHECK-NEXT: addl $12, %esp
227 %result = call float @llvm.experimental.constrained.atan.f32(float %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
231 define float @atan2(float %x, float %y) #0 {
232 ; CHECK-LABEL: atan2:
234 ; CHECK-NEXT: subl $20, %esp
235 ; CHECK-NEXT: flds {{[0-9]+}}(%esp)
236 ; CHECK-NEXT: flds {{[0-9]+}}(%esp)
237 ; CHECK-NEXT: fxch %st(1)
238 ; CHECK-NEXT: fstpl {{[0-9]+}}(%esp)
239 ; CHECK-NEXT: fstpl (%esp)
241 ; CHECK-NEXT: calll _atan2
242 ; CHECK-NEXT: fstps {{[0-9]+}}(%esp)
243 ; CHECK-NEXT: flds {{[0-9]+}}(%esp)
245 ; CHECK-NEXT: addl $20, %esp
247 %result = call float @llvm.experimental.constrained.atan2.f32(float %x, float %y, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
251 define float @cosh(float %x) #0 {
254 ; CHECK-NEXT: subl $12, %esp
255 ; CHECK-NEXT: flds {{[0-9]+}}(%esp)
256 ; CHECK-NEXT: fstpl (%esp)
258 ; CHECK-NEXT: calll _cosh
259 ; CHECK-NEXT: fstps {{[0-9]+}}(%esp)
260 ; CHECK-NEXT: flds {{[0-9]+}}(%esp)
262 ; CHECK-NEXT: addl $12, %esp
264 %result = call float @llvm.experimental.constrained.cosh.f32(float %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
268 define float @sinh(float %x) #0 {
271 ; CHECK-NEXT: subl $12, %esp
272 ; CHECK-NEXT: flds {{[0-9]+}}(%esp)
273 ; CHECK-NEXT: fstpl (%esp)
275 ; CHECK-NEXT: calll _sinh
276 ; CHECK-NEXT: fstps {{[0-9]+}}(%esp)
277 ; CHECK-NEXT: flds {{[0-9]+}}(%esp)
279 ; CHECK-NEXT: addl $12, %esp
281 %result = call float @llvm.experimental.constrained.sinh.f32(float %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
285 define float @tanh(float %x) #0 {
288 ; CHECK-NEXT: subl $12, %esp
289 ; CHECK-NEXT: flds {{[0-9]+}}(%esp)
290 ; CHECK-NEXT: fstpl (%esp)
292 ; CHECK-NEXT: calll _tanh
293 ; CHECK-NEXT: fstps {{[0-9]+}}(%esp)
294 ; CHECK-NEXT: flds {{[0-9]+}}(%esp)
296 ; CHECK-NEXT: addl $12, %esp
298 %result = call float @llvm.experimental.constrained.tanh.f32(float %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
302 attributes #0 = { strictfp }
304 declare float @llvm.experimental.constrained.ceil.f32(float, metadata)
305 declare float @llvm.experimental.constrained.cos.f32(float, metadata, metadata)
306 declare float @llvm.experimental.constrained.exp.f32(float, metadata, metadata)
307 declare float @llvm.experimental.constrained.floor.f32(float, metadata)
308 declare float @llvm.experimental.constrained.frem.f32(float, float, metadata, metadata)
309 declare float @llvm.experimental.constrained.log.f32(float, metadata, metadata)
310 declare float @llvm.experimental.constrained.log10.f32(float, metadata, metadata)
311 declare float @llvm.experimental.constrained.pow.f32(float, float, metadata, metadata)
312 declare float @llvm.experimental.constrained.sin.f32(float, metadata, metadata)
313 declare float @llvm.experimental.constrained.tan.f32(float, metadata, metadata)
314 declare float @llvm.experimental.constrained.acos.f32(float, metadata, metadata)
315 declare float @llvm.experimental.constrained.asin.f32(float, metadata, metadata)
316 declare float @llvm.experimental.constrained.atan.f32(float, metadata, metadata)
317 declare float @llvm.experimental.constrained.atan2.f32(float, float, metadata, metadata)
318 declare float @llvm.experimental.constrained.cosh.f32(float, metadata, metadata)
319 declare float @llvm.experimental.constrained.sinh.f32(float, metadata, metadata)
320 declare float @llvm.experimental.constrained.tanh.f32(float, metadata, metadata)