blob: f81211811860c84b0f03cb1910662c969932a03e [file] [log] [blame]
Jim Grosbach5f215872013-02-27 21:31:12 +00001; RUN: llc < %s -mtriple=armv7-apple-darwin | FileCheck %s
Tim Northover501977e2013-08-12 12:43:26 +00002; RUN: llc < %s -mtriple=armv7s-apple-darwin | FileCheck %s -check-prefix=CHECK-VFP4
Jim Grosbach5f215872013-02-27 21:31:12 +00003
4define <4 x float> @muladd(<4 x float> %a, <4 x float> %b, <4 x float> %c) nounwind {
Stephen Lind24ab202013-07-14 06:24:09 +00005; CHECK-LABEL: muladd:
Jim Grosbach5f215872013-02-27 21:31:12 +00006; CHECK: fmaf
7; CHECK: fmaf
8; CHECK: fmaf
9; CHECK: fmaf
10; CHECK-NOT: fmaf
11
12; CHECK-VFP4: vfma.f32
13 %tmp = tail call <4 x float> @llvm.fma.v4f32(<4 x float> %b, <4 x float> %c, <4 x float> %a) #2
14 ret <4 x float> %tmp
15}
16
17declare <4 x float> @llvm.fma.v4f32(<4 x float>, <4 x float>, <4 x float>) #1
18
19define <2 x float> @muladd2(<2 x float> %a, <2 x float> %b, <2 x float> %c) nounwind {
Stephen Lind24ab202013-07-14 06:24:09 +000020; CHECK-LABEL: muladd2:
Jim Grosbach5f215872013-02-27 21:31:12 +000021; CHECK: fmaf
22; CHECK: fmaf
23; CHECK-NOT: fmaf
24
25; CHECK-VFP4: vfma.f32
26 %tmp = tail call <2 x float> @llvm.fma.v2f32(<2 x float> %b, <2 x float> %c, <2 x float> %a) #2
27 ret <2 x float> %tmp
28}
29
30declare <2 x float> @llvm.fma.v2f32(<2 x float>, <2 x float>, <2 x float>) #1
31