1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -mtriple=x86_64-unknown -passes=slp-vectorizer -S | FileCheck %s --check-prefix=NO-FMA
3 ; RUN: opt < %s -mtriple=x86_64-unknown -mcpu=corei7-avx -passes=slp-vectorizer -S | FileCheck %s --check-prefix=NO-FMA
4 ; RUN: opt < %s -mtriple=x86_64-unknown -mcpu=bdver1 -passes=slp-vectorizer -S | FileCheck %s --check-prefix=FMA --check-prefix=FMA256
5 ; RUN: opt < %s -mtriple=x86_64-unknown -mcpu=core-avx2 -passes=slp-vectorizer -S | FileCheck %s --check-prefix=FMA --check-prefix=FMA256
6 ; RUN: opt < %s -mtriple=x86_64-unknown -mcpu=skylake-avx512 -mattr=-prefer-256-bit -passes=slp-vectorizer -S | FileCheck %s --check-prefix=FMA --check-prefix=FMA512
7 ; RUN: opt < %s -mtriple=x86_64-unknown -mcpu=skylake-avx512 -mattr=+prefer-256-bit -passes=slp-vectorizer -S | FileCheck %s --check-prefix=FMA --check-prefix=FMA256
9 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
11 @srcA64 = common global [8 x double] zeroinitializer, align 64
12 @srcB64 = common global [8 x double] zeroinitializer, align 64
13 @srcC64 = common global [8 x double] zeroinitializer, align 64
14 @srcA32 = common global [16 x float] zeroinitializer, align 64
15 @srcB32 = common global [16 x float] zeroinitializer, align 64
16 @srcC32 = common global [16 x float] zeroinitializer, align 64
17 @dst64 = common global [8 x double] zeroinitializer, align 64
18 @dst32 = common global [16 x float] zeroinitializer, align 64
20 declare float @llvm.fma.f32(float, float, float)
21 declare double @llvm.fma.f64(double, double, double)
27 define void @fma_2f64() #0 {
28 ; NO-FMA-LABEL: @fma_2f64(
29 ; NO-FMA-NEXT: [[A0:%.*]] = load double, ptr @srcA64, align 8
30 ; NO-FMA-NEXT: [[A1:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 1), align 8
31 ; NO-FMA-NEXT: [[B0:%.*]] = load double, ptr @srcB64, align 8
32 ; NO-FMA-NEXT: [[B1:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 1), align 8
33 ; NO-FMA-NEXT: [[C0:%.*]] = load double, ptr @srcC64, align 8
34 ; NO-FMA-NEXT: [[C1:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @srcC64, i32 0, i64 1), align 8
35 ; NO-FMA-NEXT: [[FMA0:%.*]] = call double @llvm.fma.f64(double [[A0]], double [[B0]], double [[C0]])
36 ; NO-FMA-NEXT: [[FMA1:%.*]] = call double @llvm.fma.f64(double [[A1]], double [[B1]], double [[C1]])
37 ; NO-FMA-NEXT: store double [[FMA0]], ptr @dst64, align 8
38 ; NO-FMA-NEXT: store double [[FMA1]], ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 1), align 8
39 ; NO-FMA-NEXT: ret void
41 ; FMA-LABEL: @fma_2f64(
42 ; FMA-NEXT: [[TMP1:%.*]] = load <2 x double>, ptr @srcA64, align 8
43 ; FMA-NEXT: [[TMP2:%.*]] = load <2 x double>, ptr @srcB64, align 8
44 ; FMA-NEXT: [[TMP3:%.*]] = load <2 x double>, ptr @srcC64, align 8
45 ; FMA-NEXT: [[TMP4:%.*]] = call <2 x double> @llvm.fma.v2f64(<2 x double> [[TMP1]], <2 x double> [[TMP2]], <2 x double> [[TMP3]])
46 ; FMA-NEXT: store <2 x double> [[TMP4]], ptr @dst64, align 8
49 %a0 = load double, ptr @srcA64, align 8
50 %a1 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 1), align 8
51 %b0 = load double, ptr @srcB64, align 8
52 %b1 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 1), align 8
53 %c0 = load double, ptr @srcC64, align 8
54 %c1 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcC64, i32 0, i64 1), align 8
55 %fma0 = call double @llvm.fma.f64(double %a0, double %b0, double %c0)
56 %fma1 = call double @llvm.fma.f64(double %a1, double %b1, double %c1)
57 store double %fma0, ptr @dst64, align 8
58 store double %fma1, ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 1), align 8
62 define void @fma_4f64() #0 {
63 ; NO-FMA-LABEL: @fma_4f64(
64 ; NO-FMA-NEXT: [[A0:%.*]] = load double, ptr @srcA64, align 8
65 ; NO-FMA-NEXT: [[A1:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 1), align 8
66 ; NO-FMA-NEXT: [[A2:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 2), align 8
67 ; NO-FMA-NEXT: [[A3:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 3), align 8
68 ; NO-FMA-NEXT: [[B0:%.*]] = load double, ptr @srcB64, align 8
69 ; NO-FMA-NEXT: [[B1:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 1), align 8
70 ; NO-FMA-NEXT: [[B2:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 2), align 8
71 ; NO-FMA-NEXT: [[B3:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 3), align 8
72 ; NO-FMA-NEXT: [[C0:%.*]] = load double, ptr @srcC64, align 8
73 ; NO-FMA-NEXT: [[C1:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @srcC64, i32 0, i64 1), align 8
74 ; NO-FMA-NEXT: [[C2:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @srcC64, i32 0, i64 2), align 8
75 ; NO-FMA-NEXT: [[C3:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @srcC64, i32 0, i64 3), align 8
76 ; NO-FMA-NEXT: [[FMA0:%.*]] = call double @llvm.fma.f64(double [[A0]], double [[B0]], double [[C0]])
77 ; NO-FMA-NEXT: [[FMA1:%.*]] = call double @llvm.fma.f64(double [[A1]], double [[B1]], double [[C1]])
78 ; NO-FMA-NEXT: [[FMA2:%.*]] = call double @llvm.fma.f64(double [[A2]], double [[B2]], double [[C2]])
79 ; NO-FMA-NEXT: [[FMA3:%.*]] = call double @llvm.fma.f64(double [[A3]], double [[B3]], double [[C3]])
80 ; NO-FMA-NEXT: store double [[FMA0]], ptr @dst64, align 8
81 ; NO-FMA-NEXT: store double [[FMA1]], ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 1), align 8
82 ; NO-FMA-NEXT: store double [[FMA2]], ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 2), align 8
83 ; NO-FMA-NEXT: store double [[FMA3]], ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 3), align 8
84 ; NO-FMA-NEXT: ret void
86 ; FMA-LABEL: @fma_4f64(
87 ; FMA-NEXT: [[TMP1:%.*]] = load <4 x double>, ptr @srcA64, align 8
88 ; FMA-NEXT: [[TMP2:%.*]] = load <4 x double>, ptr @srcB64, align 8
89 ; FMA-NEXT: [[TMP3:%.*]] = load <4 x double>, ptr @srcC64, align 8
90 ; FMA-NEXT: [[TMP4:%.*]] = call <4 x double> @llvm.fma.v4f64(<4 x double> [[TMP1]], <4 x double> [[TMP2]], <4 x double> [[TMP3]])
91 ; FMA-NEXT: store <4 x double> [[TMP4]], ptr @dst64, align 8
94 %a0 = load double, ptr @srcA64, align 8
95 %a1 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 1), align 8
96 %a2 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 2), align 8
97 %a3 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 3), align 8
98 %b0 = load double, ptr @srcB64, align 8
99 %b1 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 1), align 8
100 %b2 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 2), align 8
101 %b3 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 3), align 8
102 %c0 = load double, ptr @srcC64, align 8
103 %c1 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcC64, i32 0, i64 1), align 8
104 %c2 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcC64, i32 0, i64 2), align 8
105 %c3 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcC64, i32 0, i64 3), align 8
106 %fma0 = call double @llvm.fma.f64(double %a0, double %b0, double %c0)
107 %fma1 = call double @llvm.fma.f64(double %a1, double %b1, double %c1)
108 %fma2 = call double @llvm.fma.f64(double %a2, double %b2, double %c2)
109 %fma3 = call double @llvm.fma.f64(double %a3, double %b3, double %c3)
110 store double %fma0, ptr @dst64, align 8
111 store double %fma1, ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 1), align 8
112 store double %fma2, ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 2), align 8
113 store double %fma3, ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 3), align 8
117 define void @fma_8f64() #0 {
118 ; NO-FMA-LABEL: @fma_8f64(
119 ; NO-FMA-NEXT: [[A0:%.*]] = load double, ptr @srcA64, align 4
120 ; NO-FMA-NEXT: [[A1:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 1), align 4
121 ; NO-FMA-NEXT: [[A2:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 2), align 4
122 ; NO-FMA-NEXT: [[A3:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 3), align 4
123 ; NO-FMA-NEXT: [[A4:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 4), align 4
124 ; NO-FMA-NEXT: [[A5:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 5), align 4
125 ; NO-FMA-NEXT: [[A6:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 6), align 4
126 ; NO-FMA-NEXT: [[A7:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 7), align 4
127 ; NO-FMA-NEXT: [[B0:%.*]] = load double, ptr @srcB64, align 4
128 ; NO-FMA-NEXT: [[B1:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 1), align 4
129 ; NO-FMA-NEXT: [[B2:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 2), align 4
130 ; NO-FMA-NEXT: [[B3:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 3), align 4
131 ; NO-FMA-NEXT: [[B4:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 4), align 4
132 ; NO-FMA-NEXT: [[B5:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 5), align 4
133 ; NO-FMA-NEXT: [[B6:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 6), align 4
134 ; NO-FMA-NEXT: [[B7:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 7), align 4
135 ; NO-FMA-NEXT: [[C0:%.*]] = load double, ptr @srcC64, align 4
136 ; NO-FMA-NEXT: [[C1:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @srcC64, i32 0, i64 1), align 4
137 ; NO-FMA-NEXT: [[C2:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @srcC64, i32 0, i64 2), align 4
138 ; NO-FMA-NEXT: [[C3:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @srcC64, i32 0, i64 3), align 4
139 ; NO-FMA-NEXT: [[C4:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @srcC64, i32 0, i64 4), align 4
140 ; NO-FMA-NEXT: [[C5:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @srcC64, i32 0, i64 5), align 4
141 ; NO-FMA-NEXT: [[C6:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @srcC64, i32 0, i64 6), align 4
142 ; NO-FMA-NEXT: [[C7:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @srcC64, i32 0, i64 7), align 4
143 ; NO-FMA-NEXT: [[FMA0:%.*]] = call double @llvm.fma.f64(double [[A0]], double [[B0]], double [[C0]])
144 ; NO-FMA-NEXT: [[FMA1:%.*]] = call double @llvm.fma.f64(double [[A1]], double [[B1]], double [[C1]])
145 ; NO-FMA-NEXT: [[FMA2:%.*]] = call double @llvm.fma.f64(double [[A2]], double [[B2]], double [[C2]])
146 ; NO-FMA-NEXT: [[FMA3:%.*]] = call double @llvm.fma.f64(double [[A3]], double [[B3]], double [[C3]])
147 ; NO-FMA-NEXT: [[FMA4:%.*]] = call double @llvm.fma.f64(double [[A4]], double [[B4]], double [[C4]])
148 ; NO-FMA-NEXT: [[FMA5:%.*]] = call double @llvm.fma.f64(double [[A5]], double [[B5]], double [[C5]])
149 ; NO-FMA-NEXT: [[FMA6:%.*]] = call double @llvm.fma.f64(double [[A6]], double [[B6]], double [[C6]])
150 ; NO-FMA-NEXT: [[FMA7:%.*]] = call double @llvm.fma.f64(double [[A7]], double [[B7]], double [[C7]])
151 ; NO-FMA-NEXT: store double [[FMA0]], ptr @dst64, align 4
152 ; NO-FMA-NEXT: store double [[FMA1]], ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 1), align 4
153 ; NO-FMA-NEXT: store double [[FMA2]], ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 2), align 4
154 ; NO-FMA-NEXT: store double [[FMA3]], ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 3), align 4
155 ; NO-FMA-NEXT: store double [[FMA4]], ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 4), align 4
156 ; NO-FMA-NEXT: store double [[FMA5]], ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 5), align 4
157 ; NO-FMA-NEXT: store double [[FMA6]], ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 6), align 4
158 ; NO-FMA-NEXT: store double [[FMA7]], ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 7), align 4
159 ; NO-FMA-NEXT: ret void
161 ; FMA256-LABEL: @fma_8f64(
162 ; FMA256-NEXT: [[TMP1:%.*]] = load <4 x double>, ptr @srcA64, align 4
163 ; FMA256-NEXT: [[TMP2:%.*]] = load <4 x double>, ptr @srcB64, align 4
164 ; FMA256-NEXT: [[TMP3:%.*]] = load <4 x double>, ptr @srcC64, align 4
165 ; FMA256-NEXT: [[TMP4:%.*]] = call <4 x double> @llvm.fma.v4f64(<4 x double> [[TMP1]], <4 x double> [[TMP2]], <4 x double> [[TMP3]])
166 ; FMA256-NEXT: store <4 x double> [[TMP4]], ptr @dst64, align 4
167 ; FMA256-NEXT: [[TMP5:%.*]] = load <4 x double>, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 4), align 4
168 ; FMA256-NEXT: [[TMP6:%.*]] = load <4 x double>, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 4), align 4
169 ; FMA256-NEXT: [[TMP7:%.*]] = load <4 x double>, ptr getelementptr inbounds ([8 x double], ptr @srcC64, i32 0, i64 4), align 4
170 ; FMA256-NEXT: [[TMP8:%.*]] = call <4 x double> @llvm.fma.v4f64(<4 x double> [[TMP5]], <4 x double> [[TMP6]], <4 x double> [[TMP7]])
171 ; FMA256-NEXT: store <4 x double> [[TMP8]], ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 4), align 4
172 ; FMA256-NEXT: ret void
174 ; FMA512-LABEL: @fma_8f64(
175 ; FMA512-NEXT: [[TMP1:%.*]] = load <8 x double>, ptr @srcA64, align 4
176 ; FMA512-NEXT: [[TMP2:%.*]] = load <8 x double>, ptr @srcB64, align 4
177 ; FMA512-NEXT: [[TMP3:%.*]] = load <8 x double>, ptr @srcC64, align 4
178 ; FMA512-NEXT: [[TMP4:%.*]] = call <8 x double> @llvm.fma.v8f64(<8 x double> [[TMP1]], <8 x double> [[TMP2]], <8 x double> [[TMP3]])
179 ; FMA512-NEXT: store <8 x double> [[TMP4]], ptr @dst64, align 4
180 ; FMA512-NEXT: ret void
182 %a0 = load double, ptr @srcA64, align 4
183 %a1 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 1), align 4
184 %a2 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 2), align 4
185 %a3 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 3), align 4
186 %a4 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 4), align 4
187 %a5 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 5), align 4
188 %a6 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 6), align 4
189 %a7 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 7), align 4
190 %b0 = load double, ptr @srcB64, align 4
191 %b1 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 1), align 4
192 %b2 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 2), align 4
193 %b3 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 3), align 4
194 %b4 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 4), align 4
195 %b5 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 5), align 4
196 %b6 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 6), align 4
197 %b7 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 7), align 4
198 %c0 = load double, ptr @srcC64, align 4
199 %c1 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcC64, i32 0, i64 1), align 4
200 %c2 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcC64, i32 0, i64 2), align 4
201 %c3 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcC64, i32 0, i64 3), align 4
202 %c4 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcC64, i32 0, i64 4), align 4
203 %c5 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcC64, i32 0, i64 5), align 4
204 %c6 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcC64, i32 0, i64 6), align 4
205 %c7 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcC64, i32 0, i64 7), align 4
206 %fma0 = call double @llvm.fma.f64(double %a0, double %b0, double %c0)
207 %fma1 = call double @llvm.fma.f64(double %a1, double %b1, double %c1)
208 %fma2 = call double @llvm.fma.f64(double %a2, double %b2, double %c2)
209 %fma3 = call double @llvm.fma.f64(double %a3, double %b3, double %c3)
210 %fma4 = call double @llvm.fma.f64(double %a4, double %b4, double %c4)
211 %fma5 = call double @llvm.fma.f64(double %a5, double %b5, double %c5)
212 %fma6 = call double @llvm.fma.f64(double %a6, double %b6, double %c6)
213 %fma7 = call double @llvm.fma.f64(double %a7, double %b7, double %c7)
214 store double %fma0, ptr @dst64, align 4
215 store double %fma1, ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 1), align 4
216 store double %fma2, ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 2), align 4
217 store double %fma3, ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 3), align 4
218 store double %fma4, ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 4), align 4
219 store double %fma5, ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 5), align 4
220 store double %fma6, ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 6), align 4
221 store double %fma7, ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 7), align 4
225 define void @fma_4f32() #0 {
226 ; NO-FMA-LABEL: @fma_4f32(
227 ; NO-FMA-NEXT: [[A0:%.*]] = load float, ptr @srcA32, align 4
228 ; NO-FMA-NEXT: [[A1:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 1), align 4
229 ; NO-FMA-NEXT: [[A2:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 2), align 4
230 ; NO-FMA-NEXT: [[A3:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 3), align 4
231 ; NO-FMA-NEXT: [[B0:%.*]] = load float, ptr @srcB32, align 4
232 ; NO-FMA-NEXT: [[B1:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 1), align 4
233 ; NO-FMA-NEXT: [[B2:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 2), align 4
234 ; NO-FMA-NEXT: [[B3:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 3), align 4
235 ; NO-FMA-NEXT: [[C0:%.*]] = load float, ptr @srcC32, align 4
236 ; NO-FMA-NEXT: [[C1:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 1), align 4
237 ; NO-FMA-NEXT: [[C2:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 2), align 4
238 ; NO-FMA-NEXT: [[C3:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 3), align 4
239 ; NO-FMA-NEXT: [[FMA0:%.*]] = call float @llvm.fma.f32(float [[A0]], float [[B0]], float [[C0]])
240 ; NO-FMA-NEXT: [[FMA1:%.*]] = call float @llvm.fma.f32(float [[A1]], float [[B1]], float [[C1]])
241 ; NO-FMA-NEXT: [[FMA2:%.*]] = call float @llvm.fma.f32(float [[A2]], float [[B2]], float [[C2]])
242 ; NO-FMA-NEXT: [[FMA3:%.*]] = call float @llvm.fma.f32(float [[A3]], float [[B3]], float [[C3]])
243 ; NO-FMA-NEXT: store float [[FMA0]], ptr @dst32, align 4
244 ; NO-FMA-NEXT: store float [[FMA1]], ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 1), align 4
245 ; NO-FMA-NEXT: store float [[FMA2]], ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 2), align 4
246 ; NO-FMA-NEXT: store float [[FMA3]], ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 3), align 4
247 ; NO-FMA-NEXT: ret void
249 ; FMA-LABEL: @fma_4f32(
250 ; FMA-NEXT: [[TMP1:%.*]] = load <4 x float>, ptr @srcA32, align 4
251 ; FMA-NEXT: [[TMP2:%.*]] = load <4 x float>, ptr @srcB32, align 4
252 ; FMA-NEXT: [[TMP3:%.*]] = load <4 x float>, ptr @srcC32, align 4
253 ; FMA-NEXT: [[TMP4:%.*]] = call <4 x float> @llvm.fma.v4f32(<4 x float> [[TMP1]], <4 x float> [[TMP2]], <4 x float> [[TMP3]])
254 ; FMA-NEXT: store <4 x float> [[TMP4]], ptr @dst32, align 4
257 %a0 = load float, ptr @srcA32, align 4
258 %a1 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 1), align 4
259 %a2 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 2), align 4
260 %a3 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 3), align 4
261 %b0 = load float, ptr @srcB32, align 4
262 %b1 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 1), align 4
263 %b2 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 2), align 4
264 %b3 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 3), align 4
265 %c0 = load float, ptr @srcC32, align 4
266 %c1 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 1), align 4
267 %c2 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 2), align 4
268 %c3 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 3), align 4
269 %fma0 = call float @llvm.fma.f32(float %a0, float %b0, float %c0)
270 %fma1 = call float @llvm.fma.f32(float %a1, float %b1, float %c1)
271 %fma2 = call float @llvm.fma.f32(float %a2, float %b2, float %c2)
272 %fma3 = call float @llvm.fma.f32(float %a3, float %b3, float %c3)
273 store float %fma0, ptr @dst32, align 4
274 store float %fma1, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 1), align 4
275 store float %fma2, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 2), align 4
276 store float %fma3, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 3), align 4
280 define void @fma_8f32() #0 {
281 ; NO-FMA-LABEL: @fma_8f32(
282 ; NO-FMA-NEXT: [[A0:%.*]] = load float, ptr @srcA32, align 4
283 ; NO-FMA-NEXT: [[A1:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 1), align 4
284 ; NO-FMA-NEXT: [[A2:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 2), align 4
285 ; NO-FMA-NEXT: [[A3:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 3), align 4
286 ; NO-FMA-NEXT: [[A4:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 4), align 4
287 ; NO-FMA-NEXT: [[A5:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 5), align 4
288 ; NO-FMA-NEXT: [[A6:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 6), align 4
289 ; NO-FMA-NEXT: [[A7:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 7), align 4
290 ; NO-FMA-NEXT: [[B0:%.*]] = load float, ptr @srcB32, align 4
291 ; NO-FMA-NEXT: [[B1:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 1), align 4
292 ; NO-FMA-NEXT: [[B2:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 2), align 4
293 ; NO-FMA-NEXT: [[B3:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 3), align 4
294 ; NO-FMA-NEXT: [[B4:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 4), align 4
295 ; NO-FMA-NEXT: [[B5:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 5), align 4
296 ; NO-FMA-NEXT: [[B6:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 6), align 4
297 ; NO-FMA-NEXT: [[B7:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 7), align 4
298 ; NO-FMA-NEXT: [[C0:%.*]] = load float, ptr @srcC32, align 4
299 ; NO-FMA-NEXT: [[C1:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 1), align 4
300 ; NO-FMA-NEXT: [[C2:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 2), align 4
301 ; NO-FMA-NEXT: [[C3:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 3), align 4
302 ; NO-FMA-NEXT: [[C4:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 4), align 4
303 ; NO-FMA-NEXT: [[C5:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 5), align 4
304 ; NO-FMA-NEXT: [[C6:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 6), align 4
305 ; NO-FMA-NEXT: [[C7:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 7), align 4
306 ; NO-FMA-NEXT: [[FMA0:%.*]] = call float @llvm.fma.f32(float [[A0]], float [[B0]], float [[C0]])
307 ; NO-FMA-NEXT: [[FMA1:%.*]] = call float @llvm.fma.f32(float [[A1]], float [[B1]], float [[C1]])
308 ; NO-FMA-NEXT: [[FMA2:%.*]] = call float @llvm.fma.f32(float [[A2]], float [[B2]], float [[C2]])
309 ; NO-FMA-NEXT: [[FMA3:%.*]] = call float @llvm.fma.f32(float [[A3]], float [[B3]], float [[C3]])
310 ; NO-FMA-NEXT: [[FMA4:%.*]] = call float @llvm.fma.f32(float [[A4]], float [[B4]], float [[C4]])
311 ; NO-FMA-NEXT: [[FMA5:%.*]] = call float @llvm.fma.f32(float [[A5]], float [[B5]], float [[C5]])
312 ; NO-FMA-NEXT: [[FMA6:%.*]] = call float @llvm.fma.f32(float [[A6]], float [[B6]], float [[C6]])
313 ; NO-FMA-NEXT: [[FMA7:%.*]] = call float @llvm.fma.f32(float [[A7]], float [[B7]], float [[C7]])
314 ; NO-FMA-NEXT: store float [[FMA0]], ptr @dst32, align 4
315 ; NO-FMA-NEXT: store float [[FMA1]], ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 1), align 4
316 ; NO-FMA-NEXT: store float [[FMA2]], ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 2), align 4
317 ; NO-FMA-NEXT: store float [[FMA3]], ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 3), align 4
318 ; NO-FMA-NEXT: store float [[FMA4]], ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 4), align 4
319 ; NO-FMA-NEXT: store float [[FMA5]], ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 5), align 4
320 ; NO-FMA-NEXT: store float [[FMA6]], ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 6), align 4
321 ; NO-FMA-NEXT: store float [[FMA7]], ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 7), align 4
322 ; NO-FMA-NEXT: ret void
324 ; FMA-LABEL: @fma_8f32(
325 ; FMA-NEXT: [[TMP1:%.*]] = load <8 x float>, ptr @srcA32, align 4
326 ; FMA-NEXT: [[TMP2:%.*]] = load <8 x float>, ptr @srcB32, align 4
327 ; FMA-NEXT: [[TMP3:%.*]] = load <8 x float>, ptr @srcC32, align 4
328 ; FMA-NEXT: [[TMP4:%.*]] = call <8 x float> @llvm.fma.v8f32(<8 x float> [[TMP1]], <8 x float> [[TMP2]], <8 x float> [[TMP3]])
329 ; FMA-NEXT: store <8 x float> [[TMP4]], ptr @dst32, align 4
332 %a0 = load float, ptr @srcA32, align 4
333 %a1 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 1), align 4
334 %a2 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 2), align 4
335 %a3 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 3), align 4
336 %a4 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 4), align 4
337 %a5 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 5), align 4
338 %a6 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 6), align 4
339 %a7 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 7), align 4
340 %b0 = load float, ptr @srcB32, align 4
341 %b1 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 1), align 4
342 %b2 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 2), align 4
343 %b3 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 3), align 4
344 %b4 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 4), align 4
345 %b5 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 5), align 4
346 %b6 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 6), align 4
347 %b7 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 7), align 4
348 %c0 = load float, ptr @srcC32, align 4
349 %c1 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 1), align 4
350 %c2 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 2), align 4
351 %c3 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 3), align 4
352 %c4 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 4), align 4
353 %c5 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 5), align 4
354 %c6 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 6), align 4
355 %c7 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 7), align 4
356 %fma0 = call float @llvm.fma.f32(float %a0, float %b0, float %c0)
357 %fma1 = call float @llvm.fma.f32(float %a1, float %b1, float %c1)
358 %fma2 = call float @llvm.fma.f32(float %a2, float %b2, float %c2)
359 %fma3 = call float @llvm.fma.f32(float %a3, float %b3, float %c3)
360 %fma4 = call float @llvm.fma.f32(float %a4, float %b4, float %c4)
361 %fma5 = call float @llvm.fma.f32(float %a5, float %b5, float %c5)
362 %fma6 = call float @llvm.fma.f32(float %a6, float %b6, float %c6)
363 %fma7 = call float @llvm.fma.f32(float %a7, float %b7, float %c7)
364 store float %fma0, ptr @dst32, align 4
365 store float %fma1, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 1), align 4
366 store float %fma2, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 2), align 4
367 store float %fma3, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 3), align 4
368 store float %fma4, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 4), align 4
369 store float %fma5, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 5), align 4
370 store float %fma6, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 6), align 4
371 store float %fma7, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 7), align 4
375 define void @fma_16f32() #0 {
376 ; NO-FMA-LABEL: @fma_16f32(
377 ; NO-FMA-NEXT: [[A0:%.*]] = load float, ptr @srcA32, align 4
378 ; NO-FMA-NEXT: [[A1:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 1), align 4
379 ; NO-FMA-NEXT: [[A2:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 2), align 4
380 ; NO-FMA-NEXT: [[A3:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 3), align 4
381 ; NO-FMA-NEXT: [[A4:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 4), align 4
382 ; NO-FMA-NEXT: [[A5:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 5), align 4
383 ; NO-FMA-NEXT: [[A6:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 6), align 4
384 ; NO-FMA-NEXT: [[A7:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 7), align 4
385 ; NO-FMA-NEXT: [[A8:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 8), align 4
386 ; NO-FMA-NEXT: [[A9:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 9), align 4
387 ; NO-FMA-NEXT: [[A10:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 10), align 4
388 ; NO-FMA-NEXT: [[A11:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 11), align 4
389 ; NO-FMA-NEXT: [[A12:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 12), align 4
390 ; NO-FMA-NEXT: [[A13:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 13), align 4
391 ; NO-FMA-NEXT: [[A14:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 14), align 4
392 ; NO-FMA-NEXT: [[A15:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 15), align 4
393 ; NO-FMA-NEXT: [[B0:%.*]] = load float, ptr @srcB32, align 4
394 ; NO-FMA-NEXT: [[B1:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 1), align 4
395 ; NO-FMA-NEXT: [[B2:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 2), align 4
396 ; NO-FMA-NEXT: [[B3:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 3), align 4
397 ; NO-FMA-NEXT: [[B4:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 4), align 4
398 ; NO-FMA-NEXT: [[B5:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 5), align 4
399 ; NO-FMA-NEXT: [[B6:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 6), align 4
400 ; NO-FMA-NEXT: [[B7:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 7), align 4
401 ; NO-FMA-NEXT: [[B8:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 8), align 4
402 ; NO-FMA-NEXT: [[B9:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 9), align 4
403 ; NO-FMA-NEXT: [[B10:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 10), align 4
404 ; NO-FMA-NEXT: [[B11:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 11), align 4
405 ; NO-FMA-NEXT: [[B12:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 12), align 4
406 ; NO-FMA-NEXT: [[B13:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 13), align 4
407 ; NO-FMA-NEXT: [[B14:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 14), align 4
408 ; NO-FMA-NEXT: [[B15:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 15), align 4
409 ; NO-FMA-NEXT: [[C0:%.*]] = load float, ptr @srcC32, align 4
410 ; NO-FMA-NEXT: [[C1:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 1), align 4
411 ; NO-FMA-NEXT: [[C2:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 2), align 4
412 ; NO-FMA-NEXT: [[C3:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 3), align 4
413 ; NO-FMA-NEXT: [[C4:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 4), align 4
414 ; NO-FMA-NEXT: [[C5:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 5), align 4
415 ; NO-FMA-NEXT: [[C6:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 6), align 4
416 ; NO-FMA-NEXT: [[C7:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 7), align 4
417 ; NO-FMA-NEXT: [[C8:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 8), align 4
418 ; NO-FMA-NEXT: [[C9:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 9), align 4
419 ; NO-FMA-NEXT: [[C10:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 10), align 4
420 ; NO-FMA-NEXT: [[C11:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 11), align 4
421 ; NO-FMA-NEXT: [[C12:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 12), align 4
422 ; NO-FMA-NEXT: [[C13:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 13), align 4
423 ; NO-FMA-NEXT: [[C14:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 14), align 4
424 ; NO-FMA-NEXT: [[C15:%.*]] = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 15), align 4
425 ; NO-FMA-NEXT: [[FMA0:%.*]] = call float @llvm.fma.f32(float [[A0]], float [[B0]], float [[C0]])
426 ; NO-FMA-NEXT: [[FMA1:%.*]] = call float @llvm.fma.f32(float [[A1]], float [[B1]], float [[C1]])
427 ; NO-FMA-NEXT: [[FMA2:%.*]] = call float @llvm.fma.f32(float [[A2]], float [[B2]], float [[C2]])
428 ; NO-FMA-NEXT: [[FMA3:%.*]] = call float @llvm.fma.f32(float [[A3]], float [[B3]], float [[C3]])
429 ; NO-FMA-NEXT: [[FMA4:%.*]] = call float @llvm.fma.f32(float [[A4]], float [[B4]], float [[C4]])
430 ; NO-FMA-NEXT: [[FMA5:%.*]] = call float @llvm.fma.f32(float [[A5]], float [[B5]], float [[C5]])
431 ; NO-FMA-NEXT: [[FMA6:%.*]] = call float @llvm.fma.f32(float [[A6]], float [[B6]], float [[C6]])
432 ; NO-FMA-NEXT: [[FMA7:%.*]] = call float @llvm.fma.f32(float [[A7]], float [[B7]], float [[C7]])
433 ; NO-FMA-NEXT: [[FMA8:%.*]] = call float @llvm.fma.f32(float [[A8]], float [[B8]], float [[C8]])
434 ; NO-FMA-NEXT: [[FMA9:%.*]] = call float @llvm.fma.f32(float [[A9]], float [[B9]], float [[C9]])
435 ; NO-FMA-NEXT: [[FMA10:%.*]] = call float @llvm.fma.f32(float [[A10]], float [[B10]], float [[C10]])
436 ; NO-FMA-NEXT: [[FMA11:%.*]] = call float @llvm.fma.f32(float [[A11]], float [[B11]], float [[C11]])
437 ; NO-FMA-NEXT: [[FMA12:%.*]] = call float @llvm.fma.f32(float [[A12]], float [[B12]], float [[C12]])
438 ; NO-FMA-NEXT: [[FMA13:%.*]] = call float @llvm.fma.f32(float [[A13]], float [[B13]], float [[C13]])
439 ; NO-FMA-NEXT: [[FMA14:%.*]] = call float @llvm.fma.f32(float [[A14]], float [[B14]], float [[C14]])
440 ; NO-FMA-NEXT: [[FMA15:%.*]] = call float @llvm.fma.f32(float [[A15]], float [[B15]], float [[C15]])
441 ; NO-FMA-NEXT: store float [[FMA0]], ptr @dst32, align 4
442 ; NO-FMA-NEXT: store float [[FMA1]], ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 1), align 4
443 ; NO-FMA-NEXT: store float [[FMA2]], ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 2), align 4
444 ; NO-FMA-NEXT: store float [[FMA3]], ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 3), align 4
445 ; NO-FMA-NEXT: store float [[FMA4]], ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 4), align 4
446 ; NO-FMA-NEXT: store float [[FMA5]], ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 5), align 4
447 ; NO-FMA-NEXT: store float [[FMA6]], ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 6), align 4
448 ; NO-FMA-NEXT: store float [[FMA7]], ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 7), align 4
449 ; NO-FMA-NEXT: store float [[FMA8]], ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 8), align 4
450 ; NO-FMA-NEXT: store float [[FMA9]], ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 9), align 4
451 ; NO-FMA-NEXT: store float [[FMA10]], ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 10), align 4
452 ; NO-FMA-NEXT: store float [[FMA11]], ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 11), align 4
453 ; NO-FMA-NEXT: store float [[FMA12]], ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 12), align 4
454 ; NO-FMA-NEXT: store float [[FMA13]], ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 13), align 4
455 ; NO-FMA-NEXT: store float [[FMA14]], ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 14), align 4
456 ; NO-FMA-NEXT: store float [[FMA15]], ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 15), align 4
457 ; NO-FMA-NEXT: ret void
459 ; FMA256-LABEL: @fma_16f32(
460 ; FMA256-NEXT: [[TMP1:%.*]] = load <8 x float>, ptr @srcA32, align 4
461 ; FMA256-NEXT: [[TMP2:%.*]] = load <8 x float>, ptr @srcB32, align 4
462 ; FMA256-NEXT: [[TMP3:%.*]] = load <8 x float>, ptr @srcC32, align 4
463 ; FMA256-NEXT: [[TMP4:%.*]] = call <8 x float> @llvm.fma.v8f32(<8 x float> [[TMP1]], <8 x float> [[TMP2]], <8 x float> [[TMP3]])
464 ; FMA256-NEXT: store <8 x float> [[TMP4]], ptr @dst32, align 4
465 ; FMA256-NEXT: [[TMP5:%.*]] = load <8 x float>, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 8), align 4
466 ; FMA256-NEXT: [[TMP6:%.*]] = load <8 x float>, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 8), align 4
467 ; FMA256-NEXT: [[TMP7:%.*]] = load <8 x float>, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 8), align 4
468 ; FMA256-NEXT: [[TMP8:%.*]] = call <8 x float> @llvm.fma.v8f32(<8 x float> [[TMP5]], <8 x float> [[TMP6]], <8 x float> [[TMP7]])
469 ; FMA256-NEXT: store <8 x float> [[TMP8]], ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 8), align 4
470 ; FMA256-NEXT: ret void
472 ; FMA512-LABEL: @fma_16f32(
473 ; FMA512-NEXT: [[TMP1:%.*]] = load <16 x float>, ptr @srcA32, align 4
474 ; FMA512-NEXT: [[TMP2:%.*]] = load <16 x float>, ptr @srcB32, align 4
475 ; FMA512-NEXT: [[TMP3:%.*]] = load <16 x float>, ptr @srcC32, align 4
476 ; FMA512-NEXT: [[TMP4:%.*]] = call <16 x float> @llvm.fma.v16f32(<16 x float> [[TMP1]], <16 x float> [[TMP2]], <16 x float> [[TMP3]])
477 ; FMA512-NEXT: store <16 x float> [[TMP4]], ptr @dst32, align 4
478 ; FMA512-NEXT: ret void
480 %a0 = load float, ptr @srcA32, align 4
481 %a1 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 1), align 4
482 %a2 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 2), align 4
483 %a3 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 3), align 4
484 %a4 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 4), align 4
485 %a5 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 5), align 4
486 %a6 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 6), align 4
487 %a7 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 7), align 4
488 %a8 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 8), align 4
489 %a9 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 9), align 4
490 %a10 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 10), align 4
491 %a11 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 11), align 4
492 %a12 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 12), align 4
493 %a13 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 13), align 4
494 %a14 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 14), align 4
495 %a15 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 15), align 4
496 %b0 = load float, ptr @srcB32, align 4
497 %b1 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 1), align 4
498 %b2 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 2), align 4
499 %b3 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 3), align 4
500 %b4 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 4), align 4
501 %b5 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 5), align 4
502 %b6 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 6), align 4
503 %b7 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 7), align 4
504 %b8 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 8), align 4
505 %b9 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 9), align 4
506 %b10 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 10), align 4
507 %b11 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 11), align 4
508 %b12 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 12), align 4
509 %b13 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 13), align 4
510 %b14 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 14), align 4
511 %b15 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 15), align 4
512 %c0 = load float, ptr @srcC32, align 4
513 %c1 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 1), align 4
514 %c2 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 2), align 4
515 %c3 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 3), align 4
516 %c4 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 4), align 4
517 %c5 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 5), align 4
518 %c6 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 6), align 4
519 %c7 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 7), align 4
520 %c8 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 8), align 4
521 %c9 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 9), align 4
522 %c10 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 10), align 4
523 %c11 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 11), align 4
524 %c12 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 12), align 4
525 %c13 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 13), align 4
526 %c14 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 14), align 4
527 %c15 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 15), align 4
528 %fma0 = call float @llvm.fma.f32(float %a0 , float %b0 , float %c0 )
529 %fma1 = call float @llvm.fma.f32(float %a1 , float %b1 , float %c1 )
530 %fma2 = call float @llvm.fma.f32(float %a2 , float %b2 , float %c2 )
531 %fma3 = call float @llvm.fma.f32(float %a3 , float %b3 , float %c3 )
532 %fma4 = call float @llvm.fma.f32(float %a4 , float %b4 , float %c4 )
533 %fma5 = call float @llvm.fma.f32(float %a5 , float %b5 , float %c5 )
534 %fma6 = call float @llvm.fma.f32(float %a6 , float %b6 , float %c6 )
535 %fma7 = call float @llvm.fma.f32(float %a7 , float %b7 , float %c7 )
536 %fma8 = call float @llvm.fma.f32(float %a8 , float %b8 , float %c8 )
537 %fma9 = call float @llvm.fma.f32(float %a9 , float %b9 , float %c9 )
538 %fma10 = call float @llvm.fma.f32(float %a10, float %b10, float %c10)
539 %fma11 = call float @llvm.fma.f32(float %a11, float %b11, float %c11)
540 %fma12 = call float @llvm.fma.f32(float %a12, float %b12, float %c12)
541 %fma13 = call float @llvm.fma.f32(float %a13, float %b13, float %c13)
542 %fma14 = call float @llvm.fma.f32(float %a14, float %b14, float %c14)
543 %fma15 = call float @llvm.fma.f32(float %a15, float %b15, float %c15)
544 store float %fma0 , ptr @dst32, align 4
545 store float %fma1 , ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 1), align 4
546 store float %fma2 , ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 2), align 4
547 store float %fma3 , ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 3), align 4
548 store float %fma4 , ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 4), align 4
549 store float %fma5 , ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 5), align 4
550 store float %fma6 , ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 6), align 4
551 store float %fma7 , ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 7), align 4
552 store float %fma8 , ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 8), align 4
553 store float %fma9 , ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 9), align 4
554 store float %fma10, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 10), align 4
555 store float %fma11, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 11), align 4
556 store float %fma12, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 12), align 4
557 store float %fma13, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 13), align 4
558 store float %fma14, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 14), align 4
559 store float %fma15, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 15), align 4
563 attributes #0 = { nounwind }