1 ; RUN: llc -mtriple=arm-eabi -mattr=+vfp2 %s -o - | FileCheck %s -check-prefix=VFP2
2 ; RUN: llc -mtriple=arm-eabi -mattr=+neon %s -o - | FileCheck %s -check-prefix=NEON
3 ; RUN: llc -mtriple=arm-eabi -mcpu=cortex-a8 %s -o - | FileCheck %s -check-prefix=A8
4 ; RUN: llc -mtriple=arm-eabi -mcpu=cortex-a9 %s -o - | FileCheck %s -check-prefix=A9
5 ; RUN: llc -mtriple=arm-linux-gnueabi -mcpu=cortex-a9 -float-abi=hard %s -o - | FileCheck %s -check-prefix=HARD
7 define float @t1(float %acc, float %a, float %b) {
18 %0 = fmul float %a, %b
19 %1 = fadd float %acc, %0
23 define double @t2(double %acc, double %a, double %b) {
34 %0 = fmul double %a, %b
35 %1 = fadd double %acc, %0
39 define float @t3(float %acc, float %a, float %b) {
50 %0 = fmul float %a, %b
51 %1 = fadd float %0, %acc
55 ; It's possible to make use of fp vmla / vmls on Cortex-A9.
57 define void @t4(float %acc1, float %a, float %b, float %acc2, float %c, float* %P1, float* %P2) {
65 ; Two vmla with now RAW hazard
71 ; HARD: vmla.f32 s0, s1, s2
72 ; HARD: vmla.f32 s3, s1, s4
73 %0 = fmul float %a, %b
74 %1 = fadd float %acc1, %0
75 %2 = fmul float %a, %c
76 %3 = fadd float %acc2, %2
77 store float %1, float* %P1
78 store float %3, float* %P2
82 define float @t5(float %a, float %b, float %c, float %d, float %e) {
96 ; HARD: vmla.f32 s4, s0, s1
97 ; HARD: vmul.f32 s0, s2, s3
98 ; HARD: vadd.f32 s0, s4, s0
99 %0 = fmul float %a, %b
100 %1 = fadd float %e, %0
101 %2 = fmul float %c, %d
102 %3 = fadd float %1, %2