diff options
author | Duncan Sands <baldrick@free.fr> | 2008-11-17 20:52:38 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2008-11-17 20:52:38 +0000 |
commit | ddc609406ad28403ba7b4ac8535ef87859145501 (patch) | |
tree | e41ca76a165b977c49e637baa022b7be07321829 /test/CodeGen/XCore/sqrt.ll | |
parent | f300f31bea5de295cbae6c6afe8063b1f8da7c9d (diff) | |
download | external_llvm-ddc609406ad28403ba7b4ac8535ef87859145501.zip external_llvm-ddc609406ad28403ba7b4ac8535ef87859145501.tar.gz external_llvm-ddc609406ad28403ba7b4ac8535ef87859145501.tar.bz2 |
Add soft float support for a bunch more operations. Original
patch by Richard Osborne, tweaked and extended by your humble
servant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59464 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/XCore/sqrt.ll')
-rw-r--r-- | test/CodeGen/XCore/sqrt.ll | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/CodeGen/XCore/sqrt.ll b/test/CodeGen/XCore/sqrt.ll new file mode 100644 index 0000000..221d1ac --- /dev/null +++ b/test/CodeGen/XCore/sqrt.ll @@ -0,0 +1,16 @@ +; RUN: llvm-as < %s | llc -march=xcore > %t1.s +; RUN: grep "bl sqrtf" %t1.s | count 1 +; RUN: grep "bl sqrt" %t1.s | count 2 +declare double @llvm.sqrt.f64(double) + +define double @test(double %F) { + %result = call double @llvm.sqrt.f64(double %F) + ret double %result +} + +declare float @llvm.sqrt.f32(float) + +define float @testf(float %F) { + %result = call float @llvm.sqrt.f32(float %F) + ret float %result +} |