diff options
author | Jim Grosbach <grosbach@apple.com> | 2010-08-11 15:44:15 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2010-08-11 15:44:15 +0000 |
commit | fcba5e6b645df89ae6b93911fe0f80b08fa6b44c (patch) | |
tree | 1fc917344b0ac16a11ad95e1b8f6b476fb7867f8 /test/CodeGen/Thumb2 | |
parent | f63fed141ec2402a7f028498b07ca7d49113b61c (diff) | |
download | external_llvm-fcba5e6b645df89ae6b93911fe0f80b08fa6b44c.zip external_llvm-fcba5e6b645df89ae6b93911fe0f80b08fa6b44c.tar.gz external_llvm-fcba5e6b645df89ae6b93911fe0f80b08fa6b44c.tar.bz2 |
cortex m4 has floating point support, but only single precision.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110810 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/Thumb2')
-rw-r--r-- | test/CodeGen/Thumb2/cortex-fp.ll | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/CodeGen/Thumb2/cortex-fp.ll b/test/CodeGen/Thumb2/cortex-fp.ll new file mode 100644 index 0000000..ba891d0 --- /dev/null +++ b/test/CodeGen/Thumb2/cortex-fp.ll @@ -0,0 +1,24 @@ +; RUN: llc < %s -march=thumb -mcpu=cortex-m3 | FileCheck %s -check-prefix=CORTEXM3 +; RUN: llc < %s -march=thumb -mcpu=cortex-m4 | FileCheck %s -check-prefix=CORTEXM4 +; RUN: llc < %s -march=thumb -mcpu=cortex-a8 | FileCheck %s -check-prefix=CORTEXA8 + + +define float @foo(float %a, float %b) { +entry: +; CHECK: foo +; CORTEXM3: blx ___mulsf3 +; CORTEXM4: vmul.f32 s0, s1, s0 +; CORTEXA8: vmul.f32 d0, d1, d0 + %0 = fmul float %a, %b + ret float %0 +} + +define double @bar(double %a, double %b) { +entry: +; CHECK: bar + %0 = fmul double %a, %b +; CORTEXM3: blx ___muldf3 +; CORTEXM4: blx ___muldf3 +; CORTEXA8: vmul.f64 d0, d1, d0 + ret double %0 +} |