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-prefixes=CHECK,SSE
3 ; RUN: opt < %s -mtriple=x86_64-unknown -mcpu=corei7-avx -passes=slp-vectorizer -S | FileCheck %s --check-prefixes=CHECK,AVX
4 ; RUN: opt < %s -mtriple=x86_64-unknown -mcpu=bdver1 -passes=slp-vectorizer -S | FileCheck %s --check-prefixes=CHECK,AVX,AVX256
5 ; RUN: opt < %s -mtriple=x86_64-unknown -mcpu=core-avx2 -passes=slp-vectorizer -S | FileCheck %s --check-prefixes=CHECK,AVX,AVX256
6 ; RUN: opt < %s -mtriple=x86_64-unknown -mcpu=skylake-avx512 -mattr=-prefer-256-bit -passes=slp-vectorizer -S | FileCheck %s --check-prefixes=CHECK,AVX,AVX512
7 ; RUN: opt < %s -mtriple=x86_64-unknown -mcpu=skylake-avx512 -mattr=+prefer-256-bit -passes=slp-vectorizer -S | FileCheck %s --check-prefixes=CHECK,AVX,AVX256
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.fmuladd.f32(float, float, float)
21 declare double @llvm.fmuladd.f64(double, double, double)
27 define void @fmuladd_2f64() #0 {
28 ; CHECK-LABEL: @fmuladd_2f64(
29 ; CHECK-NEXT: [[TMP1:%.*]] = load <2 x double>, ptr @srcA64, align 8
30 ; CHECK-NEXT: [[TMP2:%.*]] = load <2 x double>, ptr @srcB64, align 8
31 ; CHECK-NEXT: [[TMP3:%.*]] = load <2 x double>, ptr @srcC64, align 8
32 ; CHECK-NEXT: [[TMP4:%.*]] = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> [[TMP1]], <2 x double> [[TMP2]], <2 x double> [[TMP3]])
33 ; CHECK-NEXT: store <2 x double> [[TMP4]], ptr @dst64, align 8
34 ; CHECK-NEXT: ret void
36 %a0 = load double, ptr @srcA64, align 8
37 %a1 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 1), align 8
38 %b0 = load double, ptr @srcB64, align 8
39 %b1 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 1), align 8
40 %c0 = load double, ptr @srcC64, align 8
41 %c1 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcC64, i32 0, i64 1), align 8
42 %fmuladd0 = call double @llvm.fmuladd.f64(double %a0, double %b0, double %c0)
43 %fmuladd1 = call double @llvm.fmuladd.f64(double %a1, double %b1, double %c1)
44 store double %fmuladd0, ptr @dst64, align 8
45 store double %fmuladd1, ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 1), align 8
49 define void @fmuladd_4f64() #0 {
50 ; SSE-LABEL: @fmuladd_4f64(
51 ; SSE-NEXT: [[TMP1:%.*]] = load <2 x double>, ptr @srcA64, align 8
52 ; SSE-NEXT: [[TMP2:%.*]] = load <2 x double>, ptr @srcB64, align 8
53 ; SSE-NEXT: [[TMP3:%.*]] = load <2 x double>, ptr @srcC64, align 8
54 ; SSE-NEXT: [[TMP4:%.*]] = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> [[TMP1]], <2 x double> [[TMP2]], <2 x double> [[TMP3]])
55 ; SSE-NEXT: store <2 x double> [[TMP4]], ptr @dst64, align 8
56 ; SSE-NEXT: [[TMP5:%.*]] = load <2 x double>, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 2), align 8
57 ; SSE-NEXT: [[TMP6:%.*]] = load <2 x double>, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 2), align 8
58 ; SSE-NEXT: [[TMP7:%.*]] = load <2 x double>, ptr getelementptr inbounds ([8 x double], ptr @srcC64, i32 0, i64 2), align 8
59 ; SSE-NEXT: [[TMP8:%.*]] = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> [[TMP5]], <2 x double> [[TMP6]], <2 x double> [[TMP7]])
60 ; SSE-NEXT: store <2 x double> [[TMP8]], ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 2), align 8
63 ; AVX-LABEL: @fmuladd_4f64(
64 ; AVX-NEXT: [[TMP1:%.*]] = load <4 x double>, ptr @srcA64, align 8
65 ; AVX-NEXT: [[TMP2:%.*]] = load <4 x double>, ptr @srcB64, align 8
66 ; AVX-NEXT: [[TMP3:%.*]] = load <4 x double>, ptr @srcC64, align 8
67 ; AVX-NEXT: [[TMP4:%.*]] = call <4 x double> @llvm.fmuladd.v4f64(<4 x double> [[TMP1]], <4 x double> [[TMP2]], <4 x double> [[TMP3]])
68 ; AVX-NEXT: store <4 x double> [[TMP4]], ptr @dst64, align 8
71 %a0 = load double, ptr @srcA64, align 8
72 %a1 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 1), align 8
73 %a2 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 2), align 8
74 %a3 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 3), align 8
75 %b0 = load double, ptr @srcB64, align 8
76 %b1 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 1), align 8
77 %b2 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 2), align 8
78 %b3 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 3), align 8
79 %c0 = load double, ptr @srcC64, align 8
80 %c1 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcC64, i32 0, i64 1), align 8
81 %c2 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcC64, i32 0, i64 2), align 8
82 %c3 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcC64, i32 0, i64 3), align 8
83 %fmuladd0 = call double @llvm.fmuladd.f64(double %a0, double %b0, double %c0)
84 %fmuladd1 = call double @llvm.fmuladd.f64(double %a1, double %b1, double %c1)
85 %fmuladd2 = call double @llvm.fmuladd.f64(double %a2, double %b2, double %c2)
86 %fmuladd3 = call double @llvm.fmuladd.f64(double %a3, double %b3, double %c3)
87 store double %fmuladd0, ptr @dst64, align 8
88 store double %fmuladd1, ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 1), align 8
89 store double %fmuladd2, ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 2), align 8
90 store double %fmuladd3, ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 3), align 8
94 define void @fmuladd_8f64() #0 {
95 ; SSE-LABEL: @fmuladd_8f64(
96 ; SSE-NEXT: [[TMP1:%.*]] = load <2 x double>, ptr @srcA64, align 4
97 ; SSE-NEXT: [[TMP2:%.*]] = load <2 x double>, ptr @srcB64, align 4
98 ; SSE-NEXT: [[TMP3:%.*]] = load <2 x double>, ptr @srcC64, align 4
99 ; SSE-NEXT: [[TMP4:%.*]] = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> [[TMP1]], <2 x double> [[TMP2]], <2 x double> [[TMP3]])
100 ; SSE-NEXT: store <2 x double> [[TMP4]], ptr @dst64, align 4
101 ; SSE-NEXT: [[TMP5:%.*]] = load <2 x double>, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 2), align 4
102 ; SSE-NEXT: [[TMP6:%.*]] = load <2 x double>, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 2), align 4
103 ; SSE-NEXT: [[TMP7:%.*]] = load <2 x double>, ptr getelementptr inbounds ([8 x double], ptr @srcC64, i32 0, i64 2), align 4
104 ; SSE-NEXT: [[TMP8:%.*]] = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> [[TMP5]], <2 x double> [[TMP6]], <2 x double> [[TMP7]])
105 ; SSE-NEXT: store <2 x double> [[TMP8]], ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 2), align 4
106 ; SSE-NEXT: [[TMP9:%.*]] = load <2 x double>, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 4), align 4
107 ; SSE-NEXT: [[TMP10:%.*]] = load <2 x double>, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 4), align 4
108 ; SSE-NEXT: [[TMP11:%.*]] = load <2 x double>, ptr getelementptr inbounds ([8 x double], ptr @srcC64, i32 0, i64 4), align 4
109 ; SSE-NEXT: [[TMP12:%.*]] = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> [[TMP9]], <2 x double> [[TMP10]], <2 x double> [[TMP11]])
110 ; SSE-NEXT: store <2 x double> [[TMP12]], ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 4), align 4
111 ; SSE-NEXT: [[TMP13:%.*]] = load <2 x double>, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 6), align 4
112 ; SSE-NEXT: [[TMP14:%.*]] = load <2 x double>, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 6), align 4
113 ; SSE-NEXT: [[TMP15:%.*]] = load <2 x double>, ptr getelementptr inbounds ([8 x double], ptr @srcC64, i32 0, i64 6), align 4
114 ; SSE-NEXT: [[TMP16:%.*]] = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> [[TMP13]], <2 x double> [[TMP14]], <2 x double> [[TMP15]])
115 ; SSE-NEXT: store <2 x double> [[TMP16]], ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 6), align 4
118 ; AVX256-LABEL: @fmuladd_8f64(
119 ; AVX256-NEXT: [[TMP1:%.*]] = load <4 x double>, ptr @srcA64, align 4
120 ; AVX256-NEXT: [[TMP2:%.*]] = load <4 x double>, ptr @srcB64, align 4
121 ; AVX256-NEXT: [[TMP3:%.*]] = load <4 x double>, ptr @srcC64, align 4
122 ; AVX256-NEXT: [[TMP4:%.*]] = call <4 x double> @llvm.fmuladd.v4f64(<4 x double> [[TMP1]], <4 x double> [[TMP2]], <4 x double> [[TMP3]])
123 ; AVX256-NEXT: store <4 x double> [[TMP4]], ptr @dst64, align 4
124 ; AVX256-NEXT: [[TMP5:%.*]] = load <4 x double>, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 4), align 4
125 ; AVX256-NEXT: [[TMP6:%.*]] = load <4 x double>, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 4), align 4
126 ; AVX256-NEXT: [[TMP7:%.*]] = load <4 x double>, ptr getelementptr inbounds ([8 x double], ptr @srcC64, i32 0, i64 4), align 4
127 ; AVX256-NEXT: [[TMP8:%.*]] = call <4 x double> @llvm.fmuladd.v4f64(<4 x double> [[TMP5]], <4 x double> [[TMP6]], <4 x double> [[TMP7]])
128 ; AVX256-NEXT: store <4 x double> [[TMP8]], ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 4), align 4
129 ; AVX256-NEXT: ret void
131 ; AVX512-LABEL: @fmuladd_8f64(
132 ; AVX512-NEXT: [[TMP1:%.*]] = load <8 x double>, ptr @srcA64, align 4
133 ; AVX512-NEXT: [[TMP2:%.*]] = load <8 x double>, ptr @srcB64, align 4
134 ; AVX512-NEXT: [[TMP3:%.*]] = load <8 x double>, ptr @srcC64, align 4
135 ; AVX512-NEXT: [[TMP4:%.*]] = call <8 x double> @llvm.fmuladd.v8f64(<8 x double> [[TMP1]], <8 x double> [[TMP2]], <8 x double> [[TMP3]])
136 ; AVX512-NEXT: store <8 x double> [[TMP4]], ptr @dst64, align 4
137 ; AVX512-NEXT: ret void
139 %a0 = load double, ptr @srcA64, align 4
140 %a1 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 1), align 4
141 %a2 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 2), align 4
142 %a3 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 3), align 4
143 %a4 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 4), align 4
144 %a5 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 5), align 4
145 %a6 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 6), align 4
146 %a7 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 7), align 4
147 %b0 = load double, ptr @srcB64, align 4
148 %b1 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 1), align 4
149 %b2 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 2), align 4
150 %b3 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 3), align 4
151 %b4 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 4), align 4
152 %b5 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 5), align 4
153 %b6 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 6), align 4
154 %b7 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 7), align 4
155 %c0 = load double, ptr @srcC64, align 4
156 %c1 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcC64, i32 0, i64 1), align 4
157 %c2 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcC64, i32 0, i64 2), align 4
158 %c3 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcC64, i32 0, i64 3), align 4
159 %c4 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcC64, i32 0, i64 4), align 4
160 %c5 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcC64, i32 0, i64 5), align 4
161 %c6 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcC64, i32 0, i64 6), align 4
162 %c7 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcC64, i32 0, i64 7), align 4
163 %fmuladd0 = call double @llvm.fmuladd.f64(double %a0, double %b0, double %c0)
164 %fmuladd1 = call double @llvm.fmuladd.f64(double %a1, double %b1, double %c1)
165 %fmuladd2 = call double @llvm.fmuladd.f64(double %a2, double %b2, double %c2)
166 %fmuladd3 = call double @llvm.fmuladd.f64(double %a3, double %b3, double %c3)
167 %fmuladd4 = call double @llvm.fmuladd.f64(double %a4, double %b4, double %c4)
168 %fmuladd5 = call double @llvm.fmuladd.f64(double %a5, double %b5, double %c5)
169 %fmuladd6 = call double @llvm.fmuladd.f64(double %a6, double %b6, double %c6)
170 %fmuladd7 = call double @llvm.fmuladd.f64(double %a7, double %b7, double %c7)
171 store double %fmuladd0, ptr @dst64, align 4
172 store double %fmuladd1, ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 1), align 4
173 store double %fmuladd2, ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 2), align 4
174 store double %fmuladd3, ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 3), align 4
175 store double %fmuladd4, ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 4), align 4
176 store double %fmuladd5, ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 5), align 4
177 store double %fmuladd6, ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 6), align 4
178 store double %fmuladd7, ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 7), align 4
182 define void @fmuladd_4f32() #0 {
183 ; CHECK-LABEL: @fmuladd_4f32(
184 ; CHECK-NEXT: [[TMP1:%.*]] = load <4 x float>, ptr @srcA32, align 4
185 ; CHECK-NEXT: [[TMP2:%.*]] = load <4 x float>, ptr @srcB32, align 4
186 ; CHECK-NEXT: [[TMP3:%.*]] = load <4 x float>, ptr @srcC32, align 4
187 ; CHECK-NEXT: [[TMP4:%.*]] = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> [[TMP1]], <4 x float> [[TMP2]], <4 x float> [[TMP3]])
188 ; CHECK-NEXT: store <4 x float> [[TMP4]], ptr @dst32, align 4
189 ; CHECK-NEXT: ret void
191 %a0 = load float, ptr @srcA32, align 4
192 %a1 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 1), align 4
193 %a2 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 2), align 4
194 %a3 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 3), align 4
195 %b0 = load float, ptr @srcB32, align 4
196 %b1 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 1), align 4
197 %b2 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 2), align 4
198 %b3 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 3), align 4
199 %c0 = load float, ptr @srcC32, align 4
200 %c1 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 1), align 4
201 %c2 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 2), align 4
202 %c3 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 3), align 4
203 %fmuladd0 = call float @llvm.fmuladd.f32(float %a0, float %b0, float %c0)
204 %fmuladd1 = call float @llvm.fmuladd.f32(float %a1, float %b1, float %c1)
205 %fmuladd2 = call float @llvm.fmuladd.f32(float %a2, float %b2, float %c2)
206 %fmuladd3 = call float @llvm.fmuladd.f32(float %a3, float %b3, float %c3)
207 store float %fmuladd0, ptr @dst32, align 4
208 store float %fmuladd1, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 1), align 4
209 store float %fmuladd2, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 2), align 4
210 store float %fmuladd3, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 3), align 4
214 define void @fmuladd_8f32() #0 {
215 ; SSE-LABEL: @fmuladd_8f32(
216 ; SSE-NEXT: [[TMP1:%.*]] = load <4 x float>, ptr @srcA32, align 4
217 ; SSE-NEXT: [[TMP2:%.*]] = load <4 x float>, ptr @srcB32, align 4
218 ; SSE-NEXT: [[TMP3:%.*]] = load <4 x float>, ptr @srcC32, align 4
219 ; SSE-NEXT: [[TMP4:%.*]] = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> [[TMP1]], <4 x float> [[TMP2]], <4 x float> [[TMP3]])
220 ; SSE-NEXT: store <4 x float> [[TMP4]], ptr @dst32, align 4
221 ; SSE-NEXT: [[TMP5:%.*]] = load <4 x float>, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 4), align 4
222 ; SSE-NEXT: [[TMP6:%.*]] = load <4 x float>, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 4), align 4
223 ; SSE-NEXT: [[TMP7:%.*]] = load <4 x float>, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 4), align 4
224 ; SSE-NEXT: [[TMP8:%.*]] = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> [[TMP5]], <4 x float> [[TMP6]], <4 x float> [[TMP7]])
225 ; SSE-NEXT: store <4 x float> [[TMP8]], ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 4), align 4
228 ; AVX-LABEL: @fmuladd_8f32(
229 ; AVX-NEXT: [[TMP1:%.*]] = load <8 x float>, ptr @srcA32, align 4
230 ; AVX-NEXT: [[TMP2:%.*]] = load <8 x float>, ptr @srcB32, align 4
231 ; AVX-NEXT: [[TMP3:%.*]] = load <8 x float>, ptr @srcC32, align 4
232 ; AVX-NEXT: [[TMP4:%.*]] = call <8 x float> @llvm.fmuladd.v8f32(<8 x float> [[TMP1]], <8 x float> [[TMP2]], <8 x float> [[TMP3]])
233 ; AVX-NEXT: store <8 x float> [[TMP4]], ptr @dst32, align 4
236 %a0 = load float, ptr @srcA32, align 4
237 %a1 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 1), align 4
238 %a2 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 2), align 4
239 %a3 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 3), align 4
240 %a4 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 4), align 4
241 %a5 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 5), align 4
242 %a6 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 6), align 4
243 %a7 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 7), align 4
244 %b0 = load float, ptr @srcB32, align 4
245 %b1 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 1), align 4
246 %b2 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 2), align 4
247 %b3 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 3), align 4
248 %b4 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 4), align 4
249 %b5 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 5), align 4
250 %b6 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 6), align 4
251 %b7 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 7), align 4
252 %c0 = load float, ptr @srcC32, align 4
253 %c1 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 1), align 4
254 %c2 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 2), align 4
255 %c3 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 3), align 4
256 %c4 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 4), align 4
257 %c5 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 5), align 4
258 %c6 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 6), align 4
259 %c7 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 7), align 4
260 %fmuladd0 = call float @llvm.fmuladd.f32(float %a0, float %b0, float %c0)
261 %fmuladd1 = call float @llvm.fmuladd.f32(float %a1, float %b1, float %c1)
262 %fmuladd2 = call float @llvm.fmuladd.f32(float %a2, float %b2, float %c2)
263 %fmuladd3 = call float @llvm.fmuladd.f32(float %a3, float %b3, float %c3)
264 %fmuladd4 = call float @llvm.fmuladd.f32(float %a4, float %b4, float %c4)
265 %fmuladd5 = call float @llvm.fmuladd.f32(float %a5, float %b5, float %c5)
266 %fmuladd6 = call float @llvm.fmuladd.f32(float %a6, float %b6, float %c6)
267 %fmuladd7 = call float @llvm.fmuladd.f32(float %a7, float %b7, float %c7)
268 store float %fmuladd0, ptr @dst32, align 4
269 store float %fmuladd1, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 1), align 4
270 store float %fmuladd2, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 2), align 4
271 store float %fmuladd3, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 3), align 4
272 store float %fmuladd4, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 4), align 4
273 store float %fmuladd5, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 5), align 4
274 store float %fmuladd6, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 6), align 4
275 store float %fmuladd7, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 7), align 4
279 define void @fmuladd_16f32() #0 {
280 ; SSE-LABEL: @fmuladd_16f32(
281 ; SSE-NEXT: [[TMP1:%.*]] = load <4 x float>, ptr @srcA32, align 4
282 ; SSE-NEXT: [[TMP2:%.*]] = load <4 x float>, ptr @srcB32, align 4
283 ; SSE-NEXT: [[TMP3:%.*]] = load <4 x float>, ptr @srcC32, align 4
284 ; SSE-NEXT: [[TMP4:%.*]] = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> [[TMP1]], <4 x float> [[TMP2]], <4 x float> [[TMP3]])
285 ; SSE-NEXT: store <4 x float> [[TMP4]], ptr @dst32, align 4
286 ; SSE-NEXT: [[TMP5:%.*]] = load <4 x float>, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 4), align 4
287 ; SSE-NEXT: [[TMP6:%.*]] = load <4 x float>, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 4), align 4
288 ; SSE-NEXT: [[TMP7:%.*]] = load <4 x float>, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 4), align 4
289 ; SSE-NEXT: [[TMP8:%.*]] = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> [[TMP5]], <4 x float> [[TMP6]], <4 x float> [[TMP7]])
290 ; SSE-NEXT: store <4 x float> [[TMP8]], ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 4), align 4
291 ; SSE-NEXT: [[TMP9:%.*]] = load <4 x float>, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 8), align 4
292 ; SSE-NEXT: [[TMP10:%.*]] = load <4 x float>, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 8), align 4
293 ; SSE-NEXT: [[TMP11:%.*]] = load <4 x float>, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 8), align 4
294 ; SSE-NEXT: [[TMP12:%.*]] = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> [[TMP9]], <4 x float> [[TMP10]], <4 x float> [[TMP11]])
295 ; SSE-NEXT: store <4 x float> [[TMP12]], ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 8), align 4
296 ; SSE-NEXT: [[TMP13:%.*]] = load <4 x float>, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 12), align 4
297 ; SSE-NEXT: [[TMP14:%.*]] = load <4 x float>, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 12), align 4
298 ; SSE-NEXT: [[TMP15:%.*]] = load <4 x float>, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 12), align 4
299 ; SSE-NEXT: [[TMP16:%.*]] = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> [[TMP13]], <4 x float> [[TMP14]], <4 x float> [[TMP15]])
300 ; SSE-NEXT: store <4 x float> [[TMP16]], ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 12), align 4
303 ; AVX256-LABEL: @fmuladd_16f32(
304 ; AVX256-NEXT: [[TMP1:%.*]] = load <8 x float>, ptr @srcA32, align 4
305 ; AVX256-NEXT: [[TMP2:%.*]] = load <8 x float>, ptr @srcB32, align 4
306 ; AVX256-NEXT: [[TMP3:%.*]] = load <8 x float>, ptr @srcC32, align 4
307 ; AVX256-NEXT: [[TMP4:%.*]] = call <8 x float> @llvm.fmuladd.v8f32(<8 x float> [[TMP1]], <8 x float> [[TMP2]], <8 x float> [[TMP3]])
308 ; AVX256-NEXT: store <8 x float> [[TMP4]], ptr @dst32, align 4
309 ; AVX256-NEXT: [[TMP5:%.*]] = load <8 x float>, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 8), align 4
310 ; AVX256-NEXT: [[TMP6:%.*]] = load <8 x float>, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 8), align 4
311 ; AVX256-NEXT: [[TMP7:%.*]] = load <8 x float>, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 8), align 4
312 ; AVX256-NEXT: [[TMP8:%.*]] = call <8 x float> @llvm.fmuladd.v8f32(<8 x float> [[TMP5]], <8 x float> [[TMP6]], <8 x float> [[TMP7]])
313 ; AVX256-NEXT: store <8 x float> [[TMP8]], ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 8), align 4
314 ; AVX256-NEXT: ret void
316 ; AVX512-LABEL: @fmuladd_16f32(
317 ; AVX512-NEXT: [[TMP1:%.*]] = load <16 x float>, ptr @srcA32, align 4
318 ; AVX512-NEXT: [[TMP2:%.*]] = load <16 x float>, ptr @srcB32, align 4
319 ; AVX512-NEXT: [[TMP3:%.*]] = load <16 x float>, ptr @srcC32, align 4
320 ; AVX512-NEXT: [[TMP4:%.*]] = call <16 x float> @llvm.fmuladd.v16f32(<16 x float> [[TMP1]], <16 x float> [[TMP2]], <16 x float> [[TMP3]])
321 ; AVX512-NEXT: store <16 x float> [[TMP4]], ptr @dst32, align 4
322 ; AVX512-NEXT: ret void
324 %a0 = load float, ptr @srcA32, align 4
325 %a1 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 1), align 4
326 %a2 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 2), align 4
327 %a3 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 3), align 4
328 %a4 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 4), align 4
329 %a5 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 5), align 4
330 %a6 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 6), align 4
331 %a7 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 7), align 4
332 %a8 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 8), align 4
333 %a9 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 9), align 4
334 %a10 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 10), align 4
335 %a11 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 11), align 4
336 %a12 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 12), align 4
337 %a13 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 13), align 4
338 %a14 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 14), align 4
339 %a15 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 15), 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 %b8 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 8), align 4
349 %b9 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 9), align 4
350 %b10 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 10), align 4
351 %b11 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 11), align 4
352 %b12 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 12), align 4
353 %b13 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 13), align 4
354 %b14 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 14), align 4
355 %b15 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 15), align 4
356 %c0 = load float, ptr @srcC32, align 4
357 %c1 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 1), align 4
358 %c2 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 2), align 4
359 %c3 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 3), align 4
360 %c4 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 4), align 4
361 %c5 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 5), align 4
362 %c6 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 6), align 4
363 %c7 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 7), align 4
364 %c8 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 8), align 4
365 %c9 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 9), align 4
366 %c10 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 10), align 4
367 %c11 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 11), align 4
368 %c12 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 12), align 4
369 %c13 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 13), align 4
370 %c14 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 14), align 4
371 %c15 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 15), align 4
372 %fmuladd0 = call float @llvm.fmuladd.f32(float %a0 , float %b0 , float %c0 )
373 %fmuladd1 = call float @llvm.fmuladd.f32(float %a1 , float %b1 , float %c1 )
374 %fmuladd2 = call float @llvm.fmuladd.f32(float %a2 , float %b2 , float %c2 )
375 %fmuladd3 = call float @llvm.fmuladd.f32(float %a3 , float %b3 , float %c3 )
376 %fmuladd4 = call float @llvm.fmuladd.f32(float %a4 , float %b4 , float %c4 )
377 %fmuladd5 = call float @llvm.fmuladd.f32(float %a5 , float %b5 , float %c5 )
378 %fmuladd6 = call float @llvm.fmuladd.f32(float %a6 , float %b6 , float %c6 )
379 %fmuladd7 = call float @llvm.fmuladd.f32(float %a7 , float %b7 , float %c7 )
380 %fmuladd8 = call float @llvm.fmuladd.f32(float %a8 , float %b8 , float %c8 )
381 %fmuladd9 = call float @llvm.fmuladd.f32(float %a9 , float %b9 , float %c9 )
382 %fmuladd10 = call float @llvm.fmuladd.f32(float %a10, float %b10, float %c10)
383 %fmuladd11 = call float @llvm.fmuladd.f32(float %a11, float %b11, float %c11)
384 %fmuladd12 = call float @llvm.fmuladd.f32(float %a12, float %b12, float %c12)
385 %fmuladd13 = call float @llvm.fmuladd.f32(float %a13, float %b13, float %c13)
386 %fmuladd14 = call float @llvm.fmuladd.f32(float %a14, float %b14, float %c14)
387 %fmuladd15 = call float @llvm.fmuladd.f32(float %a15, float %b15, float %c15)
388 store float %fmuladd0 , ptr @dst32, align 4
389 store float %fmuladd1 , ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 1), align 4
390 store float %fmuladd2 , ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 2), align 4
391 store float %fmuladd3 , ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 3), align 4
392 store float %fmuladd4 , ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 4), align 4
393 store float %fmuladd5 , ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 5), align 4
394 store float %fmuladd6 , ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 6), align 4
395 store float %fmuladd7 , ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 7), align 4
396 store float %fmuladd8 , ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 8), align 4
397 store float %fmuladd9 , ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 9), align 4
398 store float %fmuladd10, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 10), align 4
399 store float %fmuladd11, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 11), align 4
400 store float %fmuladd12, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 12), align 4
401 store float %fmuladd13, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 13), align 4
402 store float %fmuladd14, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 14), align 4
403 store float %fmuladd15, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 15), align 4
407 attributes #0 = { nounwind }