Avoid NEON SP-FP unless unsafe-math or Darwin
[oota-llvm.git] / test / CodeGen / ARM / fmuls.ll
1 ; RUN: llc < %s -march=arm -mattr=+vfp2 | FileCheck %s -check-prefix=VFP2
2 ; RUN: llc < %s -march=arm -mattr=+neon | FileCheck %s -check-prefix=NFP0
3 ; RUN: llc < %s -march=arm -mcpu=cortex-a8 | FileCheck %s -check-prefix=CORTEXA8
4 ; RUN: llc < %s -march=arm -mcpu=cortex-a8 --enable-unsafe-fp-math | FileCheck %s -check-prefix=CORTEXA8U
5 ; RUN: llc < %s -march=arm -mcpu=cortex-a9 | FileCheck %s -check-prefix=CORTEXA9
6
7 define float @test(float %a, float %b) {
8 entry:
9         %0 = fmul float %a, %b
10         ret float %0
11 }
12
13 ; VFP2: test:
14 ; VFP2:         vmul.f32        s
15
16 ; NFP1: test:
17 ; NFP1:         vmul.f32        d
18 ; NFP0: test:
19 ; NFP0:         vmul.f32        s
20
21 ; CORTEXA8: test:
22 ; CORTEXA8:     vmul.f32        s
23 ; CORTEXA8U: test:
24 ; CORTEXA8U:    vmul.f32        d
25 ; CORTEXA9: test:
26 ; CORTEXA9:     vmul.f32        s
27
28 ; VFP2: test2
29 define float @test2(float %a) nounwind {
30 ; CHECK-NOT: mul
31 ; CHECK: mov pc, lr
32   %ret = fmul float %a, 1.0
33   ret float %ret
34 }
35