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=CHECK --check-prefix=SSE
3 ; RUN: opt < %s -mtriple=x86_64-unknown -mcpu=corei7-avx -passes=slp-vectorizer -S | FileCheck %s --check-prefix=CHECK --check-prefix=AVX --check-prefix=AVX256
4 ; RUN: opt < %s -mtriple=x86_64-unknown -mcpu=bdver1 -passes=slp-vectorizer -S | FileCheck %s --check-prefix=CHECK --check-prefix=AVX --check-prefix=AVX256
5 ; RUN: opt < %s -mtriple=x86_64-unknown -mcpu=core-avx2 -passes=slp-vectorizer -S | FileCheck %s --check-prefix=CHECK --check-prefix=AVX --check-prefix=AVX256
6 ; RUN: opt < %s -mtriple=x86_64-unknown -mcpu=skylake-avx512 -mattr=-prefer-256-bit -passes=slp-vectorizer -S | FileCheck %s --check-prefix=CHECK --check-prefix=AVX --check-prefix=AVX512
7 ; RUN: opt < %s -mtriple=x86_64-unknown -mcpu=skylake-avx512 -mattr=+prefer-256-bit -passes=slp-vectorizer -S | FileCheck %s --check-prefix=CHECK --check-prefix=AVX --check-prefix=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.copysign.f32(float, float)
21 declare double @llvm.copysign.f64(double, double)
27 define void @fcopysign_2f64() #0 {
28 ; CHECK-LABEL: @fcopysign_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:%.*]] = call <2 x double> @llvm.copysign.v2f64(<2 x double> [[TMP1]], <2 x double> [[TMP2]])
32 ; CHECK-NEXT: store <2 x double> [[TMP3]], ptr @dst64, align 8
33 ; CHECK-NEXT: ret void
35 %a0 = load double, ptr @srcA64, align 8
36 %a1 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 1), align 8
37 %b0 = load double, ptr @srcB64, align 8
38 %b1 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 1), align 8
39 %fcopysign0 = call double @llvm.copysign.f64(double %a0, double %b0)
40 %fcopysign1 = call double @llvm.copysign.f64(double %a1, double %b1)
41 store double %fcopysign0, ptr @dst64, align 8
42 store double %fcopysign1, ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 1), align 8
46 define void @fcopysign_4f64() #0 {
47 ; SSE-LABEL: @fcopysign_4f64(
48 ; SSE-NEXT: [[TMP1:%.*]] = load <2 x double>, ptr @srcA64, align 8
49 ; SSE-NEXT: [[TMP2:%.*]] = load <2 x double>, ptr @srcB64, align 8
50 ; SSE-NEXT: [[TMP3:%.*]] = call <2 x double> @llvm.copysign.v2f64(<2 x double> [[TMP1]], <2 x double> [[TMP2]])
51 ; SSE-NEXT: store <2 x double> [[TMP3]], ptr @dst64, align 8
52 ; SSE-NEXT: [[TMP4:%.*]] = load <2 x double>, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 2), align 8
53 ; SSE-NEXT: [[TMP5:%.*]] = load <2 x double>, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 2), align 8
54 ; SSE-NEXT: [[TMP6:%.*]] = call <2 x double> @llvm.copysign.v2f64(<2 x double> [[TMP4]], <2 x double> [[TMP5]])
55 ; SSE-NEXT: store <2 x double> [[TMP6]], ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 2), align 8
58 ; AVX-LABEL: @fcopysign_4f64(
59 ; AVX-NEXT: [[TMP1:%.*]] = load <4 x double>, ptr @srcA64, align 8
60 ; AVX-NEXT: [[TMP2:%.*]] = load <4 x double>, ptr @srcB64, align 8
61 ; AVX-NEXT: [[TMP3:%.*]] = call <4 x double> @llvm.copysign.v4f64(<4 x double> [[TMP1]], <4 x double> [[TMP2]])
62 ; AVX-NEXT: store <4 x double> [[TMP3]], ptr @dst64, align 8
65 %a0 = load double, ptr @srcA64, align 8
66 %a1 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 1), align 8
67 %a2 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 2), align 8
68 %a3 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 3), align 8
69 %b0 = load double, ptr @srcB64, align 8
70 %b1 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 1), align 8
71 %b2 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 2), align 8
72 %b3 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 3), align 8
73 %fcopysign0 = call double @llvm.copysign.f64(double %a0, double %b0)
74 %fcopysign1 = call double @llvm.copysign.f64(double %a1, double %b1)
75 %fcopysign2 = call double @llvm.copysign.f64(double %a2, double %b2)
76 %fcopysign3 = call double @llvm.copysign.f64(double %a3, double %b3)
77 store double %fcopysign0, ptr @dst64, align 8
78 store double %fcopysign1, ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 1), align 8
79 store double %fcopysign2, ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 2), align 8
80 store double %fcopysign3, ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 3), align 8
84 define void @fcopysign_8f64() #0 {
85 ; SSE-LABEL: @fcopysign_8f64(
86 ; SSE-NEXT: [[TMP1:%.*]] = load <2 x double>, ptr @srcA64, align 4
87 ; SSE-NEXT: [[TMP2:%.*]] = load <2 x double>, ptr @srcB64, align 4
88 ; SSE-NEXT: [[TMP3:%.*]] = call <2 x double> @llvm.copysign.v2f64(<2 x double> [[TMP1]], <2 x double> [[TMP2]])
89 ; SSE-NEXT: store <2 x double> [[TMP3]], ptr @dst64, align 4
90 ; SSE-NEXT: [[TMP4:%.*]] = load <2 x double>, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 2), align 4
91 ; SSE-NEXT: [[TMP5:%.*]] = load <2 x double>, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 2), align 4
92 ; SSE-NEXT: [[TMP6:%.*]] = call <2 x double> @llvm.copysign.v2f64(<2 x double> [[TMP4]], <2 x double> [[TMP5]])
93 ; SSE-NEXT: store <2 x double> [[TMP6]], ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 2), align 4
94 ; SSE-NEXT: [[TMP7:%.*]] = load <2 x double>, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 4), align 4
95 ; SSE-NEXT: [[TMP8:%.*]] = load <2 x double>, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 4), align 4
96 ; SSE-NEXT: [[TMP9:%.*]] = call <2 x double> @llvm.copysign.v2f64(<2 x double> [[TMP7]], <2 x double> [[TMP8]])
97 ; SSE-NEXT: store <2 x double> [[TMP9]], ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 4), align 4
98 ; SSE-NEXT: [[TMP10:%.*]] = load <2 x double>, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 6), align 4
99 ; SSE-NEXT: [[TMP11:%.*]] = load <2 x double>, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 6), align 4
100 ; SSE-NEXT: [[TMP12:%.*]] = call <2 x double> @llvm.copysign.v2f64(<2 x double> [[TMP10]], <2 x double> [[TMP11]])
101 ; SSE-NEXT: store <2 x double> [[TMP12]], ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 6), align 4
104 ; AVX256-LABEL: @fcopysign_8f64(
105 ; AVX256-NEXT: [[TMP1:%.*]] = load <4 x double>, ptr @srcA64, align 4
106 ; AVX256-NEXT: [[TMP2:%.*]] = load <4 x double>, ptr @srcB64, align 4
107 ; AVX256-NEXT: [[TMP3:%.*]] = call <4 x double> @llvm.copysign.v4f64(<4 x double> [[TMP1]], <4 x double> [[TMP2]])
108 ; AVX256-NEXT: store <4 x double> [[TMP3]], ptr @dst64, align 4
109 ; AVX256-NEXT: [[TMP4:%.*]] = load <4 x double>, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 4), align 4
110 ; AVX256-NEXT: [[TMP5:%.*]] = load <4 x double>, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 4), align 4
111 ; AVX256-NEXT: [[TMP6:%.*]] = call <4 x double> @llvm.copysign.v4f64(<4 x double> [[TMP4]], <4 x double> [[TMP5]])
112 ; AVX256-NEXT: store <4 x double> [[TMP6]], ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 4), align 4
113 ; AVX256-NEXT: ret void
115 ; AVX512-LABEL: @fcopysign_8f64(
116 ; AVX512-NEXT: [[TMP1:%.*]] = load <8 x double>, ptr @srcA64, align 4
117 ; AVX512-NEXT: [[TMP2:%.*]] = load <8 x double>, ptr @srcB64, align 4
118 ; AVX512-NEXT: [[TMP3:%.*]] = call <8 x double> @llvm.copysign.v8f64(<8 x double> [[TMP1]], <8 x double> [[TMP2]])
119 ; AVX512-NEXT: store <8 x double> [[TMP3]], ptr @dst64, align 4
120 ; AVX512-NEXT: ret void
122 %a0 = load double, ptr @srcA64, align 4
123 %a1 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 1), align 4
124 %a2 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 2), align 4
125 %a3 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 3), align 4
126 %a4 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 4), align 4
127 %a5 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 5), align 4
128 %a6 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 6), align 4
129 %a7 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 7), align 4
130 %b0 = load double, ptr @srcB64, align 4
131 %b1 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 1), align 4
132 %b2 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 2), align 4
133 %b3 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 3), align 4
134 %b4 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 4), align 4
135 %b5 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 5), align 4
136 %b6 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 6), align 4
137 %b7 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 7), align 4
138 %fcopysign0 = call double @llvm.copysign.f64(double %a0, double %b0)
139 %fcopysign1 = call double @llvm.copysign.f64(double %a1, double %b1)
140 %fcopysign2 = call double @llvm.copysign.f64(double %a2, double %b2)
141 %fcopysign3 = call double @llvm.copysign.f64(double %a3, double %b3)
142 %fcopysign4 = call double @llvm.copysign.f64(double %a4, double %b4)
143 %fcopysign5 = call double @llvm.copysign.f64(double %a5, double %b5)
144 %fcopysign6 = call double @llvm.copysign.f64(double %a6, double %b6)
145 %fcopysign7 = call double @llvm.copysign.f64(double %a7, double %b7)
146 store double %fcopysign0, ptr @dst64, align 4
147 store double %fcopysign1, ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 1), align 4
148 store double %fcopysign2, ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 2), align 4
149 store double %fcopysign3, ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 3), align 4
150 store double %fcopysign4, ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 4), align 4
151 store double %fcopysign5, ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 5), align 4
152 store double %fcopysign6, ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 6), align 4
153 store double %fcopysign7, ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 7), align 4
157 define void @fcopysign_4f32() #0 {
158 ; CHECK-LABEL: @fcopysign_4f32(
159 ; CHECK-NEXT: [[TMP1:%.*]] = load <4 x float>, ptr @srcA32, align 4
160 ; CHECK-NEXT: [[TMP2:%.*]] = load <4 x float>, ptr @srcB32, align 4
161 ; CHECK-NEXT: [[TMP3:%.*]] = call <4 x float> @llvm.copysign.v4f32(<4 x float> [[TMP1]], <4 x float> [[TMP2]])
162 ; CHECK-NEXT: store <4 x float> [[TMP3]], ptr @dst32, align 4
163 ; CHECK-NEXT: ret void
165 %a0 = load float, ptr @srcA32, align 4
166 %a1 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 1), align 4
167 %a2 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 2), align 4
168 %a3 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 3), align 4
169 %b0 = load float, ptr @srcB32, align 4
170 %b1 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 1), align 4
171 %b2 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 2), align 4
172 %b3 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 3), align 4
173 %fcopysign0 = call float @llvm.copysign.f32(float %a0, float %b0)
174 %fcopysign1 = call float @llvm.copysign.f32(float %a1, float %b1)
175 %fcopysign2 = call float @llvm.copysign.f32(float %a2, float %b2)
176 %fcopysign3 = call float @llvm.copysign.f32(float %a3, float %b3)
177 store float %fcopysign0, ptr @dst32, align 4
178 store float %fcopysign1, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 1), align 4
179 store float %fcopysign2, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 2), align 4
180 store float %fcopysign3, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 3), align 4
184 define void @fcopysign_8f32() #0 {
185 ; SSE-LABEL: @fcopysign_8f32(
186 ; SSE-NEXT: [[TMP1:%.*]] = load <4 x float>, ptr @srcA32, align 4
187 ; SSE-NEXT: [[TMP2:%.*]] = load <4 x float>, ptr @srcB32, align 4
188 ; SSE-NEXT: [[TMP3:%.*]] = call <4 x float> @llvm.copysign.v4f32(<4 x float> [[TMP1]], <4 x float> [[TMP2]])
189 ; SSE-NEXT: store <4 x float> [[TMP3]], ptr @dst32, align 4
190 ; SSE-NEXT: [[TMP4:%.*]] = load <4 x float>, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 4), align 4
191 ; SSE-NEXT: [[TMP5:%.*]] = load <4 x float>, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 4), align 4
192 ; SSE-NEXT: [[TMP6:%.*]] = call <4 x float> @llvm.copysign.v4f32(<4 x float> [[TMP4]], <4 x float> [[TMP5]])
193 ; SSE-NEXT: store <4 x float> [[TMP6]], ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 4), align 4
196 ; AVX-LABEL: @fcopysign_8f32(
197 ; AVX-NEXT: [[TMP1:%.*]] = load <8 x float>, ptr @srcA32, align 4
198 ; AVX-NEXT: [[TMP2:%.*]] = load <8 x float>, ptr @srcB32, align 4
199 ; AVX-NEXT: [[TMP3:%.*]] = call <8 x float> @llvm.copysign.v8f32(<8 x float> [[TMP1]], <8 x float> [[TMP2]])
200 ; AVX-NEXT: store <8 x float> [[TMP3]], ptr @dst32, align 4
203 %a0 = load float, ptr @srcA32, align 4
204 %a1 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 1), align 4
205 %a2 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 2), align 4
206 %a3 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 3), align 4
207 %a4 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 4), align 4
208 %a5 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 5), align 4
209 %a6 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 6), align 4
210 %a7 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 7), align 4
211 %b0 = load float, ptr @srcB32, align 4
212 %b1 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 1), align 4
213 %b2 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 2), align 4
214 %b3 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 3), align 4
215 %b4 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 4), align 4
216 %b5 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 5), align 4
217 %b6 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 6), align 4
218 %b7 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 7), align 4
219 %fcopysign0 = call float @llvm.copysign.f32(float %a0, float %b0)
220 %fcopysign1 = call float @llvm.copysign.f32(float %a1, float %b1)
221 %fcopysign2 = call float @llvm.copysign.f32(float %a2, float %b2)
222 %fcopysign3 = call float @llvm.copysign.f32(float %a3, float %b3)
223 %fcopysign4 = call float @llvm.copysign.f32(float %a4, float %b4)
224 %fcopysign5 = call float @llvm.copysign.f32(float %a5, float %b5)
225 %fcopysign6 = call float @llvm.copysign.f32(float %a6, float %b6)
226 %fcopysign7 = call float @llvm.copysign.f32(float %a7, float %b7)
227 store float %fcopysign0, ptr @dst32, align 4
228 store float %fcopysign1, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 1), align 4
229 store float %fcopysign2, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 2), align 4
230 store float %fcopysign3, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 3), align 4
231 store float %fcopysign4, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 4), align 4
232 store float %fcopysign5, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 5), align 4
233 store float %fcopysign6, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 6), align 4
234 store float %fcopysign7, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 7), align 4
238 define void @fcopysign_16f32() #0 {
239 ; SSE-LABEL: @fcopysign_16f32(
240 ; SSE-NEXT: [[TMP1:%.*]] = load <4 x float>, ptr @srcA32, align 4
241 ; SSE-NEXT: [[TMP2:%.*]] = load <4 x float>, ptr @srcB32, align 4
242 ; SSE-NEXT: [[TMP3:%.*]] = call <4 x float> @llvm.copysign.v4f32(<4 x float> [[TMP1]], <4 x float> [[TMP2]])
243 ; SSE-NEXT: store <4 x float> [[TMP3]], ptr @dst32, align 4
244 ; SSE-NEXT: [[TMP4:%.*]] = load <4 x float>, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 4), align 4
245 ; SSE-NEXT: [[TMP5:%.*]] = load <4 x float>, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 4), align 4
246 ; SSE-NEXT: [[TMP6:%.*]] = call <4 x float> @llvm.copysign.v4f32(<4 x float> [[TMP4]], <4 x float> [[TMP5]])
247 ; SSE-NEXT: store <4 x float> [[TMP6]], ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 4), align 4
248 ; SSE-NEXT: [[TMP7:%.*]] = load <4 x float>, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 8), align 4
249 ; SSE-NEXT: [[TMP8:%.*]] = load <4 x float>, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 8), align 4
250 ; SSE-NEXT: [[TMP9:%.*]] = call <4 x float> @llvm.copysign.v4f32(<4 x float> [[TMP7]], <4 x float> [[TMP8]])
251 ; SSE-NEXT: store <4 x float> [[TMP9]], ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 8), align 4
252 ; SSE-NEXT: [[TMP10:%.*]] = load <4 x float>, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 12), align 4
253 ; SSE-NEXT: [[TMP11:%.*]] = load <4 x float>, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 12), align 4
254 ; SSE-NEXT: [[TMP12:%.*]] = call <4 x float> @llvm.copysign.v4f32(<4 x float> [[TMP10]], <4 x float> [[TMP11]])
255 ; SSE-NEXT: store <4 x float> [[TMP12]], ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 12), align 4
258 ; AVX256-LABEL: @fcopysign_16f32(
259 ; AVX256-NEXT: [[TMP1:%.*]] = load <8 x float>, ptr @srcA32, align 4
260 ; AVX256-NEXT: [[TMP2:%.*]] = load <8 x float>, ptr @srcB32, align 4
261 ; AVX256-NEXT: [[TMP3:%.*]] = call <8 x float> @llvm.copysign.v8f32(<8 x float> [[TMP1]], <8 x float> [[TMP2]])
262 ; AVX256-NEXT: store <8 x float> [[TMP3]], ptr @dst32, align 4
263 ; AVX256-NEXT: [[TMP4:%.*]] = load <8 x float>, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 8), align 4
264 ; AVX256-NEXT: [[TMP5:%.*]] = load <8 x float>, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 8), align 4
265 ; AVX256-NEXT: [[TMP6:%.*]] = call <8 x float> @llvm.copysign.v8f32(<8 x float> [[TMP4]], <8 x float> [[TMP5]])
266 ; AVX256-NEXT: store <8 x float> [[TMP6]], ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 8), align 4
267 ; AVX256-NEXT: ret void
269 ; AVX512-LABEL: @fcopysign_16f32(
270 ; AVX512-NEXT: [[TMP1:%.*]] = load <16 x float>, ptr @srcA32, align 4
271 ; AVX512-NEXT: [[TMP2:%.*]] = load <16 x float>, ptr @srcB32, align 4
272 ; AVX512-NEXT: [[TMP3:%.*]] = call <16 x float> @llvm.copysign.v16f32(<16 x float> [[TMP1]], <16 x float> [[TMP2]])
273 ; AVX512-NEXT: store <16 x float> [[TMP3]], ptr @dst32, align 4
274 ; AVX512-NEXT: ret void
276 %a0 = load float, ptr @srcA32, align 4
277 %a1 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 1), align 4
278 %a2 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 2), align 4
279 %a3 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 3), align 4
280 %a4 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 4), align 4
281 %a5 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 5), align 4
282 %a6 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 6), align 4
283 %a7 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 7), align 4
284 %a8 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 8), align 4
285 %a9 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 9), align 4
286 %a10 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 10), align 4
287 %a11 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 11), align 4
288 %a12 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 12), align 4
289 %a13 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 13), align 4
290 %a14 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 14), align 4
291 %a15 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 15), align 4
292 %b0 = load float, ptr @srcB32, align 4
293 %b1 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 1), align 4
294 %b2 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 2), align 4
295 %b3 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 3), align 4
296 %b4 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 4), align 4
297 %b5 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 5), align 4
298 %b6 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 6), align 4
299 %b7 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 7), align 4
300 %b8 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 8), align 4
301 %b9 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 9), align 4
302 %b10 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 10), align 4
303 %b11 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 11), align 4
304 %b12 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 12), align 4
305 %b13 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 13), align 4
306 %b14 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 14), align 4
307 %b15 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 15), align 4
308 %fcopysign0 = call float @llvm.copysign.f32(float %a0 , float %b0 )
309 %fcopysign1 = call float @llvm.copysign.f32(float %a1 , float %b1 )
310 %fcopysign2 = call float @llvm.copysign.f32(float %a2 , float %b2 )
311 %fcopysign3 = call float @llvm.copysign.f32(float %a3 , float %b3 )
312 %fcopysign4 = call float @llvm.copysign.f32(float %a4 , float %b4 )
313 %fcopysign5 = call float @llvm.copysign.f32(float %a5 , float %b5 )
314 %fcopysign6 = call float @llvm.copysign.f32(float %a6 , float %b6 )
315 %fcopysign7 = call float @llvm.copysign.f32(float %a7 , float %b7 )
316 %fcopysign8 = call float @llvm.copysign.f32(float %a8 , float %b8 )
317 %fcopysign9 = call float @llvm.copysign.f32(float %a9 , float %b9 )
318 %fcopysign10 = call float @llvm.copysign.f32(float %a10, float %b10)
319 %fcopysign11 = call float @llvm.copysign.f32(float %a11, float %b11)
320 %fcopysign12 = call float @llvm.copysign.f32(float %a12, float %b12)
321 %fcopysign13 = call float @llvm.copysign.f32(float %a13, float %b13)
322 %fcopysign14 = call float @llvm.copysign.f32(float %a14, float %b14)
323 %fcopysign15 = call float @llvm.copysign.f32(float %a15, float %b15)
324 store float %fcopysign0 , ptr @dst32, align 4
325 store float %fcopysign1 , ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 1), align 4
326 store float %fcopysign2 , ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 2), align 4
327 store float %fcopysign3 , ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 3), align 4
328 store float %fcopysign4 , ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 4), align 4
329 store float %fcopysign5 , ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 5), align 4
330 store float %fcopysign6 , ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 6), align 4
331 store float %fcopysign7 , ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 7), align 4
332 store float %fcopysign8 , ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 8), align 4
333 store float %fcopysign9 , ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 9), align 4
334 store float %fcopysign10, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 10), align 4
335 store float %fcopysign11, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 11), align 4
336 store float %fcopysign12, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 12), align 4
337 store float %fcopysign13, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 13), align 4
338 store float %fcopysign14, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 14), align 4
339 store float %fcopysign15, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 15), align 4
343 attributes #0 = { nounwind }