Skip to content

Commit 3611871

Browse files
committed
add missing test cases for x86
1 parent bc94a99 commit 3611871

File tree

2 files changed

+1302
-0
lines changed

2 files changed

+1302
-0
lines changed

llvm/test/CodeGen/X86/fp-strict-libcalls-msvc32.ll

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,90 @@ define float @tan(float %x) #0 {
177177
ret float %result
178178
}
179179

180+
define float @acos(float %x) #0 {
181+
; CHECK-LABEL: acos:
182+
; CHECK: # %bb.0:
183+
; CHECK-NEXT: pushl %eax
184+
; CHECK-NEXT: flds {{[0-9]+}}(%esp)
185+
; CHECK-NEXT: fstps (%esp)
186+
; CHECK-NEXT: wait
187+
; CHECK-NEXT: calll _acosf
188+
; CHECK-NEXT: popl %eax
189+
; CHECK-NEXT: retl
190+
%result = call float @llvm.experimental.constrained.acos.f32(float %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
191+
ret float %result
192+
}
193+
194+
define float @asin(float %x) #0 {
195+
; CHECK-LABEL: asin:
196+
; CHECK: # %bb.0:
197+
; CHECK-NEXT: pushl %eax
198+
; CHECK-NEXT: flds {{[0-9]+}}(%esp)
199+
; CHECK-NEXT: fstps (%esp)
200+
; CHECK-NEXT: wait
201+
; CHECK-NEXT: calll _asinf
202+
; CHECK-NEXT: popl %eax
203+
; CHECK-NEXT: retl
204+
%result = call float @llvm.experimental.constrained.asin.f32(float %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
205+
ret float %result
206+
}
207+
208+
define float @atan(float %x) #0 {
209+
; CHECK-LABEL: atan:
210+
; CHECK: # %bb.0:
211+
; CHECK-NEXT: pushl %eax
212+
; CHECK-NEXT: flds {{[0-9]+}}(%esp)
213+
; CHECK-NEXT: fstps (%esp)
214+
; CHECK-NEXT: wait
215+
; CHECK-NEXT: calll _atanf
216+
; CHECK-NEXT: popl %eax
217+
; CHECK-NEXT: retl
218+
%result = call float @llvm.experimental.constrained.atan.f32(float %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
219+
ret float %result
220+
}
221+
222+
define float @cosh(float %x) #0 {
223+
; CHECK-LABEL: cosh:
224+
; CHECK: # %bb.0:
225+
; CHECK-NEXT: pushl %eax
226+
; CHECK-NEXT: flds {{[0-9]+}}(%esp)
227+
; CHECK-NEXT: fstps (%esp)
228+
; CHECK-NEXT: wait
229+
; CHECK-NEXT: calll _coshf
230+
; CHECK-NEXT: popl %eax
231+
; CHECK-NEXT: retl
232+
%result = call float @llvm.experimental.constrained.cosh.f32(float %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
233+
ret float %result
234+
}
235+
236+
define float @sinh(float %x) #0 {
237+
; CHECK-LABEL: sinh:
238+
; CHECK: # %bb.0:
239+
; CHECK-NEXT: pushl %eax
240+
; CHECK-NEXT: flds {{[0-9]+}}(%esp)
241+
; CHECK-NEXT: fstps (%esp)
242+
; CHECK-NEXT: wait
243+
; CHECK-NEXT: calll _sinhf
244+
; CHECK-NEXT: popl %eax
245+
; CHECK-NEXT: retl
246+
%result = call float @llvm.experimental.constrained.sinh.f32(float %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
247+
ret float %result
248+
}
249+
250+
define float @tanh(float %x) #0 {
251+
; CHECK-LABEL: tanh:
252+
; CHECK: # %bb.0:
253+
; CHECK-NEXT: pushl %eax
254+
; CHECK-NEXT: flds {{[0-9]+}}(%esp)
255+
; CHECK-NEXT: fstps (%esp)
256+
; CHECK-NEXT: wait
257+
; CHECK-NEXT: calll _tanhf
258+
; CHECK-NEXT: popl %eax
259+
; CHECK-NEXT: retl
260+
%result = call float @llvm.experimental.constrained.tanh.f32(float %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
261+
ret float %result
262+
}
263+
180264
attributes #0 = { strictfp }
181265

182266
declare float @llvm.experimental.constrained.ceil.f32(float, metadata)
@@ -189,3 +273,9 @@ declare float @llvm.experimental.constrained.log10.f32(float, metadata, metadata
189273
declare float @llvm.experimental.constrained.pow.f32(float, float, metadata, metadata)
190274
declare float @llvm.experimental.constrained.sin.f32(float, metadata, metadata)
191275
declare float @llvm.experimental.constrained.tan.f32(float, metadata, metadata)
276+
declare float @llvm.experimental.constrained.acos.f32(float, metadata, metadata)
277+
declare float @llvm.experimental.constrained.asin.f32(float, metadata, metadata)
278+
declare float @llvm.experimental.constrained.atan.f32(float, metadata, metadata)
279+
declare float @llvm.experimental.constrained.cosh.f32(float, metadata, metadata)
280+
declare float @llvm.experimental.constrained.sinh.f32(float, metadata, metadata)
281+
declare float @llvm.experimental.constrained.tanh.f32(float, metadata, metadata)

0 commit comments

Comments
 (0)