1 ; RUN: llc -mtriple=arm-eabihf -mattr=+vfp2 %s -o - \
2 ; RUN: | FileCheck %s -check-prefix=VFP2
4 ; RUN: llc -mtriple=arm-eabihf -mattr=+vfp3 %s -o - \
5 ; RUN: | FileCheck %s -check-prefix=VFP3
7 ; RUN: llc -mtriple=arm-eabihf -mattr=+neon %s -o - \
8 ; RUN: | FileCheck %s -check-prefix=NEON
10 ; RUN: llc -mtriple=arm-eabi -mcpu=cortex-a8 %s -o - \
11 ; RUN: | FileCheck %s -check-prefix=A8
13 ; RUN: llc -mtriple=arm-eabi -mcpu=cortex-a8 -regalloc=basic %s -o - \
14 ; RUN: | FileCheck %s -check-prefix=A8
16 ; RUN: llc -mtriple=arm-eabi -mcpu=cortex-a8 --enable-unsafe-fp-math %s -o - \
17 ; RUN: | FileCheck %s -check-prefix=A8U
19 ; RUN: llc -mtriple=arm-darwin -mcpu=cortex-a8 %s -o - \
20 ; RUN: | FileCheck %s -check-prefix=A8U
22 define float @t1(float %acc, float %a, float %b) nounwind {
34 ; A8U: vnmul.f32 s{{[0-9]}}, s{{[0-9]}}, s{{[0-9]}}
35 ; A8U: vsub.f32 d{{[0-9]}}, d{{[0-9]}}, d{{[0-9]}}
38 ; A8: vnmul.f32 s{{[0-9]}}, s{{[0-9]}}, s{{[0-9]}}
39 ; A8: vsub.f32 s{{[0-9]}}, s{{[0-9]}}, s{{[0-9]}}
40 %0 = fmul float %a, %b
41 %1 = fsub float -0.0, %0
42 %2 = fsub float %1, %acc
46 define float @t2(float %acc, float %a, float %b) nounwind {
58 ; A8U: vnmul.f32 s{{[01234]}}, s{{[01234]}}, s{{[01234]}}
59 ; A8U: vsub.f32 d{{[0-9]}}, d{{[0-9]}}, d{{[0-9]}}
62 ; A8: vnmul.f32 s{{[01234]}}, s{{[01234]}}, s{{[01234]}}
63 ; A8: vsub.f32 s{{[0-9]}}, s{{[0-9]}}, s{{[0-9]}}
64 %0 = fmul float %a, %b
65 %1 = fmul float -1.0, %0
66 %2 = fsub float %1, %acc
70 define double @t3(double %acc, double %a, double %b) nounwind {
88 %0 = fmul double %a, %b
89 %1 = fsub double -0.0, %0
90 %2 = fsub double %1, %acc
94 define double @t4(double %acc, double %a, double %b) nounwind {
112 %0 = fmul double %a, %b
113 %1 = fmul double -1.0, %0
114 %2 = fsub double %1, %acc
118 define double @t5(double %acc, double %a, double %b) nounwind {
137 %0 = fsub double -0.0, %acc
138 %1 = fmul double %a, %b
139 %2 = fsub double %0, %1
143 define float @t6(float %acc, float %a, float %b) nounwind {
162 %0 = fsub float -0.0, %acc
163 %1 = fmul float %a, %b
164 %2 = fsub float %0, %1