llvm.org GIT mirror llvm / a0908d0
Merge fma.ll into fusedMAC.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154466 91177308-0d34-0410-b5e6-96231b3b80d8 Evan Cheng 8 years ago
2 changed file(s) with 28 addition(s) and 30 deletion(s). Raw diff Collapse all Expand all
+0
-30
test/CodeGen/ARM/fma.ll less more
None ; RUN: llc < %s -mtriple=thumbv7-apple-ios -mattr=+vfp4 | FileCheck %s
1
2 define float @test_f32(float %a, float %b, float %c) nounwind readnone ssp {
3 entry:
4 ; CHECK: test_f32
5 ; CHECK: vfma.f32
6 %call = tail call float @llvm.fma.f32(float %a, float %b, float %c) nounwind readnone
7 ret float %call
8 }
9
10 define double @test_f64(double %a, double %b, double %c) nounwind readnone ssp {
11 entry:
12 ; CHECK: test_f64
13 ; CHECK: vfma.f64
14 %call = tail call double @llvm.fma.f64(double %a, double %b, double %c) nounwind readnone
15 ret double %call
16 }
17
18 define <2 x float> @test_v2f32(<2 x float> %a, <2 x float> %b, <2 x float> %c) nounwind readnone ssp {
19 entry:
20 ; CHECK: test_v2f32
21 ; CHECK: vfma.f32
22 %0 = tail call <2 x float> @llvm.fma.v2f32(<2 x float> %a, <2 x float> %b, <2 x float> %c) nounwind
23 ret <2 x float> %0
24 }
25
26 declare float @llvm.fma.f32(float, float, float) nounwind readnone
27 declare double @llvm.fma.f64(double, double, double) nounwind readnone
28
29 declare <2 x float> @llvm.fma.v2f32(<2 x float>, <2 x float>, <2 x float>) nounwind readnone
9797 %sub = fsub <4 x float> %a, %mul
9898 ret <4 x float> %sub
9999 }
100
101 define float @test_f32(float %a, float %b, float %c) nounwind readnone ssp {
102 entry:
103 ; CHECK: test_f32
104 ; CHECK: vfma.f32
105 %call = tail call float @llvm.fma.f32(float %a, float %b, float %c) nounwind readnone
106 ret float %call
107 }
108
109 define double @test_f64(double %a, double %b, double %c) nounwind readnone ssp {
110 entry:
111 ; CHECK: test_f64
112 ; CHECK: vfma.f64
113 %call = tail call double @llvm.fma.f64(double %a, double %b, double %c) nounwind readnone
114 ret double %call
115 }
116
117 define <2 x float> @test_v2f32(<2 x float> %a, <2 x float> %b, <2 x float> %c) nounwind readnone ssp {
118 entry:
119 ; CHECK: test_v2f32
120 ; CHECK: vfma.f32
121 %0 = tail call <2 x float> @llvm.fma.v2f32(<2 x float> %a, <2 x float> %b, <2 x float> %c) nounwind
122 ret <2 x float> %0
123 }
124
125 declare float @llvm.fma.f32(float, float, float) nounwind readnone
126 declare double @llvm.fma.f64(double, double, double) nounwind readnone
127 declare <2 x float> @llvm.fma.v2f32(<2 x float>, <2 x float>, <2 x float>) nounwind readnone