1 ; RUN: llc < %s -march=x86-64 -mattr=+sse2 | FileCheck %s
3 define double @t1(float* nocapture %x) nounwind readonly ssp {
6 ; CHECK: movss (%rdi), %xmm0
7 ; CHECK: cvtss2sd %xmm0, %xmm0
9 %0 = load float* %x, align 4
10 %1 = fpext float %0 to double
14 define float @t2(double* nocapture %x) nounwind readonly ssp optsize {
17 ; CHECK: cvtsd2ss (%rdi), %xmm0
18 %0 = load double* %x, align 8
19 %1 = fptrunc double %0 to float
23 define float @squirtf(float* %x) nounwind {
26 ; CHECK: movss (%rdi), %xmm0
27 ; CHECK: sqrtss %xmm0, %xmm0
29 %t = call float @llvm.sqrt.f32(float %z)
33 define double @squirt(double* %x) nounwind {
36 ; CHECK: movsd (%rdi), %xmm0
37 ; CHECK: sqrtsd %xmm0, %xmm0
39 %t = call double @llvm.sqrt.f64(double %z)
43 define float @squirtf_size(float* %x) nounwind optsize {
45 ; CHECK: squirtf_size:
46 ; CHECK: sqrtss (%rdi), %xmm0
48 %t = call float @llvm.sqrt.f32(float %z)
52 define double @squirt_size(double* %x) nounwind optsize {
55 ; CHECK: sqrtsd (%rdi), %xmm0
57 %t = call double @llvm.sqrt.f64(double %z)
61 declare float @llvm.sqrt.f32(float)
62 declare double @llvm.sqrt.f64(double)