1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -mtriple=x86_64-unknown -basic-aa -slp-vectorizer -instcombine -S | FileCheck %s --check-prefixes=CHECK,SSE
3 ; RUN: opt < %s -mtriple=x86_64-unknown -mcpu=slm -basic-aa -slp-vectorizer -instcombine -S | FileCheck %s --check-prefixes=CHECK,SLM
4 ; RUN: opt < %s -mtriple=x86_64-unknown -mcpu=corei7-avx -basic-aa -slp-vectorizer -instcombine -S | FileCheck %s --check-prefixes=CHECK,AVX1
5 ; RUN: opt < %s -mtriple=x86_64-unknown -mcpu=core-avx2 -basic-aa -slp-vectorizer -instcombine -S | FileCheck %s --check-prefixes=CHECK,AVX2
6 ; RUN: opt < %s -mtriple=x86_64-unknown -mcpu=knl -basic-aa -slp-vectorizer -instcombine -S | FileCheck %s --check-prefixes=CHECK,AVX512
7 ; RUN: opt < %s -mtriple=x86_64-unknown -mcpu=skx -basic-aa -slp-vectorizer -instcombine -S | FileCheck %s --check-prefixes=CHECK,AVX512
9 define <8 x i32> @add_sub_v8i32(<8 x i32> %a, <8 x i32> %b) {
10 ; CHECK-LABEL: @add_sub_v8i32(
11 ; CHECK-NEXT: [[TMP1:%.*]] = add <8 x i32> [[A:%.*]], [[B:%.*]]
12 ; CHECK-NEXT: [[TMP2:%.*]] = sub <8 x i32> [[A]], [[B]]
13 ; CHECK-NEXT: [[TMP3:%.*]] = shufflevector <8 x i32> [[TMP1]], <8 x i32> [[TMP2]], <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 12, i32 13, i32 14, i32 15>
14 ; CHECK-NEXT: ret <8 x i32> [[TMP3]]
16 %a0 = extractelement <8 x i32> %a, i32 0
17 %a1 = extractelement <8 x i32> %a, i32 1
18 %a2 = extractelement <8 x i32> %a, i32 2
19 %a3 = extractelement <8 x i32> %a, i32 3
20 %a4 = extractelement <8 x i32> %a, i32 4
21 %a5 = extractelement <8 x i32> %a, i32 5
22 %a6 = extractelement <8 x i32> %a, i32 6
23 %a7 = extractelement <8 x i32> %a, i32 7
24 %b0 = extractelement <8 x i32> %b, i32 0
25 %b1 = extractelement <8 x i32> %b, i32 1
26 %b2 = extractelement <8 x i32> %b, i32 2
27 %b3 = extractelement <8 x i32> %b, i32 3
28 %b4 = extractelement <8 x i32> %b, i32 4
29 %b5 = extractelement <8 x i32> %b, i32 5
30 %b6 = extractelement <8 x i32> %b, i32 6
31 %b7 = extractelement <8 x i32> %b, i32 7
32 %ab0 = add i32 %a0, %b0
33 %ab1 = add i32 %a1, %b1
34 %ab2 = add i32 %a2, %b2
35 %ab3 = add i32 %a3, %b3
36 %ab4 = sub i32 %a4, %b4
37 %ab5 = sub i32 %a5, %b5
38 %ab6 = sub i32 %a6, %b6
39 %ab7 = sub i32 %a7, %b7
40 %r0 = insertelement <8 x i32> poison, i32 %ab0, i32 0
41 %r1 = insertelement <8 x i32> %r0, i32 %ab1, i32 1
42 %r2 = insertelement <8 x i32> %r1, i32 %ab2, i32 2
43 %r3 = insertelement <8 x i32> %r2, i32 %ab3, i32 3
44 %r4 = insertelement <8 x i32> %r3, i32 %ab4, i32 4
45 %r5 = insertelement <8 x i32> %r4, i32 %ab5, i32 5
46 %r6 = insertelement <8 x i32> %r5, i32 %ab6, i32 6
47 %r7 = insertelement <8 x i32> %r6, i32 %ab7, i32 7
51 define <4 x i32> @add_and_v4i32(<4 x i32> %a, <4 x i32> %b) {
52 ; CHECK-LABEL: @add_and_v4i32(
53 ; CHECK-NEXT: [[TMP1:%.*]] = add <4 x i32> [[A:%.*]], [[B:%.*]]
54 ; CHECK-NEXT: [[TMP2:%.*]] = and <4 x i32> [[A]], [[B]]
55 ; CHECK-NEXT: [[TMP3:%.*]] = shufflevector <4 x i32> [[TMP1]], <4 x i32> [[TMP2]], <4 x i32> <i32 0, i32 1, i32 6, i32 7>
56 ; CHECK-NEXT: ret <4 x i32> [[TMP3]]
58 %a0 = extractelement <4 x i32> %a, i32 0
59 %a1 = extractelement <4 x i32> %a, i32 1
60 %a2 = extractelement <4 x i32> %a, i32 2
61 %a3 = extractelement <4 x i32> %a, i32 3
62 %b0 = extractelement <4 x i32> %b, i32 0
63 %b1 = extractelement <4 x i32> %b, i32 1
64 %b2 = extractelement <4 x i32> %b, i32 2
65 %b3 = extractelement <4 x i32> %b, i32 3
66 %ab0 = add i32 %a0, %b0
67 %ab1 = add i32 %a1, %b1
68 %ab2 = and i32 %a2, %b2
69 %ab3 = and i32 %a3, %b3
70 %r0 = insertelement <4 x i32> poison, i32 %ab0, i32 0
71 %r1 = insertelement <4 x i32> %r0, i32 %ab1, i32 1
72 %r2 = insertelement <4 x i32> %r1, i32 %ab2, i32 2
73 %r3 = insertelement <4 x i32> %r2, i32 %ab3, i32 3
77 define <4 x i32> @add_mul_v4i32(<4 x i32> %a, <4 x i32> %b) {
78 ; CHECK-LABEL: @add_mul_v4i32(
79 ; CHECK-NEXT: [[TMP1:%.*]] = mul <4 x i32> [[A:%.*]], [[B:%.*]]
80 ; CHECK-NEXT: [[TMP2:%.*]] = add <4 x i32> [[A]], [[B]]
81 ; CHECK-NEXT: [[TMP3:%.*]] = shufflevector <4 x i32> [[TMP1]], <4 x i32> [[TMP2]], <4 x i32> <i32 0, i32 5, i32 6, i32 3>
82 ; CHECK-NEXT: ret <4 x i32> [[TMP3]]
84 %a0 = extractelement <4 x i32> %a, i32 0
85 %a1 = extractelement <4 x i32> %a, i32 1
86 %a2 = extractelement <4 x i32> %a, i32 2
87 %a3 = extractelement <4 x i32> %a, i32 3
88 %b0 = extractelement <4 x i32> %b, i32 0
89 %b1 = extractelement <4 x i32> %b, i32 1
90 %b2 = extractelement <4 x i32> %b, i32 2
91 %b3 = extractelement <4 x i32> %b, i32 3
92 %ab0 = mul i32 %a0, %b0
93 %ab1 = add i32 %a1, %b1
94 %ab2 = add i32 %a2, %b2
95 %ab3 = mul i32 %a3, %b3
96 %r0 = insertelement <4 x i32> poison, i32 %ab0, i32 0
97 %r1 = insertelement <4 x i32> %r0, i32 %ab1, i32 1
98 %r2 = insertelement <4 x i32> %r1, i32 %ab2, i32 2
99 %r3 = insertelement <4 x i32> %r2, i32 %ab3, i32 3
103 define <8 x i32> @ashr_shl_v8i32(<8 x i32> %a, <8 x i32> %b) {
104 ; SSE-LABEL: @ashr_shl_v8i32(
105 ; SSE-NEXT: [[TMP1:%.*]] = ashr <8 x i32> [[A:%.*]], [[B:%.*]]
106 ; SSE-NEXT: [[TMP2:%.*]] = shl <8 x i32> [[A]], [[B]]
107 ; SSE-NEXT: [[TMP3:%.*]] = shufflevector <8 x i32> [[TMP2]], <8 x i32> undef, <4 x i32> <i32 4, i32 5, i32 6, i32 7>
108 ; SSE-NEXT: [[TMP4:%.*]] = shufflevector <4 x i32> [[TMP3]], <4 x i32> poison, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 undef, i32 undef, i32 undef, i32 undef>
109 ; SSE-NEXT: [[R72:%.*]] = shufflevector <8 x i32> [[TMP1]], <8 x i32> [[TMP4]], <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 8, i32 9, i32 10, i32 11>
110 ; SSE-NEXT: ret <8 x i32> [[R72]]
112 ; SLM-LABEL: @ashr_shl_v8i32(
113 ; SLM-NEXT: [[TMP1:%.*]] = ashr <8 x i32> [[A:%.*]], [[B:%.*]]
114 ; SLM-NEXT: [[TMP2:%.*]] = shl <8 x i32> [[A]], [[B]]
115 ; SLM-NEXT: [[TMP3:%.*]] = shufflevector <8 x i32> [[TMP1]], <8 x i32> [[TMP2]], <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 12, i32 13, i32 14, i32 15>
116 ; SLM-NEXT: ret <8 x i32> [[TMP3]]
118 ; AVX1-LABEL: @ashr_shl_v8i32(
119 ; AVX1-NEXT: [[TMP1:%.*]] = ashr <8 x i32> [[A:%.*]], [[B:%.*]]
120 ; AVX1-NEXT: [[TMP2:%.*]] = shl <8 x i32> [[A]], [[B]]
121 ; AVX1-NEXT: [[TMP3:%.*]] = shufflevector <8 x i32> [[TMP1]], <8 x i32> [[TMP2]], <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 12, i32 13, i32 14, i32 15>
122 ; AVX1-NEXT: ret <8 x i32> [[TMP3]]
124 ; AVX2-LABEL: @ashr_shl_v8i32(
125 ; AVX2-NEXT: [[TMP1:%.*]] = ashr <8 x i32> [[A:%.*]], [[B:%.*]]
126 ; AVX2-NEXT: [[TMP2:%.*]] = shl <8 x i32> [[A]], [[B]]
127 ; AVX2-NEXT: [[TMP3:%.*]] = shufflevector <8 x i32> [[TMP1]], <8 x i32> [[TMP2]], <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 12, i32 13, i32 14, i32 15>
128 ; AVX2-NEXT: ret <8 x i32> [[TMP3]]
130 ; AVX512-LABEL: @ashr_shl_v8i32(
131 ; AVX512-NEXT: [[TMP1:%.*]] = ashr <8 x i32> [[A:%.*]], [[B:%.*]]
132 ; AVX512-NEXT: [[TMP2:%.*]] = shl <8 x i32> [[A]], [[B]]
133 ; AVX512-NEXT: [[TMP3:%.*]] = shufflevector <8 x i32> [[TMP1]], <8 x i32> [[TMP2]], <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 12, i32 13, i32 14, i32 15>
134 ; AVX512-NEXT: ret <8 x i32> [[TMP3]]
136 %a0 = extractelement <8 x i32> %a, i32 0
137 %a1 = extractelement <8 x i32> %a, i32 1
138 %a2 = extractelement <8 x i32> %a, i32 2
139 %a3 = extractelement <8 x i32> %a, i32 3
140 %a4 = extractelement <8 x i32> %a, i32 4
141 %a5 = extractelement <8 x i32> %a, i32 5
142 %a6 = extractelement <8 x i32> %a, i32 6
143 %a7 = extractelement <8 x i32> %a, i32 7
144 %b0 = extractelement <8 x i32> %b, i32 0
145 %b1 = extractelement <8 x i32> %b, i32 1
146 %b2 = extractelement <8 x i32> %b, i32 2
147 %b3 = extractelement <8 x i32> %b, i32 3
148 %b4 = extractelement <8 x i32> %b, i32 4
149 %b5 = extractelement <8 x i32> %b, i32 5
150 %b6 = extractelement <8 x i32> %b, i32 6
151 %b7 = extractelement <8 x i32> %b, i32 7
152 %ab0 = ashr i32 %a0, %b0
153 %ab1 = ashr i32 %a1, %b1
154 %ab2 = ashr i32 %a2, %b2
155 %ab3 = ashr i32 %a3, %b3
156 %ab4 = shl i32 %a4, %b4
157 %ab5 = shl i32 %a5, %b5
158 %ab6 = shl i32 %a6, %b6
159 %ab7 = shl i32 %a7, %b7
160 %r0 = insertelement <8 x i32> poison, i32 %ab0, i32 0
161 %r1 = insertelement <8 x i32> %r0, i32 %ab1, i32 1
162 %r2 = insertelement <8 x i32> %r1, i32 %ab2, i32 2
163 %r3 = insertelement <8 x i32> %r2, i32 %ab3, i32 3
164 %r4 = insertelement <8 x i32> %r3, i32 %ab4, i32 4
165 %r5 = insertelement <8 x i32> %r4, i32 %ab5, i32 5
166 %r6 = insertelement <8 x i32> %r5, i32 %ab6, i32 6
167 %r7 = insertelement <8 x i32> %r6, i32 %ab7, i32 7
171 define <8 x i32> @ashr_shl_v8i32_const(<8 x i32> %a) {
172 ; SSE-LABEL: @ashr_shl_v8i32_const(
173 ; SSE-NEXT: [[TMP1:%.*]] = shufflevector <8 x i32> [[A:%.*]], <8 x i32> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
174 ; SSE-NEXT: [[TMP2:%.*]] = ashr <4 x i32> [[TMP1]], <i32 2, i32 2, i32 2, i32 2>
175 ; SSE-NEXT: [[TMP3:%.*]] = shufflevector <8 x i32> [[A]], <8 x i32> undef, <4 x i32> <i32 4, i32 5, i32 6, i32 7>
176 ; SSE-NEXT: [[TMP4:%.*]] = shl <4 x i32> [[TMP3]], <i32 3, i32 3, i32 3, i32 3>
177 ; SSE-NEXT: [[R72:%.*]] = shufflevector <4 x i32> [[TMP2]], <4 x i32> [[TMP4]], <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
178 ; SSE-NEXT: ret <8 x i32> [[R72]]
180 ; SLM-LABEL: @ashr_shl_v8i32_const(
181 ; SLM-NEXT: [[TMP1:%.*]] = ashr <8 x i32> [[A:%.*]], <i32 2, i32 2, i32 2, i32 2, i32 3, i32 3, i32 3, i32 3>
182 ; SLM-NEXT: [[TMP2:%.*]] = shl <8 x i32> [[A]], <i32 2, i32 2, i32 2, i32 2, i32 3, i32 3, i32 3, i32 3>
183 ; SLM-NEXT: [[TMP3:%.*]] = shufflevector <8 x i32> [[TMP1]], <8 x i32> [[TMP2]], <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 12, i32 13, i32 14, i32 15>
184 ; SLM-NEXT: ret <8 x i32> [[TMP3]]
186 ; AVX1-LABEL: @ashr_shl_v8i32_const(
187 ; AVX1-NEXT: [[TMP1:%.*]] = ashr <8 x i32> [[A:%.*]], <i32 2, i32 2, i32 2, i32 2, i32 3, i32 3, i32 3, i32 3>
188 ; AVX1-NEXT: [[TMP2:%.*]] = shl <8 x i32> [[A]], <i32 2, i32 2, i32 2, i32 2, i32 3, i32 3, i32 3, i32 3>
189 ; AVX1-NEXT: [[TMP3:%.*]] = shufflevector <8 x i32> [[TMP1]], <8 x i32> [[TMP2]], <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 12, i32 13, i32 14, i32 15>
190 ; AVX1-NEXT: ret <8 x i32> [[TMP3]]
192 ; AVX2-LABEL: @ashr_shl_v8i32_const(
193 ; AVX2-NEXT: [[TMP1:%.*]] = ashr <8 x i32> [[A:%.*]], <i32 2, i32 2, i32 2, i32 2, i32 3, i32 3, i32 3, i32 3>
194 ; AVX2-NEXT: [[TMP2:%.*]] = shl <8 x i32> [[A]], <i32 2, i32 2, i32 2, i32 2, i32 3, i32 3, i32 3, i32 3>
195 ; AVX2-NEXT: [[TMP3:%.*]] = shufflevector <8 x i32> [[TMP1]], <8 x i32> [[TMP2]], <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 12, i32 13, i32 14, i32 15>
196 ; AVX2-NEXT: ret <8 x i32> [[TMP3]]
198 ; AVX512-LABEL: @ashr_shl_v8i32_const(
199 ; AVX512-NEXT: [[TMP1:%.*]] = ashr <8 x i32> [[A:%.*]], <i32 2, i32 2, i32 2, i32 2, i32 3, i32 3, i32 3, i32 3>
200 ; AVX512-NEXT: [[TMP2:%.*]] = shl <8 x i32> [[A]], <i32 2, i32 2, i32 2, i32 2, i32 3, i32 3, i32 3, i32 3>
201 ; AVX512-NEXT: [[TMP3:%.*]] = shufflevector <8 x i32> [[TMP1]], <8 x i32> [[TMP2]], <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 12, i32 13, i32 14, i32 15>
202 ; AVX512-NEXT: ret <8 x i32> [[TMP3]]
204 %a0 = extractelement <8 x i32> %a, i32 0
205 %a1 = extractelement <8 x i32> %a, i32 1
206 %a2 = extractelement <8 x i32> %a, i32 2
207 %a3 = extractelement <8 x i32> %a, i32 3
208 %a4 = extractelement <8 x i32> %a, i32 4
209 %a5 = extractelement <8 x i32> %a, i32 5
210 %a6 = extractelement <8 x i32> %a, i32 6
211 %a7 = extractelement <8 x i32> %a, i32 7
212 %ab0 = ashr i32 %a0, 2
213 %ab1 = ashr i32 %a1, 2
214 %ab2 = ashr i32 %a2, 2
215 %ab3 = ashr i32 %a3, 2
216 %ab4 = shl i32 %a4, 3
217 %ab5 = shl i32 %a5, 3
218 %ab6 = shl i32 %a6, 3
219 %ab7 = shl i32 %a7, 3
220 %r0 = insertelement <8 x i32> poison, i32 %ab0, i32 0
221 %r1 = insertelement <8 x i32> %r0, i32 %ab1, i32 1
222 %r2 = insertelement <8 x i32> %r1, i32 %ab2, i32 2
223 %r3 = insertelement <8 x i32> %r2, i32 %ab3, i32 3
224 %r4 = insertelement <8 x i32> %r3, i32 %ab4, i32 4
225 %r5 = insertelement <8 x i32> %r4, i32 %ab5, i32 5
226 %r6 = insertelement <8 x i32> %r5, i32 %ab6, i32 6
227 %r7 = insertelement <8 x i32> %r6, i32 %ab7, i32 7
231 define <8 x i32> @ashr_lshr_shl_v8i32(<8 x i32> %a, <8 x i32> %b) {
232 ; SSE-LABEL: @ashr_lshr_shl_v8i32(
233 ; SSE-NEXT: [[A6:%.*]] = extractelement <8 x i32> [[A:%.*]], i32 6
234 ; SSE-NEXT: [[A7:%.*]] = extractelement <8 x i32> [[A]], i32 7
235 ; SSE-NEXT: [[B6:%.*]] = extractelement <8 x i32> [[B:%.*]], i32 6
236 ; SSE-NEXT: [[B7:%.*]] = extractelement <8 x i32> [[B]], i32 7
237 ; SSE-NEXT: [[TMP1:%.*]] = shufflevector <8 x i32> [[A]], <8 x i32> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
238 ; SSE-NEXT: [[TMP2:%.*]] = shufflevector <8 x i32> [[B]], <8 x i32> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
239 ; SSE-NEXT: [[TMP3:%.*]] = ashr <4 x i32> [[TMP1]], [[TMP2]]
240 ; SSE-NEXT: [[TMP4:%.*]] = lshr <4 x i32> [[TMP1]], [[TMP2]]
241 ; SSE-NEXT: [[TMP5:%.*]] = shufflevector <4 x i32> [[TMP3]], <4 x i32> [[TMP4]], <4 x i32> <i32 0, i32 1, i32 6, i32 7>
242 ; SSE-NEXT: [[TMP6:%.*]] = lshr <8 x i32> [[A]], [[B]]
243 ; SSE-NEXT: [[TMP7:%.*]] = shufflevector <8 x i32> [[TMP6]], <8 x i32> undef, <2 x i32> <i32 4, i32 5>
244 ; SSE-NEXT: [[AB6:%.*]] = shl i32 [[A6]], [[B6]]
245 ; SSE-NEXT: [[AB7:%.*]] = shl i32 [[A7]], [[B7]]
246 ; SSE-NEXT: [[R31:%.*]] = shufflevector <4 x i32> [[TMP5]], <4 x i32> poison, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 undef, i32 undef, i32 undef, i32 undef>
247 ; SSE-NEXT: [[TMP8:%.*]] = shufflevector <2 x i32> [[TMP7]], <2 x i32> poison, <8 x i32> <i32 0, i32 1, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
248 ; SSE-NEXT: [[R52:%.*]] = shufflevector <8 x i32> [[R31]], <8 x i32> [[TMP8]], <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 8, i32 9, i32 undef, i32 undef>
249 ; SSE-NEXT: [[R6:%.*]] = insertelement <8 x i32> [[R52]], i32 [[AB6]], i32 6
250 ; SSE-NEXT: [[R7:%.*]] = insertelement <8 x i32> [[R6]], i32 [[AB7]], i32 7
251 ; SSE-NEXT: ret <8 x i32> [[R7]]
253 ; SLM-LABEL: @ashr_lshr_shl_v8i32(
254 ; SLM-NEXT: [[TMP1:%.*]] = shufflevector <8 x i32> [[A:%.*]], <8 x i32> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
255 ; SLM-NEXT: [[TMP2:%.*]] = shufflevector <8 x i32> [[B:%.*]], <8 x i32> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
256 ; SLM-NEXT: [[TMP3:%.*]] = ashr <4 x i32> [[TMP1]], [[TMP2]]
257 ; SLM-NEXT: [[TMP4:%.*]] = lshr <4 x i32> [[TMP1]], [[TMP2]]
258 ; SLM-NEXT: [[TMP5:%.*]] = shufflevector <4 x i32> [[TMP3]], <4 x i32> [[TMP4]], <4 x i32> <i32 0, i32 1, i32 6, i32 7>
259 ; SLM-NEXT: [[TMP6:%.*]] = shufflevector <8 x i32> [[A]], <8 x i32> undef, <4 x i32> <i32 4, i32 5, i32 6, i32 7>
260 ; SLM-NEXT: [[TMP7:%.*]] = shufflevector <8 x i32> [[B]], <8 x i32> undef, <4 x i32> <i32 4, i32 5, i32 6, i32 7>
261 ; SLM-NEXT: [[TMP8:%.*]] = lshr <4 x i32> [[TMP6]], [[TMP7]]
262 ; SLM-NEXT: [[TMP9:%.*]] = shl <4 x i32> [[TMP6]], [[TMP7]]
263 ; SLM-NEXT: [[TMP10:%.*]] = shufflevector <4 x i32> [[TMP8]], <4 x i32> [[TMP9]], <4 x i32> <i32 0, i32 1, i32 6, i32 7>
264 ; SLM-NEXT: [[R72:%.*]] = shufflevector <4 x i32> [[TMP5]], <4 x i32> [[TMP10]], <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
265 ; SLM-NEXT: ret <8 x i32> [[R72]]
267 ; AVX1-LABEL: @ashr_lshr_shl_v8i32(
268 ; AVX1-NEXT: [[TMP1:%.*]] = shufflevector <8 x i32> [[A:%.*]], <8 x i32> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
269 ; AVX1-NEXT: [[TMP2:%.*]] = shufflevector <8 x i32> [[B:%.*]], <8 x i32> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
270 ; AVX1-NEXT: [[TMP3:%.*]] = ashr <4 x i32> [[TMP1]], [[TMP2]]
271 ; AVX1-NEXT: [[TMP4:%.*]] = lshr <4 x i32> [[TMP1]], [[TMP2]]
272 ; AVX1-NEXT: [[TMP5:%.*]] = shufflevector <4 x i32> [[TMP3]], <4 x i32> [[TMP4]], <4 x i32> <i32 0, i32 1, i32 6, i32 7>
273 ; AVX1-NEXT: [[TMP6:%.*]] = shufflevector <8 x i32> [[A]], <8 x i32> undef, <4 x i32> <i32 4, i32 5, i32 6, i32 7>
274 ; AVX1-NEXT: [[TMP7:%.*]] = shufflevector <8 x i32> [[B]], <8 x i32> undef, <4 x i32> <i32 4, i32 5, i32 6, i32 7>
275 ; AVX1-NEXT: [[TMP8:%.*]] = lshr <4 x i32> [[TMP6]], [[TMP7]]
276 ; AVX1-NEXT: [[TMP9:%.*]] = shl <4 x i32> [[TMP6]], [[TMP7]]
277 ; AVX1-NEXT: [[TMP10:%.*]] = shufflevector <4 x i32> [[TMP8]], <4 x i32> [[TMP9]], <4 x i32> <i32 0, i32 1, i32 6, i32 7>
278 ; AVX1-NEXT: [[R72:%.*]] = shufflevector <4 x i32> [[TMP5]], <4 x i32> [[TMP10]], <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
279 ; AVX1-NEXT: ret <8 x i32> [[R72]]
281 ; AVX2-LABEL: @ashr_lshr_shl_v8i32(
282 ; AVX2-NEXT: [[TMP1:%.*]] = shufflevector <8 x i32> [[A:%.*]], <8 x i32> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
283 ; AVX2-NEXT: [[TMP2:%.*]] = shufflevector <8 x i32> [[B:%.*]], <8 x i32> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
284 ; AVX2-NEXT: [[TMP3:%.*]] = ashr <4 x i32> [[TMP1]], [[TMP2]]
285 ; AVX2-NEXT: [[TMP4:%.*]] = lshr <4 x i32> [[TMP1]], [[TMP2]]
286 ; AVX2-NEXT: [[TMP5:%.*]] = shufflevector <4 x i32> [[TMP3]], <4 x i32> [[TMP4]], <4 x i32> <i32 0, i32 1, i32 6, i32 7>
287 ; AVX2-NEXT: [[TMP6:%.*]] = shufflevector <8 x i32> [[A]], <8 x i32> undef, <4 x i32> <i32 4, i32 5, i32 6, i32 7>
288 ; AVX2-NEXT: [[TMP7:%.*]] = shufflevector <8 x i32> [[B]], <8 x i32> undef, <4 x i32> <i32 4, i32 5, i32 6, i32 7>
289 ; AVX2-NEXT: [[TMP8:%.*]] = lshr <4 x i32> [[TMP6]], [[TMP7]]
290 ; AVX2-NEXT: [[TMP9:%.*]] = shl <4 x i32> [[TMP6]], [[TMP7]]
291 ; AVX2-NEXT: [[TMP10:%.*]] = shufflevector <4 x i32> [[TMP8]], <4 x i32> [[TMP9]], <4 x i32> <i32 0, i32 1, i32 6, i32 7>
292 ; AVX2-NEXT: [[R72:%.*]] = shufflevector <4 x i32> [[TMP5]], <4 x i32> [[TMP10]], <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
293 ; AVX2-NEXT: ret <8 x i32> [[R72]]
295 ; AVX512-LABEL: @ashr_lshr_shl_v8i32(
296 ; AVX512-NEXT: [[TMP1:%.*]] = shufflevector <8 x i32> [[A:%.*]], <8 x i32> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
297 ; AVX512-NEXT: [[TMP2:%.*]] = shufflevector <8 x i32> [[B:%.*]], <8 x i32> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
298 ; AVX512-NEXT: [[TMP3:%.*]] = ashr <4 x i32> [[TMP1]], [[TMP2]]
299 ; AVX512-NEXT: [[TMP4:%.*]] = lshr <4 x i32> [[TMP1]], [[TMP2]]
300 ; AVX512-NEXT: [[TMP5:%.*]] = shufflevector <4 x i32> [[TMP3]], <4 x i32> [[TMP4]], <4 x i32> <i32 0, i32 1, i32 6, i32 7>
301 ; AVX512-NEXT: [[TMP6:%.*]] = shufflevector <8 x i32> [[A]], <8 x i32> undef, <4 x i32> <i32 4, i32 5, i32 6, i32 7>
302 ; AVX512-NEXT: [[TMP7:%.*]] = shufflevector <8 x i32> [[B]], <8 x i32> undef, <4 x i32> <i32 4, i32 5, i32 6, i32 7>
303 ; AVX512-NEXT: [[TMP8:%.*]] = lshr <4 x i32> [[TMP6]], [[TMP7]]
304 ; AVX512-NEXT: [[TMP9:%.*]] = shl <4 x i32> [[TMP6]], [[TMP7]]
305 ; AVX512-NEXT: [[TMP10:%.*]] = shufflevector <4 x i32> [[TMP8]], <4 x i32> [[TMP9]], <4 x i32> <i32 0, i32 1, i32 6, i32 7>
306 ; AVX512-NEXT: [[R72:%.*]] = shufflevector <4 x i32> [[TMP5]], <4 x i32> [[TMP10]], <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
307 ; AVX512-NEXT: ret <8 x i32> [[R72]]
309 %a0 = extractelement <8 x i32> %a, i32 0
310 %a1 = extractelement <8 x i32> %a, i32 1
311 %a2 = extractelement <8 x i32> %a, i32 2
312 %a3 = extractelement <8 x i32> %a, i32 3
313 %a4 = extractelement <8 x i32> %a, i32 4
314 %a5 = extractelement <8 x i32> %a, i32 5
315 %a6 = extractelement <8 x i32> %a, i32 6
316 %a7 = extractelement <8 x i32> %a, i32 7
317 %b0 = extractelement <8 x i32> %b, i32 0
318 %b1 = extractelement <8 x i32> %b, i32 1
319 %b2 = extractelement <8 x i32> %b, i32 2
320 %b3 = extractelement <8 x i32> %b, i32 3
321 %b4 = extractelement <8 x i32> %b, i32 4
322 %b5 = extractelement <8 x i32> %b, i32 5
323 %b6 = extractelement <8 x i32> %b, i32 6
324 %b7 = extractelement <8 x i32> %b, i32 7
325 %ab0 = ashr i32 %a0, %b0
326 %ab1 = ashr i32 %a1, %b1
327 %ab2 = lshr i32 %a2, %b2
328 %ab3 = lshr i32 %a3, %b3
329 %ab4 = lshr i32 %a4, %b4
330 %ab5 = lshr i32 %a5, %b5
331 %ab6 = shl i32 %a6, %b6
332 %ab7 = shl i32 %a7, %b7
333 %r0 = insertelement <8 x i32> poison, i32 %ab0, i32 0
334 %r1 = insertelement <8 x i32> %r0, i32 %ab1, i32 1
335 %r2 = insertelement <8 x i32> %r1, i32 %ab2, i32 2
336 %r3 = insertelement <8 x i32> %r2, i32 %ab3, i32 3
337 %r4 = insertelement <8 x i32> %r3, i32 %ab4, i32 4
338 %r5 = insertelement <8 x i32> %r4, i32 %ab5, i32 5
339 %r6 = insertelement <8 x i32> %r5, i32 %ab6, i32 6
340 %r7 = insertelement <8 x i32> %r6, i32 %ab7, i32 7
344 define <8 x i32> @add_v8i32_undefs(<8 x i32> %a) {
345 ; CHECK-LABEL: @add_v8i32_undefs(
346 ; CHECK-NEXT: [[TMP1:%.*]] = add <8 x i32> [[A:%.*]], <i32 undef, i32 4, i32 8, i32 16, i32 undef, i32 4, i32 8, i32 16>
347 ; CHECK-NEXT: ret <8 x i32> [[TMP1]]
349 %a0 = extractelement <8 x i32> %a, i32 0
350 %a1 = extractelement <8 x i32> %a, i32 1
351 %a2 = extractelement <8 x i32> %a, i32 2
352 %a3 = extractelement <8 x i32> %a, i32 3
353 %a4 = extractelement <8 x i32> %a, i32 4
354 %a5 = extractelement <8 x i32> %a, i32 5
355 %a6 = extractelement <8 x i32> %a, i32 6
356 %a7 = extractelement <8 x i32> %a, i32 7
357 %ab0 = add i32 %a0, undef
358 %ab1 = add i32 %a1, 4
359 %ab2 = add i32 %a2, 8
360 %ab3 = add i32 %a3, 16
361 %ab4 = add i32 %a4, undef
362 %ab5 = add i32 %a5, 4
363 %ab6 = add i32 %a6, 8
364 %ab7 = add i32 %a7, 16
365 %r0 = insertelement <8 x i32> poison, i32 %ab0, i32 0
366 %r1 = insertelement <8 x i32> %r0, i32 %ab1, i32 1
367 %r2 = insertelement <8 x i32> %r1, i32 %ab2, i32 2
368 %r3 = insertelement <8 x i32> %r2, i32 %ab3, i32 3
369 %r4 = insertelement <8 x i32> %r3, i32 %ab4, i32 4
370 %r5 = insertelement <8 x i32> %r4, i32 %ab5, i32 5
371 %r6 = insertelement <8 x i32> %r5, i32 %ab6, i32 6
372 %r7 = insertelement <8 x i32> %r6, i32 %ab7, i32 7
376 define <8 x i32> @sdiv_v8i32_undefs(<8 x i32> %a) {
377 ; SSE-LABEL: @sdiv_v8i32_undefs(
378 ; SSE-NEXT: [[A1:%.*]] = extractelement <8 x i32> [[A:%.*]], i32 1
379 ; SSE-NEXT: [[A2:%.*]] = extractelement <8 x i32> [[A]], i32 2
380 ; SSE-NEXT: [[A3:%.*]] = extractelement <8 x i32> [[A]], i32 3
381 ; SSE-NEXT: [[A5:%.*]] = extractelement <8 x i32> [[A]], i32 5
382 ; SSE-NEXT: [[A6:%.*]] = extractelement <8 x i32> [[A]], i32 6
383 ; SSE-NEXT: [[A7:%.*]] = extractelement <8 x i32> [[A]], i32 7
384 ; SSE-NEXT: [[AB1:%.*]] = sdiv i32 [[A1]], 4
385 ; SSE-NEXT: [[AB2:%.*]] = sdiv i32 [[A2]], 8
386 ; SSE-NEXT: [[AB3:%.*]] = sdiv i32 [[A3]], 16
387 ; SSE-NEXT: [[AB5:%.*]] = sdiv i32 [[A5]], 4
388 ; SSE-NEXT: [[AB6:%.*]] = sdiv i32 [[A6]], 8
389 ; SSE-NEXT: [[AB7:%.*]] = sdiv i32 [[A7]], 16
390 ; SSE-NEXT: [[R1:%.*]] = insertelement <8 x i32> poison, i32 [[AB1]], i32 1
391 ; SSE-NEXT: [[R2:%.*]] = insertelement <8 x i32> [[R1]], i32 [[AB2]], i32 2
392 ; SSE-NEXT: [[R3:%.*]] = insertelement <8 x i32> [[R2]], i32 [[AB3]], i32 3
393 ; SSE-NEXT: [[R5:%.*]] = insertelement <8 x i32> [[R3]], i32 [[AB5]], i32 5
394 ; SSE-NEXT: [[R6:%.*]] = insertelement <8 x i32> [[R5]], i32 [[AB6]], i32 6
395 ; SSE-NEXT: [[R7:%.*]] = insertelement <8 x i32> [[R6]], i32 [[AB7]], i32 7
396 ; SSE-NEXT: ret <8 x i32> [[R7]]
398 ; SLM-LABEL: @sdiv_v8i32_undefs(
399 ; SLM-NEXT: [[A1:%.*]] = extractelement <8 x i32> [[A:%.*]], i32 1
400 ; SLM-NEXT: [[A2:%.*]] = extractelement <8 x i32> [[A]], i32 2
401 ; SLM-NEXT: [[A3:%.*]] = extractelement <8 x i32> [[A]], i32 3
402 ; SLM-NEXT: [[A5:%.*]] = extractelement <8 x i32> [[A]], i32 5
403 ; SLM-NEXT: [[A6:%.*]] = extractelement <8 x i32> [[A]], i32 6
404 ; SLM-NEXT: [[A7:%.*]] = extractelement <8 x i32> [[A]], i32 7
405 ; SLM-NEXT: [[AB1:%.*]] = sdiv i32 [[A1]], 4
406 ; SLM-NEXT: [[AB2:%.*]] = sdiv i32 [[A2]], 8
407 ; SLM-NEXT: [[AB3:%.*]] = sdiv i32 [[A3]], 16
408 ; SLM-NEXT: [[AB5:%.*]] = sdiv i32 [[A5]], 4
409 ; SLM-NEXT: [[AB6:%.*]] = sdiv i32 [[A6]], 8
410 ; SLM-NEXT: [[AB7:%.*]] = sdiv i32 [[A7]], 16
411 ; SLM-NEXT: [[R1:%.*]] = insertelement <8 x i32> poison, i32 [[AB1]], i32 1
412 ; SLM-NEXT: [[R2:%.*]] = insertelement <8 x i32> [[R1]], i32 [[AB2]], i32 2
413 ; SLM-NEXT: [[R3:%.*]] = insertelement <8 x i32> [[R2]], i32 [[AB3]], i32 3
414 ; SLM-NEXT: [[R5:%.*]] = insertelement <8 x i32> [[R3]], i32 [[AB5]], i32 5
415 ; SLM-NEXT: [[R6:%.*]] = insertelement <8 x i32> [[R5]], i32 [[AB6]], i32 6
416 ; SLM-NEXT: [[R7:%.*]] = insertelement <8 x i32> [[R6]], i32 [[AB7]], i32 7
417 ; SLM-NEXT: ret <8 x i32> [[R7]]
419 ; AVX1-LABEL: @sdiv_v8i32_undefs(
420 ; AVX1-NEXT: [[A1:%.*]] = extractelement <8 x i32> [[A:%.*]], i32 1
421 ; AVX1-NEXT: [[A2:%.*]] = extractelement <8 x i32> [[A]], i32 2
422 ; AVX1-NEXT: [[A3:%.*]] = extractelement <8 x i32> [[A]], i32 3
423 ; AVX1-NEXT: [[A5:%.*]] = extractelement <8 x i32> [[A]], i32 5
424 ; AVX1-NEXT: [[A6:%.*]] = extractelement <8 x i32> [[A]], i32 6
425 ; AVX1-NEXT: [[A7:%.*]] = extractelement <8 x i32> [[A]], i32 7
426 ; AVX1-NEXT: [[AB1:%.*]] = sdiv i32 [[A1]], 4
427 ; AVX1-NEXT: [[AB2:%.*]] = sdiv i32 [[A2]], 8
428 ; AVX1-NEXT: [[AB3:%.*]] = sdiv i32 [[A3]], 16
429 ; AVX1-NEXT: [[AB5:%.*]] = sdiv i32 [[A5]], 4
430 ; AVX1-NEXT: [[AB6:%.*]] = sdiv i32 [[A6]], 8
431 ; AVX1-NEXT: [[AB7:%.*]] = sdiv i32 [[A7]], 16
432 ; AVX1-NEXT: [[R1:%.*]] = insertelement <8 x i32> poison, i32 [[AB1]], i32 1
433 ; AVX1-NEXT: [[R2:%.*]] = insertelement <8 x i32> [[R1]], i32 [[AB2]], i32 2
434 ; AVX1-NEXT: [[R3:%.*]] = insertelement <8 x i32> [[R2]], i32 [[AB3]], i32 3
435 ; AVX1-NEXT: [[R5:%.*]] = insertelement <8 x i32> [[R3]], i32 [[AB5]], i32 5
436 ; AVX1-NEXT: [[R6:%.*]] = insertelement <8 x i32> [[R5]], i32 [[AB6]], i32 6
437 ; AVX1-NEXT: [[R7:%.*]] = insertelement <8 x i32> [[R6]], i32 [[AB7]], i32 7
438 ; AVX1-NEXT: ret <8 x i32> [[R7]]
440 ; AVX2-LABEL: @sdiv_v8i32_undefs(
441 ; AVX2-NEXT: [[A1:%.*]] = extractelement <8 x i32> [[A:%.*]], i32 1
442 ; AVX2-NEXT: [[A5:%.*]] = extractelement <8 x i32> [[A]], i32 5
443 ; AVX2-NEXT: [[AB1:%.*]] = sdiv i32 [[A1]], 4
444 ; AVX2-NEXT: [[TMP1:%.*]] = shufflevector <8 x i32> [[A]], <8 x i32> undef, <2 x i32> <i32 2, i32 3>
445 ; AVX2-NEXT: [[TMP2:%.*]] = sdiv <2 x i32> [[TMP1]], <i32 8, i32 16>
446 ; AVX2-NEXT: [[AB5:%.*]] = sdiv i32 [[A5]], 4
447 ; AVX2-NEXT: [[TMP3:%.*]] = shufflevector <8 x i32> [[A]], <8 x i32> undef, <2 x i32> <i32 6, i32 7>
448 ; AVX2-NEXT: [[TMP4:%.*]] = sdiv <2 x i32> [[TMP3]], <i32 8, i32 16>
449 ; AVX2-NEXT: [[R1:%.*]] = insertelement <8 x i32> poison, i32 [[AB1]], i32 1
450 ; AVX2-NEXT: [[TMP5:%.*]] = shufflevector <2 x i32> [[TMP2]], <2 x i32> poison, <8 x i32> <i32 0, i32 1, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
451 ; AVX2-NEXT: [[R32:%.*]] = shufflevector <8 x i32> [[R1]], <8 x i32> [[TMP5]], <8 x i32> <i32 undef, i32 1, i32 8, i32 9, i32 undef, i32 undef, i32 undef, i32 undef>
452 ; AVX2-NEXT: [[R5:%.*]] = insertelement <8 x i32> [[R32]], i32 [[AB5]], i32 5
453 ; AVX2-NEXT: [[TMP6:%.*]] = shufflevector <2 x i32> [[TMP4]], <2 x i32> poison, <8 x i32> <i32 0, i32 1, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
454 ; AVX2-NEXT: [[R71:%.*]] = shufflevector <8 x i32> [[R5]], <8 x i32> [[TMP6]], <8 x i32> <i32 undef, i32 1, i32 2, i32 3, i32 undef, i32 5, i32 8, i32 9>
455 ; AVX2-NEXT: ret <8 x i32> [[R71]]
457 ; AVX512-LABEL: @sdiv_v8i32_undefs(
458 ; AVX512-NEXT: [[A1:%.*]] = extractelement <8 x i32> [[A:%.*]], i32 1
459 ; AVX512-NEXT: [[A5:%.*]] = extractelement <8 x i32> [[A]], i32 5
460 ; AVX512-NEXT: [[AB1:%.*]] = sdiv i32 [[A1]], 4
461 ; AVX512-NEXT: [[TMP1:%.*]] = shufflevector <8 x i32> [[A]], <8 x i32> undef, <2 x i32> <i32 2, i32 3>
462 ; AVX512-NEXT: [[TMP2:%.*]] = sdiv <2 x i32> [[TMP1]], <i32 8, i32 16>
463 ; AVX512-NEXT: [[AB5:%.*]] = sdiv i32 [[A5]], 4
464 ; AVX512-NEXT: [[TMP3:%.*]] = shufflevector <8 x i32> [[A]], <8 x i32> undef, <2 x i32> <i32 6, i32 7>
465 ; AVX512-NEXT: [[TMP4:%.*]] = sdiv <2 x i32> [[TMP3]], <i32 8, i32 16>
466 ; AVX512-NEXT: [[R1:%.*]] = insertelement <8 x i32> poison, i32 [[AB1]], i32 1
467 ; AVX512-NEXT: [[TMP5:%.*]] = shufflevector <2 x i32> [[TMP2]], <2 x i32> poison, <8 x i32> <i32 0, i32 1, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
468 ; AVX512-NEXT: [[R32:%.*]] = shufflevector <8 x i32> [[R1]], <8 x i32> [[TMP5]], <8 x i32> <i32 undef, i32 1, i32 8, i32 9, i32 undef, i32 undef, i32 undef, i32 undef>
469 ; AVX512-NEXT: [[R5:%.*]] = insertelement <8 x i32> [[R32]], i32 [[AB5]], i32 5
470 ; AVX512-NEXT: [[TMP6:%.*]] = shufflevector <2 x i32> [[TMP4]], <2 x i32> poison, <8 x i32> <i32 0, i32 1, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
471 ; AVX512-NEXT: [[R71:%.*]] = shufflevector <8 x i32> [[R5]], <8 x i32> [[TMP6]], <8 x i32> <i32 undef, i32 1, i32 2, i32 3, i32 undef, i32 5, i32 8, i32 9>
472 ; AVX512-NEXT: ret <8 x i32> [[R71]]
474 %a0 = extractelement <8 x i32> %a, i32 0
475 %a1 = extractelement <8 x i32> %a, i32 1
476 %a2 = extractelement <8 x i32> %a, i32 2
477 %a3 = extractelement <8 x i32> %a, i32 3
478 %a4 = extractelement <8 x i32> %a, i32 4
479 %a5 = extractelement <8 x i32> %a, i32 5
480 %a6 = extractelement <8 x i32> %a, i32 6
481 %a7 = extractelement <8 x i32> %a, i32 7
482 %ab0 = sdiv i32 %a0, undef
483 %ab1 = sdiv i32 %a1, 4
484 %ab2 = sdiv i32 %a2, 8
485 %ab3 = sdiv i32 %a3, 16
486 %ab4 = sdiv i32 %a4, undef
487 %ab5 = sdiv i32 %a5, 4
488 %ab6 = sdiv i32 %a6, 8
489 %ab7 = sdiv i32 %a7, 16
490 %r0 = insertelement <8 x i32> poison, i32 %ab0, i32 0
491 %r1 = insertelement <8 x i32> %r0, i32 %ab1, i32 1
492 %r2 = insertelement <8 x i32> %r1, i32 %ab2, i32 2
493 %r3 = insertelement <8 x i32> %r2, i32 %ab3, i32 3
494 %r4 = insertelement <8 x i32> %r3, i32 %ab4, i32 4
495 %r5 = insertelement <8 x i32> %r4, i32 %ab5, i32 5
496 %r6 = insertelement <8 x i32> %r5, i32 %ab6, i32 6
497 %r7 = insertelement <8 x i32> %r6, i32 %ab7, i32 7
501 define <8 x i32> @add_sub_v8i32_splat(<8 x i32> %a, i32 %b) {
502 ; CHECK-LABEL: @add_sub_v8i32_splat(
503 ; CHECK-NEXT: [[TMP1:%.*]] = insertelement <8 x i32> poison, i32 [[B:%.*]], i32 0
504 ; CHECK-NEXT: [[TMP2:%.*]] = shufflevector <8 x i32> [[TMP1]], <8 x i32> poison, <8 x i32> zeroinitializer
505 ; CHECK-NEXT: [[TMP3:%.*]] = add <8 x i32> [[TMP2]], [[A:%.*]]
506 ; CHECK-NEXT: [[TMP4:%.*]] = sub <8 x i32> [[TMP2]], [[A]]
507 ; CHECK-NEXT: [[TMP5:%.*]] = shufflevector <8 x i32> [[TMP3]], <8 x i32> [[TMP4]], <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 12, i32 13, i32 14, i32 15>
508 ; CHECK-NEXT: ret <8 x i32> [[TMP5]]
510 %a0 = extractelement <8 x i32> %a, i32 0
511 %a1 = extractelement <8 x i32> %a, i32 1
512 %a2 = extractelement <8 x i32> %a, i32 2
513 %a3 = extractelement <8 x i32> %a, i32 3
514 %a4 = extractelement <8 x i32> %a, i32 4
515 %a5 = extractelement <8 x i32> %a, i32 5
516 %a6 = extractelement <8 x i32> %a, i32 6
517 %a7 = extractelement <8 x i32> %a, i32 7
518 %ab0 = add i32 %a0, %b
519 %ab1 = add i32 %b, %a1
520 %ab2 = add i32 %a2, %b
521 %ab3 = add i32 %b, %a3
522 %ab4 = sub i32 %b, %a4
523 %ab5 = sub i32 %b, %a5
524 %ab6 = sub i32 %b, %a6
525 %ab7 = sub i32 %b, %a7
526 %r0 = insertelement <8 x i32> poison, i32 %ab0, i32 0
527 %r1 = insertelement <8 x i32> %r0, i32 %ab1, i32 1
528 %r2 = insertelement <8 x i32> %r1, i32 %ab2, i32 2
529 %r3 = insertelement <8 x i32> %r2, i32 %ab3, i32 3
530 %r4 = insertelement <8 x i32> %r3, i32 %ab4, i32 4
531 %r5 = insertelement <8 x i32> %r4, i32 %ab5, i32 5
532 %r6 = insertelement <8 x i32> %r5, i32 %ab6, i32 6
533 %r7 = insertelement <8 x i32> %r6, i32 %ab7, i32 7