From 4d5dc3e7e54a7fcea7eeb6951d88f2c72001fb7e Mon Sep 17 00:00:00 2001 From: Jim Grosbach Date: Wed, 11 Aug 2010 15:44:15 +0000 Subject: cortex m4 has floating point support, but only single precision. llvm-svn: 110810 --- llvm/test/CodeGen/Thumb2/cortex-fp.ll | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 llvm/test/CodeGen/Thumb2/cortex-fp.ll (limited to 'llvm/test/CodeGen/Thumb2/cortex-fp.ll') diff --git a/llvm/test/CodeGen/Thumb2/cortex-fp.ll b/llvm/test/CodeGen/Thumb2/cortex-fp.ll new file mode 100644 index 00000000000..ba891d081ed --- /dev/null +++ b/llvm/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 +} -- cgit v1.2.3