1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -O3 -mtriple=x86_64-gnu-linux < %s | FileCheck %s
4 define x86_fp80 @constrained_fpext_f32_as_fp80(float %mem) #0 {
5 ; CHECK-LABEL: constrained_fpext_f32_as_fp80:
6 ; CHECK: # %bb.0: # %entry
7 ; CHECK-NEXT: movss %xmm0, -{{[0-9]+}}(%rsp)
8 ; CHECK-NEXT: flds -{{[0-9]+}}(%rsp)
12 %ext = call x86_fp80 @llvm.experimental.constrained.fpext.f80.f32(
14 metadata !"fpexcept.strict") #0
18 define float @constrained_fptrunc_f80_to_f32(x86_fp80 %reg) #0 {
19 ; CHECK-LABEL: constrained_fptrunc_f80_to_f32:
21 ; CHECK-NEXT: fldt {{[0-9]+}}(%rsp)
22 ; CHECK-NEXT: fstps -{{[0-9]+}}(%rsp)
24 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
26 %trunc = call float @llvm.experimental.constrained.fptrunc.f32.f80(
28 metadata !"round.dynamic",
29 metadata !"fpexcept.strict") #0
33 define x86_fp80 @constrained_fpext_f64_to_f80(double %mem) #0 {
34 ; CHECK-LABEL: constrained_fpext_f64_to_f80:
35 ; CHECK: # %bb.0: # %entry
36 ; CHECK-NEXT: movsd %xmm0, -{{[0-9]+}}(%rsp)
37 ; CHECK-NEXT: fldl -{{[0-9]+}}(%rsp)
41 %ext = call x86_fp80 @llvm.experimental.constrained.fpext.f80.f64(
43 metadata !"fpexcept.strict") #0
47 define double @constrained_fptrunc_f80_to_f64(x86_fp80 %reg) #0 {
48 ; CHECK-LABEL: constrained_fptrunc_f80_to_f64:
50 ; CHECK-NEXT: fldt {{[0-9]+}}(%rsp)
51 ; CHECK-NEXT: fstpl -{{[0-9]+}}(%rsp)
53 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
55 %trunc = call double @llvm.experimental.constrained.fptrunc.f64.f80(
57 metadata !"round.dynamic",
58 metadata !"fpexcept.strict") #0
62 attributes #0 = { strictfp }
64 declare x86_fp80 @llvm.experimental.constrained.fpext.f80.f32(float, metadata)
65 declare x86_fp80 @llvm.experimental.constrained.fpext.f80.f64(double, metadata)
66 declare float @llvm.experimental.constrained.fptrunc.f32.f80(x86_fp80, metadata, metadata)
67 declare double @llvm.experimental.constrained.fptrunc.f64.f80(x86_fp80, metadata, metadata)