diff options
author | Dan Gohman <gohman@apple.com> | 2010-07-12 20:46:04 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-07-12 20:46:04 +0000 |
commit | 51e6d9bbf63cd2dc334fc9ba3e85cd7bf5ca00cb (patch) | |
tree | a95050628491d13665927e10580f4177d1384633 /llvm/test | |
parent | a5bf6b600197a6119dd0f9158326c2ba852ff095 (diff) | |
download | bcm5719-llvm-51e6d9bbf63cd2dc334fc9ba3e85cd7bf5ca00cb.tar.gz bcm5719-llvm-51e6d9bbf63cd2dc334fc9ba3e85cd7bf5ca00cb.zip |
Apply the SSE dependence idiom for SSE unary operations to
SD instructions too, in addition to SS instructions. And
add a comment about it.
llvm-svn: 108191
Diffstat (limited to 'llvm/test')
-rw-r--r-- | llvm/test/CodeGen/X86/break-sse-dep.ll | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/break-sse-dep.ll b/llvm/test/CodeGen/X86/break-sse-dep.ll index 027d2f1dafc..094cbc7bdef 100644 --- a/llvm/test/CodeGen/X86/break-sse-dep.ll +++ b/llvm/test/CodeGen/X86/break-sse-dep.ll @@ -19,3 +19,44 @@ entry: %1 = fptrunc double %0 to float ret float %1 } + +define float @squirtf(float* %x) nounwind { +entry: +; CHECK: squirtf: +; CHECK: movss (%rdi), %xmm0 +; CHECK: sqrtss %xmm0, %xmm0 + %z = load float* %x + %t = call float @llvm.sqrt.f32(float %z) + ret float %t +} + +define double @squirt(double* %x) nounwind { +entry: +; CHECK: squirt: +; CHECK: movsd (%rdi), %xmm0 +; CHECK: sqrtsd %xmm0, %xmm0 + %z = load double* %x + %t = call double @llvm.sqrt.f64(double %z) + ret double %t +} + +define float @squirtf_size(float* %x) nounwind optsize { +entry: +; CHECK: squirtf_size: +; CHECK: sqrtss (%rdi), %xmm0 + %z = load float* %x + %t = call float @llvm.sqrt.f32(float %z) + ret float %t +} + +define double @squirt_size(double* %x) nounwind optsize { +entry: +; CHECK: squirt_size: +; CHECK: sqrtsd (%rdi), %xmm0 + %z = load double* %x + %t = call double @llvm.sqrt.f64(double %z) + ret double %t +} + +declare float @llvm.sqrt.f32(float) +declare double @llvm.sqrt.f64(double) |