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 | 7fed65a68d961eef21d4572beab64d047ece5a3e (patch) | |
tree | e41ca76a165b977c49e637baa022b7be07321829 /test/CodeGen/XCore/pow.ll | |
parent | e93483d855af7acf831d1d8c3c77ed117f0df4d3 (diff) | |
download | external_llvm-7fed65a68d961eef21d4572beab64d047ece5a3e.zip external_llvm-7fed65a68d961eef21d4572beab64d047ece5a3e.tar.gz external_llvm-7fed65a68d961eef21d4572beab64d047ece5a3e.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/pow.ll')
-rw-r--r-- | test/CodeGen/XCore/pow.ll | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/CodeGen/XCore/pow.ll b/test/CodeGen/XCore/pow.ll new file mode 100644 index 0000000..a7b6318 --- /dev/null +++ b/test/CodeGen/XCore/pow.ll @@ -0,0 +1,16 @@ +; RUN: llvm-as < %s | llc -march=xcore > %t1.s +; RUN: grep "bl powf" %t1.s | count 1 +; RUN: grep "bl pow" %t1.s | count 2 +declare double @llvm.pow.f64(double, double) + +define double @test(double %F, double %power) { + %result = call double @llvm.pow.f64(double %F, double %power) + ret double %result +} + +declare float @llvm.pow.f32(float, float) + +define float @testf(float %F, float %power) { + %result = call float @llvm.pow.f32(float %F, float %power) + ret float %result +} |