1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=x86_64-pc-linux < %s | FileCheck %s
4 define double @foo(double %0) #0 {
7 ; CHECK-NEXT: subq $24, %rsp
8 ; CHECK-NEXT: movsd %xmm0, (%rsp) # 8-byte Spill
9 ; CHECK-NEXT: movl $1024, %edi # imm = 0x400
10 ; CHECK-NEXT: callq fesetround@PLT
11 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
12 ; CHECK-NEXT: divsd (%rsp), %xmm1 # 8-byte Folded Reload
13 ; CHECK-NEXT: movsd %xmm1, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill
14 ; CHECK-NEXT: movl $1024, %edi # imm = 0x400
15 ; CHECK-NEXT: callq fesetround@PLT
16 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
17 ; CHECK-NEXT: divsd (%rsp), %xmm0 # 8-byte Folded Reload
18 ; CHECK-NEXT: movsd %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill
19 ; CHECK-NEXT: movl $1024, %edi # imm = 0x400
20 ; CHECK-NEXT: callq fesetround@PLT
21 ; CHECK-NEXT: movsd {{.*#+}} xmm2 = mem[0],zero
22 ; CHECK-NEXT: divsd (%rsp), %xmm2 # 8-byte Folded Reload
23 ; CHECK-NEXT: movsd {{[-0-9]+}}(%r{{[sb]}}p), %xmm0 # 8-byte Reload
24 ; CHECK-NEXT: # xmm0 = mem[0],zero
25 ; CHECK-NEXT: movsd {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 8-byte Reload
26 ; CHECK-NEXT: # xmm1 = mem[0],zero
27 ; CHECK-NEXT: callq fma@PLT
28 ; CHECK-NEXT: addq $24, %rsp
30 %2 = call i32 @fesetround(i32 noundef 1024)
31 %3 = call double @llvm.experimental.constrained.fdiv.f64(double 1.000000e+00, double %0, metadata !"round.dynamic", metadata !"fpexcept.ignore") #0
32 %4 = call i32 @fesetround(i32 noundef 1024)
33 %5 = call double @llvm.experimental.constrained.fdiv.f64(double 1.000000e+00, double %0, metadata !"round.dynamic", metadata !"fpexcept.ignore") #0
34 %6 = call i32 @fesetround(i32 noundef 1024)
35 %7 = call double @llvm.experimental.constrained.fdiv.f64(double 1.000000e+00, double %0, metadata !"round.dynamic", metadata !"fpexcept.ignore") #0
36 %8 = call double @llvm.experimental.constrained.fma.f64(double %3, double %5, double %7, metadata !"round.dynamic", metadata !"fpexcept.ignore") #0
40 declare i32 @fesetround(i32) #0
41 declare double @llvm.experimental.constrained.fdiv.f64(double, double, metadata, metadata) #0
42 declare double @llvm.experimental.constrained.fma.f64(double, double, double, metadata, metadata) #0
44 attributes #0 = { nounwind strictfp }