1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -slp-vectorizer -slp-vectorize-hor -S -mtriple=x86_64-unknown-linux-gnu -mcpu=bdver2 -debug < %s 2>&1 | FileCheck %s --check-prefixes=CHECK,AVX
3 ; RUN: opt -slp-vectorizer -slp-vectorize-hor -S -mtriple=x86_64-unknown-linux-gnu -mcpu=core2 -debug < %s 2>&1 | FileCheck %s --check-prefixes=CHECK,SSE
6 ; int test_add(unsigned int *p) {
8 ; for (int i = 0; i < 8; i++)
13 ; Vector cost is 5, Scalar cost is 7
14 ; AVX: Adding cost -2 for reduction that starts with %7 = load i32, i32* %arrayidx.7, align 4 (It is a splitting reduction)
15 ; Vector cost is 6, Scalar cost is 7
16 ; SSE: Adding cost -1 for reduction that starts with %7 = load i32, i32* %arrayidx.7, align 4 (It is a splitting reduction)
17 define i32 @test_add(i32* nocapture readonly %p) {
18 ; CHECK-LABEL: @test_add(
20 ; CHECK-NEXT: [[ARRAYIDX_1:%.*]] = getelementptr inbounds i32, i32* [[P:%.*]], i64 1
21 ; CHECK-NEXT: [[ARRAYIDX_2:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 2
22 ; CHECK-NEXT: [[ARRAYIDX_3:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 3
23 ; CHECK-NEXT: [[ARRAYIDX_4:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 4
24 ; CHECK-NEXT: [[ARRAYIDX_5:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 5
25 ; CHECK-NEXT: [[ARRAYIDX_6:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 6
26 ; CHECK-NEXT: [[ARRAYIDX_7:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 7
27 ; CHECK-NEXT: [[TMP0:%.*]] = bitcast i32* [[P]] to <8 x i32>*
28 ; CHECK-NEXT: [[TMP1:%.*]] = load <8 x i32>, <8 x i32>* [[TMP0]], align 4
29 ; CHECK-NEXT: [[RDX_SHUF:%.*]] = shufflevector <8 x i32> [[TMP1]], <8 x i32> undef, <8 x i32> <i32 4, i32 5, i32 6, i32 7, i32 undef, i32 undef, i32 undef, i32 undef>
30 ; CHECK-NEXT: [[BIN_RDX:%.*]] = add <8 x i32> [[TMP1]], [[RDX_SHUF]]
31 ; CHECK-NEXT: [[RDX_SHUF1:%.*]] = shufflevector <8 x i32> [[BIN_RDX]], <8 x i32> undef, <8 x i32> <i32 2, i32 3, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
32 ; CHECK-NEXT: [[BIN_RDX2:%.*]] = add <8 x i32> [[BIN_RDX]], [[RDX_SHUF1]]
33 ; CHECK-NEXT: [[RDX_SHUF3:%.*]] = shufflevector <8 x i32> [[BIN_RDX2]], <8 x i32> undef, <8 x i32> <i32 1, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
34 ; CHECK-NEXT: [[BIN_RDX4:%.*]] = add <8 x i32> [[BIN_RDX2]], [[RDX_SHUF3]]
35 ; CHECK-NEXT: [[TMP2:%.*]] = extractelement <8 x i32> [[BIN_RDX4]], i32 0
36 ; CHECK-NEXT: ret i32 [[TMP2]]
39 %0 = load i32, i32* %p, align 4
40 %arrayidx.1 = getelementptr inbounds i32, i32* %p, i64 1
41 %1 = load i32, i32* %arrayidx.1, align 4
42 %mul.18 = add i32 %1, %0
43 %arrayidx.2 = getelementptr inbounds i32, i32* %p, i64 2
44 %2 = load i32, i32* %arrayidx.2, align 4
45 %mul.29 = add i32 %2, %mul.18
46 %arrayidx.3 = getelementptr inbounds i32, i32* %p, i64 3
47 %3 = load i32, i32* %arrayidx.3, align 4
48 %mul.310 = add i32 %3, %mul.29
49 %arrayidx.4 = getelementptr inbounds i32, i32* %p, i64 4
50 %4 = load i32, i32* %arrayidx.4, align 4
51 %mul.411 = add i32 %4, %mul.310
52 %arrayidx.5 = getelementptr inbounds i32, i32* %p, i64 5
53 %5 = load i32, i32* %arrayidx.5, align 4
54 %mul.512 = add i32 %5, %mul.411
55 %arrayidx.6 = getelementptr inbounds i32, i32* %p, i64 6
56 %6 = load i32, i32* %arrayidx.6, align 4
57 %mul.613 = add i32 %6, %mul.512
58 %arrayidx.7 = getelementptr inbounds i32, i32* %p, i64 7
59 %7 = load i32, i32* %arrayidx.7, align 4
60 %mul.714 = add i32 %7, %mul.613
64 ; int test_mul(unsigned int *p) {
66 ; for (int i = 0; i < 8; i++)
71 define i32 @test_mul(i32* nocapture readonly %p) {
72 ; CHECK-LABEL: @test_mul(
74 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[P:%.*]], align 4
75 ; CHECK-NEXT: [[ARRAYIDX_1:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 1
76 ; CHECK-NEXT: [[TMP1:%.*]] = load i32, i32* [[ARRAYIDX_1]], align 4
77 ; CHECK-NEXT: [[MUL_18:%.*]] = mul i32 [[TMP1]], [[TMP0]]
78 ; CHECK-NEXT: [[ARRAYIDX_2:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 2
79 ; CHECK-NEXT: [[TMP2:%.*]] = load i32, i32* [[ARRAYIDX_2]], align 4
80 ; CHECK-NEXT: [[MUL_29:%.*]] = mul i32 [[TMP2]], [[MUL_18]]
81 ; CHECK-NEXT: [[ARRAYIDX_3:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 3
82 ; CHECK-NEXT: [[TMP3:%.*]] = load i32, i32* [[ARRAYIDX_3]], align 4
83 ; CHECK-NEXT: [[MUL_310:%.*]] = mul i32 [[TMP3]], [[MUL_29]]
84 ; CHECK-NEXT: [[ARRAYIDX_4:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 4
85 ; CHECK-NEXT: [[TMP4:%.*]] = load i32, i32* [[ARRAYIDX_4]], align 4
86 ; CHECK-NEXT: [[MUL_411:%.*]] = mul i32 [[TMP4]], [[MUL_310]]
87 ; CHECK-NEXT: [[ARRAYIDX_5:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 5
88 ; CHECK-NEXT: [[TMP5:%.*]] = load i32, i32* [[ARRAYIDX_5]], align 4
89 ; CHECK-NEXT: [[MUL_512:%.*]] = mul i32 [[TMP5]], [[MUL_411]]
90 ; CHECK-NEXT: [[ARRAYIDX_6:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 6
91 ; CHECK-NEXT: [[TMP6:%.*]] = load i32, i32* [[ARRAYIDX_6]], align 4
92 ; CHECK-NEXT: [[MUL_613:%.*]] = mul i32 [[TMP6]], [[MUL_512]]
93 ; CHECK-NEXT: [[ARRAYIDX_7:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 7
94 ; CHECK-NEXT: [[TMP7:%.*]] = load i32, i32* [[ARRAYIDX_7]], align 4
95 ; CHECK-NEXT: [[MUL_714:%.*]] = mul i32 [[TMP7]], [[MUL_613]]
96 ; CHECK-NEXT: ret i32 [[MUL_714]]
99 %0 = load i32, i32* %p, align 4
100 %arrayidx.1 = getelementptr inbounds i32, i32* %p, i64 1
101 %1 = load i32, i32* %arrayidx.1, align 4
102 %mul.18 = mul i32 %1, %0
103 %arrayidx.2 = getelementptr inbounds i32, i32* %p, i64 2
104 %2 = load i32, i32* %arrayidx.2, align 4
105 %mul.29 = mul i32 %2, %mul.18
106 %arrayidx.3 = getelementptr inbounds i32, i32* %p, i64 3
107 %3 = load i32, i32* %arrayidx.3, align 4
108 %mul.310 = mul i32 %3, %mul.29
109 %arrayidx.4 = getelementptr inbounds i32, i32* %p, i64 4
110 %4 = load i32, i32* %arrayidx.4, align 4
111 %mul.411 = mul i32 %4, %mul.310
112 %arrayidx.5 = getelementptr inbounds i32, i32* %p, i64 5
113 %5 = load i32, i32* %arrayidx.5, align 4
114 %mul.512 = mul i32 %5, %mul.411
115 %arrayidx.6 = getelementptr inbounds i32, i32* %p, i64 6
116 %6 = load i32, i32* %arrayidx.6, align 4
117 %mul.613 = mul i32 %6, %mul.512
118 %arrayidx.7 = getelementptr inbounds i32, i32* %p, i64 7
119 %7 = load i32, i32* %arrayidx.7, align 4
120 %mul.714 = mul i32 %7, %mul.613
124 ; int test_and(unsigned int *p) {
126 ; for (int i = 0; i < 8; i++)
131 define i32 @test_and(i32* nocapture readonly %p) {
132 ; CHECK-LABEL: @test_and(
134 ; CHECK-NEXT: [[ARRAYIDX_1:%.*]] = getelementptr inbounds i32, i32* [[P:%.*]], i64 1
135 ; CHECK-NEXT: [[ARRAYIDX_2:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 2
136 ; CHECK-NEXT: [[ARRAYIDX_3:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 3
137 ; CHECK-NEXT: [[ARRAYIDX_4:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 4
138 ; CHECK-NEXT: [[ARRAYIDX_5:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 5
139 ; CHECK-NEXT: [[ARRAYIDX_6:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 6
140 ; CHECK-NEXT: [[ARRAYIDX_7:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 7
141 ; CHECK-NEXT: [[TMP0:%.*]] = bitcast i32* [[P]] to <8 x i32>*
142 ; CHECK-NEXT: [[TMP1:%.*]] = load <8 x i32>, <8 x i32>* [[TMP0]], align 4
143 ; CHECK-NEXT: [[RDX_SHUF:%.*]] = shufflevector <8 x i32> [[TMP1]], <8 x i32> undef, <8 x i32> <i32 4, i32 5, i32 6, i32 7, i32 undef, i32 undef, i32 undef, i32 undef>
144 ; CHECK-NEXT: [[BIN_RDX:%.*]] = and <8 x i32> [[TMP1]], [[RDX_SHUF]]
145 ; CHECK-NEXT: [[RDX_SHUF1:%.*]] = shufflevector <8 x i32> [[BIN_RDX]], <8 x i32> undef, <8 x i32> <i32 2, i32 3, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
146 ; CHECK-NEXT: [[BIN_RDX2:%.*]] = and <8 x i32> [[BIN_RDX]], [[RDX_SHUF1]]
147 ; CHECK-NEXT: [[RDX_SHUF3:%.*]] = shufflevector <8 x i32> [[BIN_RDX2]], <8 x i32> undef, <8 x i32> <i32 1, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
148 ; CHECK-NEXT: [[BIN_RDX4:%.*]] = and <8 x i32> [[BIN_RDX2]], [[RDX_SHUF3]]
149 ; CHECK-NEXT: [[TMP2:%.*]] = extractelement <8 x i32> [[BIN_RDX4]], i32 0
150 ; CHECK-NEXT: ret i32 [[TMP2]]
153 %0 = load i32, i32* %p, align 4
154 %arrayidx.1 = getelementptr inbounds i32, i32* %p, i64 1
155 %1 = load i32, i32* %arrayidx.1, align 4
156 %mul.18 = and i32 %1, %0
157 %arrayidx.2 = getelementptr inbounds i32, i32* %p, i64 2
158 %2 = load i32, i32* %arrayidx.2, align 4
159 %mul.29 = and i32 %2, %mul.18
160 %arrayidx.3 = getelementptr inbounds i32, i32* %p, i64 3
161 %3 = load i32, i32* %arrayidx.3, align 4
162 %mul.310 = and i32 %3, %mul.29
163 %arrayidx.4 = getelementptr inbounds i32, i32* %p, i64 4
164 %4 = load i32, i32* %arrayidx.4, align 4
165 %mul.411 = and i32 %4, %mul.310
166 %arrayidx.5 = getelementptr inbounds i32, i32* %p, i64 5
167 %5 = load i32, i32* %arrayidx.5, align 4
168 %mul.512 = and i32 %5, %mul.411
169 %arrayidx.6 = getelementptr inbounds i32, i32* %p, i64 6
170 %6 = load i32, i32* %arrayidx.6, align 4
171 %mul.613 = and i32 %6, %mul.512
172 %arrayidx.7 = getelementptr inbounds i32, i32* %p, i64 7
173 %7 = load i32, i32* %arrayidx.7, align 4
174 %mul.714 = and i32 %7, %mul.613
178 ; int test_or(unsigned int *p) {
180 ; for (int i = 0; i < 8; i++)
185 define i32 @test_or(i32* nocapture readonly %p) {
186 ; CHECK-LABEL: @test_or(
188 ; CHECK-NEXT: [[ARRAYIDX_1:%.*]] = getelementptr inbounds i32, i32* [[P:%.*]], i64 1
189 ; CHECK-NEXT: [[ARRAYIDX_2:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 2
190 ; CHECK-NEXT: [[ARRAYIDX_3:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 3
191 ; CHECK-NEXT: [[ARRAYIDX_4:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 4
192 ; CHECK-NEXT: [[ARRAYIDX_5:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 5
193 ; CHECK-NEXT: [[ARRAYIDX_6:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 6
194 ; CHECK-NEXT: [[ARRAYIDX_7:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 7
195 ; CHECK-NEXT: [[TMP0:%.*]] = bitcast i32* [[P]] to <8 x i32>*
196 ; CHECK-NEXT: [[TMP1:%.*]] = load <8 x i32>, <8 x i32>* [[TMP0]], align 4
197 ; CHECK-NEXT: [[RDX_SHUF:%.*]] = shufflevector <8 x i32> [[TMP1]], <8 x i32> undef, <8 x i32> <i32 4, i32 5, i32 6, i32 7, i32 undef, i32 undef, i32 undef, i32 undef>
198 ; CHECK-NEXT: [[BIN_RDX:%.*]] = or <8 x i32> [[TMP1]], [[RDX_SHUF]]
199 ; CHECK-NEXT: [[RDX_SHUF1:%.*]] = shufflevector <8 x i32> [[BIN_RDX]], <8 x i32> undef, <8 x i32> <i32 2, i32 3, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
200 ; CHECK-NEXT: [[BIN_RDX2:%.*]] = or <8 x i32> [[BIN_RDX]], [[RDX_SHUF1]]
201 ; CHECK-NEXT: [[RDX_SHUF3:%.*]] = shufflevector <8 x i32> [[BIN_RDX2]], <8 x i32> undef, <8 x i32> <i32 1, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
202 ; CHECK-NEXT: [[BIN_RDX4:%.*]] = or <8 x i32> [[BIN_RDX2]], [[RDX_SHUF3]]
203 ; CHECK-NEXT: [[TMP2:%.*]] = extractelement <8 x i32> [[BIN_RDX4]], i32 0
204 ; CHECK-NEXT: ret i32 [[TMP2]]
207 %0 = load i32, i32* %p, align 4
208 %arrayidx.1 = getelementptr inbounds i32, i32* %p, i64 1
209 %1 = load i32, i32* %arrayidx.1, align 4
210 %mul.18 = or i32 %1, %0
211 %arrayidx.2 = getelementptr inbounds i32, i32* %p, i64 2
212 %2 = load i32, i32* %arrayidx.2, align 4
213 %mul.29 = or i32 %2, %mul.18
214 %arrayidx.3 = getelementptr inbounds i32, i32* %p, i64 3
215 %3 = load i32, i32* %arrayidx.3, align 4
216 %mul.310 = or i32 %3, %mul.29
217 %arrayidx.4 = getelementptr inbounds i32, i32* %p, i64 4
218 %4 = load i32, i32* %arrayidx.4, align 4
219 %mul.411 = or i32 %4, %mul.310
220 %arrayidx.5 = getelementptr inbounds i32, i32* %p, i64 5
221 %5 = load i32, i32* %arrayidx.5, align 4
222 %mul.512 = or i32 %5, %mul.411
223 %arrayidx.6 = getelementptr inbounds i32, i32* %p, i64 6
224 %6 = load i32, i32* %arrayidx.6, align 4
225 %mul.613 = or i32 %6, %mul.512
226 %arrayidx.7 = getelementptr inbounds i32, i32* %p, i64 7
227 %7 = load i32, i32* %arrayidx.7, align 4
228 %mul.714 = or i32 %7, %mul.613
232 ; int test_xor(unsigned int *p) {
234 ; for (int i = 0; i < 8; i++)
239 define i32 @test_xor(i32* nocapture readonly %p) {
240 ; CHECK-LABEL: @test_xor(
242 ; CHECK-NEXT: [[ARRAYIDX_1:%.*]] = getelementptr inbounds i32, i32* [[P:%.*]], i64 1
243 ; CHECK-NEXT: [[ARRAYIDX_2:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 2
244 ; CHECK-NEXT: [[ARRAYIDX_3:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 3
245 ; CHECK-NEXT: [[ARRAYIDX_4:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 4
246 ; CHECK-NEXT: [[ARRAYIDX_5:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 5
247 ; CHECK-NEXT: [[ARRAYIDX_6:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 6
248 ; CHECK-NEXT: [[ARRAYIDX_7:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 7
249 ; CHECK-NEXT: [[TMP0:%.*]] = bitcast i32* [[P]] to <8 x i32>*
250 ; CHECK-NEXT: [[TMP1:%.*]] = load <8 x i32>, <8 x i32>* [[TMP0]], align 4
251 ; CHECK-NEXT: [[RDX_SHUF:%.*]] = shufflevector <8 x i32> [[TMP1]], <8 x i32> undef, <8 x i32> <i32 4, i32 5, i32 6, i32 7, i32 undef, i32 undef, i32 undef, i32 undef>
252 ; CHECK-NEXT: [[BIN_RDX:%.*]] = xor <8 x i32> [[TMP1]], [[RDX_SHUF]]
253 ; CHECK-NEXT: [[RDX_SHUF1:%.*]] = shufflevector <8 x i32> [[BIN_RDX]], <8 x i32> undef, <8 x i32> <i32 2, i32 3, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
254 ; CHECK-NEXT: [[BIN_RDX2:%.*]] = xor <8 x i32> [[BIN_RDX]], [[RDX_SHUF1]]
255 ; CHECK-NEXT: [[RDX_SHUF3:%.*]] = shufflevector <8 x i32> [[BIN_RDX2]], <8 x i32> undef, <8 x i32> <i32 1, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
256 ; CHECK-NEXT: [[BIN_RDX4:%.*]] = xor <8 x i32> [[BIN_RDX2]], [[RDX_SHUF3]]
257 ; CHECK-NEXT: [[TMP2:%.*]] = extractelement <8 x i32> [[BIN_RDX4]], i32 0
258 ; CHECK-NEXT: ret i32 [[TMP2]]
261 %0 = load i32, i32* %p, align 4
262 %arrayidx.1 = getelementptr inbounds i32, i32* %p, i64 1
263 %1 = load i32, i32* %arrayidx.1, align 4
264 %mul.18 = xor i32 %1, %0
265 %arrayidx.2 = getelementptr inbounds i32, i32* %p, i64 2
266 %2 = load i32, i32* %arrayidx.2, align 4
267 %mul.29 = xor i32 %2, %mul.18
268 %arrayidx.3 = getelementptr inbounds i32, i32* %p, i64 3
269 %3 = load i32, i32* %arrayidx.3, align 4
270 %mul.310 = xor i32 %3, %mul.29
271 %arrayidx.4 = getelementptr inbounds i32, i32* %p, i64 4
272 %4 = load i32, i32* %arrayidx.4, align 4
273 %mul.411 = xor i32 %4, %mul.310
274 %arrayidx.5 = getelementptr inbounds i32, i32* %p, i64 5
275 %5 = load i32, i32* %arrayidx.5, align 4
276 %mul.512 = xor i32 %5, %mul.411
277 %arrayidx.6 = getelementptr inbounds i32, i32* %p, i64 6
278 %6 = load i32, i32* %arrayidx.6, align 4
279 %mul.613 = xor i32 %6, %mul.512
280 %arrayidx.7 = getelementptr inbounds i32, i32* %p, i64 7
281 %7 = load i32, i32* %arrayidx.7, align 4
282 %mul.714 = xor i32 %7, %mul.613
286 define i32 @PR37731(<4 x i32>* noalias nocapture dereferenceable(16) %self) unnamed_addr #0 {
287 ; CHECK-LABEL: @PR37731(
289 ; CHECK-NEXT: [[TMP0:%.*]] = load <4 x i32>, <4 x i32>* [[SELF:%.*]], align 16
290 ; CHECK-NEXT: [[TMP1:%.*]] = shl <4 x i32> [[TMP0]], <i32 6, i32 2, i32 13, i32 3>
291 ; CHECK-NEXT: [[TMP2:%.*]] = xor <4 x i32> [[TMP1]], [[TMP0]]
292 ; CHECK-NEXT: [[TMP3:%.*]] = lshr <4 x i32> [[TMP2]], <i32 13, i32 27, i32 21, i32 12>
293 ; CHECK-NEXT: [[TMP4:%.*]] = and <4 x i32> [[TMP0]], <i32 -2, i32 -8, i32 -16, i32 -128>
294 ; CHECK-NEXT: [[TMP5:%.*]] = shl <4 x i32> [[TMP4]], <i32 18, i32 2, i32 7, i32 13>
295 ; CHECK-NEXT: [[TMP6:%.*]] = xor <4 x i32> [[TMP3]], [[TMP5]]
296 ; CHECK-NEXT: store <4 x i32> [[TMP6]], <4 x i32>* [[SELF]], align 16
297 ; CHECK-NEXT: [[RDX_SHUF:%.*]] = shufflevector <4 x i32> [[TMP6]], <4 x i32> undef, <4 x i32> <i32 2, i32 3, i32 undef, i32 undef>
298 ; CHECK-NEXT: [[BIN_RDX:%.*]] = xor <4 x i32> [[TMP6]], [[RDX_SHUF]]
299 ; CHECK-NEXT: [[RDX_SHUF1:%.*]] = shufflevector <4 x i32> [[BIN_RDX]], <4 x i32> undef, <4 x i32> <i32 1, i32 undef, i32 undef, i32 undef>
300 ; CHECK-NEXT: [[BIN_RDX2:%.*]] = xor <4 x i32> [[BIN_RDX]], [[RDX_SHUF1]]
301 ; CHECK-NEXT: [[TMP7:%.*]] = extractelement <4 x i32> [[BIN_RDX2]], i32 0
302 ; CHECK-NEXT: ret i32 [[TMP7]]
305 %0 = load <4 x i32>, <4 x i32>* %self, align 16
306 %1 = shl <4 x i32> %0, <i32 6, i32 2, i32 13, i32 3>
307 %2 = xor <4 x i32> %1, %0
308 %3 = lshr <4 x i32> %2, <i32 13, i32 27, i32 21, i32 12>
309 %4 = and <4 x i32> %0, <i32 -2, i32 -8, i32 -16, i32 -128>
310 %5 = shl <4 x i32> %4, <i32 18, i32 2, i32 7, i32 13>
311 %6 = xor <4 x i32> %3, %5
312 store <4 x i32> %6, <4 x i32>* %self, align 16
313 %7 = extractelement <4 x i32> %6, i32 0
314 %8 = extractelement <4 x i32> %6, i32 1
316 %10 = extractelement <4 x i32> %6, i32 2
317 %11 = xor i32 %9, %10
318 %12 = extractelement <4 x i32> %6, i32 3
319 %13 = xor i32 %11, %12