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) {
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)
11 %ext = call x86_fp80 @llvm.experimental.constrained.fpext.f80.f32(
13 metadata !"fpexcept.strict")
17 define float @constrained_fptrunc_f80_to_f32(x86_fp80 %reg) {
18 ; CHECK-LABEL: constrained_fptrunc_f80_to_f32:
20 ; CHECK-NEXT: fldt {{[0-9]+}}(%rsp)
21 ; CHECK-NEXT: fstps -{{[0-9]+}}(%rsp)
22 ; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
24 %trunc = call float @llvm.experimental.constrained.fptrunc.f32.f80(
26 metadata !"round.dynamic",
27 metadata !"fpexcept.strict")
31 define x86_fp80 @constrained_fpext_f64_to_f80(double %mem) {
32 ; CHECK-LABEL: constrained_fpext_f64_to_f80:
33 ; CHECK: # %bb.0: # %entry
34 ; CHECK-NEXT: movsd %xmm0, -{{[0-9]+}}(%rsp)
35 ; CHECK-NEXT: fldl -{{[0-9]+}}(%rsp)
38 %ext = call x86_fp80 @llvm.experimental.constrained.fpext.f80.f64(
40 metadata !"fpexcept.strict")
44 define double @constrained_fptrunc_f80_to_f64(x86_fp80 %reg) {
45 ; CHECK-LABEL: constrained_fptrunc_f80_to_f64:
47 ; CHECK-NEXT: fldt {{[0-9]+}}(%rsp)
48 ; CHECK-NEXT: fstpl -{{[0-9]+}}(%rsp)
49 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
51 %trunc = call double @llvm.experimental.constrained.fptrunc.f64.f80(
53 metadata !"round.dynamic",
54 metadata !"fpexcept.strict")
58 declare x86_fp80 @llvm.experimental.constrained.fpext.f80.f32(float, metadata)
59 declare x86_fp80 @llvm.experimental.constrained.fpext.f80.f64(double, metadata)
60 declare float @llvm.experimental.constrained.fptrunc.f32.f80(x86_fp80, metadata, metadata)
61 declare double @llvm.experimental.constrained.fptrunc.f64.f80(x86_fp80, metadata, metadata)