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 attributes #0 = { strictfp }
182 declare float @llvm.experimental.constrained.ceil.f32(float, metadata)
183 declare float @llvm.experimental.constrained.cos.f32(float, metadata, metadata)
184 declare float @llvm.experimental.constrained.exp.f32(float, metadata, metadata)
185 declare float @llvm.experimental.constrained.floor.f32(float, metadata)
186 declare float @llvm.experimental.constrained.frem.f32(float, float, metadata, metadata)
187 declare float @llvm.experimental.constrained.log.f32(float, metadata, metadata)
188 declare float @llvm.experimental.constrained.log10.f32(float, metadata, metadata)
189 declare float @llvm.experimental.constrained.pow.f32(float, float, metadata, metadata)
190 declare float @llvm.experimental.constrained.sin.f32(float, metadata, metadata)
191 declare float @llvm.experimental.constrained.tan.f32(float, metadata, metadata)