1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -mtriple=x86_64-unknown -passes=slp-vectorizer,instcombine -S | FileCheck %s --check-prefixes=CHECK,SSE
3 ; RUN: opt < %s -mtriple=x86_64-unknown -mcpu=slm -passes=slp-vectorizer,instcombine -S | FileCheck %s --check-prefixes=CHECK,SLM
4 ; RUN: opt < %s -mtriple=x86_64-unknown -mcpu=corei7-avx -passes=slp-vectorizer,instcombine -S | FileCheck %s --check-prefixes=CHECK,AVX1
5 ; RUN: opt < %s -mtriple=x86_64-unknown -mcpu=core-avx2 -passes=slp-vectorizer,instcombine -S | FileCheck %s --check-prefixes=CHECK,AVX2
6 ; RUN: opt < %s -mtriple=x86_64-unknown -mcpu=knl -passes=slp-vectorizer,instcombine -S | FileCheck %s --check-prefixes=CHECK,AVX512
7 ; RUN: opt < %s -mtriple=x86_64-unknown -mcpu=skx -passes=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> poison, <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 poison, i32 poison, i32 poison, i32 poison>
109 ; SSE-NEXT: [[R71:%.*]] = 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> [[R71]]
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> poison, <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> poison, <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: [[R71:%.*]] = 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> [[R71]]
180 ; SLM-LABEL: @ashr_shl_v8i32_const(
181 ; SLM-NEXT: [[TMP1:%.*]] = shufflevector <8 x i32> [[A:%.*]], <8 x i32> poison, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
182 ; SLM-NEXT: [[TMP2:%.*]] = ashr <4 x i32> [[TMP1]], <i32 2, i32 2, i32 2, i32 2>
183 ; SLM-NEXT: [[TMP3:%.*]] = shufflevector <8 x i32> [[A]], <8 x i32> poison, <4 x i32> <i32 4, i32 5, i32 6, i32 7>
184 ; SLM-NEXT: [[TMP4:%.*]] = shl <4 x i32> [[TMP3]], <i32 3, i32 3, i32 3, i32 3>
185 ; SLM-NEXT: [[R71:%.*]] = 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>
186 ; SLM-NEXT: ret <8 x i32> [[R71]]
188 ; AVX1-LABEL: @ashr_shl_v8i32_const(
189 ; AVX1-NEXT: [[TMP1:%.*]] = ashr <8 x i32> [[A:%.*]], <i32 2, i32 2, i32 2, i32 2, i32 3, i32 3, i32 3, i32 3>
190 ; AVX1-NEXT: [[TMP2:%.*]] = shl <8 x i32> [[A]], <i32 2, i32 2, i32 2, i32 2, i32 3, i32 3, i32 3, i32 3>
191 ; 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>
192 ; AVX1-NEXT: ret <8 x i32> [[TMP3]]
194 ; AVX2-LABEL: @ashr_shl_v8i32_const(
195 ; AVX2-NEXT: [[TMP1:%.*]] = ashr <8 x i32> [[A:%.*]], <i32 2, i32 2, i32 2, i32 2, i32 3, i32 3, i32 3, i32 3>
196 ; AVX2-NEXT: [[TMP2:%.*]] = shl <8 x i32> [[A]], <i32 2, i32 2, i32 2, i32 2, i32 3, i32 3, i32 3, i32 3>
197 ; 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>
198 ; AVX2-NEXT: ret <8 x i32> [[TMP3]]
200 ; AVX512-LABEL: @ashr_shl_v8i32_const(
201 ; AVX512-NEXT: [[TMP1:%.*]] = ashr <8 x i32> [[A:%.*]], <i32 2, i32 2, i32 2, i32 2, i32 3, i32 3, i32 3, i32 3>
202 ; AVX512-NEXT: [[TMP2:%.*]] = shl <8 x i32> [[A]], <i32 2, i32 2, i32 2, i32 2, i32 3, i32 3, i32 3, i32 3>
203 ; 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>
204 ; AVX512-NEXT: ret <8 x i32> [[TMP3]]
206 %a0 = extractelement <8 x i32> %a, i32 0
207 %a1 = extractelement <8 x i32> %a, i32 1
208 %a2 = extractelement <8 x i32> %a, i32 2
209 %a3 = extractelement <8 x i32> %a, i32 3
210 %a4 = extractelement <8 x i32> %a, i32 4
211 %a5 = extractelement <8 x i32> %a, i32 5
212 %a6 = extractelement <8 x i32> %a, i32 6
213 %a7 = extractelement <8 x i32> %a, i32 7
214 %ab0 = ashr i32 %a0, 2
215 %ab1 = ashr i32 %a1, 2
216 %ab2 = ashr i32 %a2, 2
217 %ab3 = ashr i32 %a3, 2
218 %ab4 = shl i32 %a4, 3
219 %ab5 = shl i32 %a5, 3
220 %ab6 = shl i32 %a6, 3
221 %ab7 = shl i32 %a7, 3
222 %r0 = insertelement <8 x i32> poison, i32 %ab0, i32 0
223 %r1 = insertelement <8 x i32> %r0, i32 %ab1, i32 1
224 %r2 = insertelement <8 x i32> %r1, i32 %ab2, i32 2
225 %r3 = insertelement <8 x i32> %r2, i32 %ab3, i32 3
226 %r4 = insertelement <8 x i32> %r3, i32 %ab4, i32 4
227 %r5 = insertelement <8 x i32> %r4, i32 %ab5, i32 5
228 %r6 = insertelement <8 x i32> %r5, i32 %ab6, i32 6
229 %r7 = insertelement <8 x i32> %r6, i32 %ab7, i32 7
233 define <8 x i32> @ashr_lshr_shl_v8i32(<8 x i32> %a, <8 x i32> %b) {
234 ; SSE-LABEL: @ashr_lshr_shl_v8i32(
235 ; SSE-NEXT: [[A6:%.*]] = extractelement <8 x i32> [[A:%.*]], i64 6
236 ; SSE-NEXT: [[A7:%.*]] = extractelement <8 x i32> [[A]], i64 7
237 ; SSE-NEXT: [[B6:%.*]] = extractelement <8 x i32> [[B:%.*]], i64 6
238 ; SSE-NEXT: [[B7:%.*]] = extractelement <8 x i32> [[B]], i64 7
239 ; SSE-NEXT: [[TMP1:%.*]] = shufflevector <8 x i32> [[A]], <8 x i32> poison, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
240 ; SSE-NEXT: [[TMP2:%.*]] = shufflevector <8 x i32> [[B]], <8 x i32> poison, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
241 ; SSE-NEXT: [[TMP3:%.*]] = ashr <4 x i32> [[TMP1]], [[TMP2]]
242 ; SSE-NEXT: [[TMP4:%.*]] = lshr <4 x i32> [[TMP1]], [[TMP2]]
243 ; SSE-NEXT: [[TMP5:%.*]] = shufflevector <4 x i32> [[TMP3]], <4 x i32> [[TMP4]], <4 x i32> <i32 0, i32 1, i32 6, i32 7>
244 ; SSE-NEXT: [[TMP6:%.*]] = lshr <8 x i32> [[A]], [[B]]
245 ; SSE-NEXT: [[TMP7:%.*]] = shufflevector <8 x i32> [[TMP6]], <8 x i32> poison, <2 x i32> <i32 4, i32 5>
246 ; SSE-NEXT: [[AB6:%.*]] = shl i32 [[A6]], [[B6]]
247 ; SSE-NEXT: [[AB7:%.*]] = shl i32 [[A7]], [[B7]]
248 ; SSE-NEXT: [[TMP8:%.*]] = shufflevector <4 x i32> [[TMP5]], <4 x i32> poison, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 poison, i32 poison, i32 poison, i32 poison>
249 ; SSE-NEXT: [[TMP9:%.*]] = shufflevector <2 x i32> [[TMP7]], <2 x i32> poison, <8 x i32> <i32 0, i32 1, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison>
250 ; SSE-NEXT: [[R51:%.*]] = shufflevector <8 x i32> [[TMP8]], <8 x i32> [[TMP9]], <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 8, i32 9, i32 poison, i32 poison>
251 ; SSE-NEXT: [[R6:%.*]] = insertelement <8 x i32> [[R51]], i32 [[AB6]], i64 6
252 ; SSE-NEXT: [[R7:%.*]] = insertelement <8 x i32> [[R6]], i32 [[AB7]], i64 7
253 ; SSE-NEXT: ret <8 x i32> [[R7]]
255 ; SLM-LABEL: @ashr_lshr_shl_v8i32(
256 ; SLM-NEXT: [[TMP1:%.*]] = shufflevector <8 x i32> [[A:%.*]], <8 x i32> poison, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
257 ; SLM-NEXT: [[TMP2:%.*]] = shufflevector <8 x i32> [[B:%.*]], <8 x i32> poison, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
258 ; SLM-NEXT: [[TMP3:%.*]] = ashr <4 x i32> [[TMP1]], [[TMP2]]
259 ; SLM-NEXT: [[TMP4:%.*]] = lshr <4 x i32> [[TMP1]], [[TMP2]]
260 ; SLM-NEXT: [[TMP5:%.*]] = shufflevector <4 x i32> [[TMP3]], <4 x i32> [[TMP4]], <4 x i32> <i32 0, i32 1, i32 6, i32 7>
261 ; SLM-NEXT: [[TMP6:%.*]] = shufflevector <8 x i32> [[A]], <8 x i32> poison, <4 x i32> <i32 4, i32 5, i32 6, i32 7>
262 ; SLM-NEXT: [[TMP7:%.*]] = shufflevector <8 x i32> [[B]], <8 x i32> poison, <4 x i32> <i32 4, i32 5, i32 6, i32 7>
263 ; SLM-NEXT: [[TMP8:%.*]] = lshr <4 x i32> [[TMP6]], [[TMP7]]
264 ; SLM-NEXT: [[TMP9:%.*]] = shl <4 x i32> [[TMP6]], [[TMP7]]
265 ; SLM-NEXT: [[TMP10:%.*]] = shufflevector <4 x i32> [[TMP8]], <4 x i32> [[TMP9]], <4 x i32> <i32 0, i32 1, i32 6, i32 7>
266 ; SLM-NEXT: [[R71:%.*]] = 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>
267 ; SLM-NEXT: ret <8 x i32> [[R71]]
269 ; AVX1-LABEL: @ashr_lshr_shl_v8i32(
270 ; AVX1-NEXT: [[TMP1:%.*]] = shufflevector <8 x i32> [[A:%.*]], <8 x i32> poison, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
271 ; AVX1-NEXT: [[TMP2:%.*]] = shufflevector <8 x i32> [[B:%.*]], <8 x i32> poison, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
272 ; AVX1-NEXT: [[TMP3:%.*]] = ashr <4 x i32> [[TMP1]], [[TMP2]]
273 ; AVX1-NEXT: [[TMP4:%.*]] = lshr <4 x i32> [[TMP1]], [[TMP2]]
274 ; AVX1-NEXT: [[TMP5:%.*]] = shufflevector <4 x i32> [[TMP3]], <4 x i32> [[TMP4]], <4 x i32> <i32 0, i32 1, i32 6, i32 7>
275 ; AVX1-NEXT: [[TMP6:%.*]] = shufflevector <8 x i32> [[A]], <8 x i32> poison, <4 x i32> <i32 4, i32 5, i32 6, i32 7>
276 ; AVX1-NEXT: [[TMP7:%.*]] = shufflevector <8 x i32> [[B]], <8 x i32> poison, <4 x i32> <i32 4, i32 5, i32 6, i32 7>
277 ; AVX1-NEXT: [[TMP8:%.*]] = lshr <4 x i32> [[TMP6]], [[TMP7]]
278 ; AVX1-NEXT: [[TMP9:%.*]] = shl <4 x i32> [[TMP6]], [[TMP7]]
279 ; AVX1-NEXT: [[TMP10:%.*]] = shufflevector <4 x i32> [[TMP8]], <4 x i32> [[TMP9]], <4 x i32> <i32 0, i32 1, i32 6, i32 7>
280 ; AVX1-NEXT: [[R71:%.*]] = 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>
281 ; AVX1-NEXT: ret <8 x i32> [[R71]]
283 ; AVX2-LABEL: @ashr_lshr_shl_v8i32(
284 ; AVX2-NEXT: [[TMP1:%.*]] = shufflevector <8 x i32> [[A:%.*]], <8 x i32> poison, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
285 ; AVX2-NEXT: [[TMP2:%.*]] = shufflevector <8 x i32> [[B:%.*]], <8 x i32> poison, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
286 ; AVX2-NEXT: [[TMP3:%.*]] = ashr <4 x i32> [[TMP1]], [[TMP2]]
287 ; AVX2-NEXT: [[TMP4:%.*]] = lshr <4 x i32> [[TMP1]], [[TMP2]]
288 ; AVX2-NEXT: [[TMP5:%.*]] = shufflevector <4 x i32> [[TMP3]], <4 x i32> [[TMP4]], <4 x i32> <i32 0, i32 1, i32 6, i32 7>
289 ; AVX2-NEXT: [[TMP6:%.*]] = shufflevector <8 x i32> [[A]], <8 x i32> poison, <4 x i32> <i32 4, i32 5, i32 6, i32 7>
290 ; AVX2-NEXT: [[TMP7:%.*]] = shufflevector <8 x i32> [[B]], <8 x i32> poison, <4 x i32> <i32 4, i32 5, i32 6, i32 7>
291 ; AVX2-NEXT: [[TMP8:%.*]] = lshr <4 x i32> [[TMP6]], [[TMP7]]
292 ; AVX2-NEXT: [[TMP9:%.*]] = shl <4 x i32> [[TMP6]], [[TMP7]]
293 ; AVX2-NEXT: [[TMP10:%.*]] = shufflevector <4 x i32> [[TMP8]], <4 x i32> [[TMP9]], <4 x i32> <i32 0, i32 1, i32 6, i32 7>
294 ; AVX2-NEXT: [[R71:%.*]] = 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>
295 ; AVX2-NEXT: ret <8 x i32> [[R71]]
297 ; AVX512-LABEL: @ashr_lshr_shl_v8i32(
298 ; AVX512-NEXT: [[TMP1:%.*]] = shufflevector <8 x i32> [[A:%.*]], <8 x i32> poison, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
299 ; AVX512-NEXT: [[TMP2:%.*]] = shufflevector <8 x i32> [[B:%.*]], <8 x i32> poison, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
300 ; AVX512-NEXT: [[TMP3:%.*]] = ashr <4 x i32> [[TMP1]], [[TMP2]]
301 ; AVX512-NEXT: [[TMP4:%.*]] = lshr <4 x i32> [[TMP1]], [[TMP2]]
302 ; AVX512-NEXT: [[TMP5:%.*]] = shufflevector <4 x i32> [[TMP3]], <4 x i32> [[TMP4]], <4 x i32> <i32 0, i32 1, i32 6, i32 7>
303 ; AVX512-NEXT: [[TMP6:%.*]] = shufflevector <8 x i32> [[A]], <8 x i32> poison, <4 x i32> <i32 4, i32 5, i32 6, i32 7>
304 ; AVX512-NEXT: [[TMP7:%.*]] = shufflevector <8 x i32> [[B]], <8 x i32> poison, <4 x i32> <i32 4, i32 5, i32 6, i32 7>
305 ; AVX512-NEXT: [[TMP8:%.*]] = lshr <4 x i32> [[TMP6]], [[TMP7]]
306 ; AVX512-NEXT: [[TMP9:%.*]] = shl <4 x i32> [[TMP6]], [[TMP7]]
307 ; AVX512-NEXT: [[TMP10:%.*]] = shufflevector <4 x i32> [[TMP8]], <4 x i32> [[TMP9]], <4 x i32> <i32 0, i32 1, i32 6, i32 7>
308 ; AVX512-NEXT: [[R71:%.*]] = 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>
309 ; AVX512-NEXT: ret <8 x i32> [[R71]]
311 %a0 = extractelement <8 x i32> %a, i32 0
312 %a1 = extractelement <8 x i32> %a, i32 1
313 %a2 = extractelement <8 x i32> %a, i32 2
314 %a3 = extractelement <8 x i32> %a, i32 3
315 %a4 = extractelement <8 x i32> %a, i32 4
316 %a5 = extractelement <8 x i32> %a, i32 5
317 %a6 = extractelement <8 x i32> %a, i32 6
318 %a7 = extractelement <8 x i32> %a, i32 7
319 %b0 = extractelement <8 x i32> %b, i32 0
320 %b1 = extractelement <8 x i32> %b, i32 1
321 %b2 = extractelement <8 x i32> %b, i32 2
322 %b3 = extractelement <8 x i32> %b, i32 3
323 %b4 = extractelement <8 x i32> %b, i32 4
324 %b5 = extractelement <8 x i32> %b, i32 5
325 %b6 = extractelement <8 x i32> %b, i32 6
326 %b7 = extractelement <8 x i32> %b, i32 7
327 %ab0 = ashr i32 %a0, %b0
328 %ab1 = ashr i32 %a1, %b1
329 %ab2 = lshr i32 %a2, %b2
330 %ab3 = lshr i32 %a3, %b3
331 %ab4 = lshr i32 %a4, %b4
332 %ab5 = lshr i32 %a5, %b5
333 %ab6 = shl i32 %a6, %b6
334 %ab7 = shl i32 %a7, %b7
335 %r0 = insertelement <8 x i32> poison, i32 %ab0, i32 0
336 %r1 = insertelement <8 x i32> %r0, i32 %ab1, i32 1
337 %r2 = insertelement <8 x i32> %r1, i32 %ab2, i32 2
338 %r3 = insertelement <8 x i32> %r2, i32 %ab3, i32 3
339 %r4 = insertelement <8 x i32> %r3, i32 %ab4, i32 4
340 %r5 = insertelement <8 x i32> %r4, i32 %ab5, i32 5
341 %r6 = insertelement <8 x i32> %r5, i32 %ab6, i32 6
342 %r7 = insertelement <8 x i32> %r6, i32 %ab7, i32 7
346 define <8 x i32> @add_v8i32_undefs(<8 x i32> %a) {
347 ; CHECK-LABEL: @add_v8i32_undefs(
348 ; CHECK-NEXT: [[TMP1:%.*]] = add <8 x i32> [[A:%.*]], <i32 undef, i32 4, i32 8, i32 16, i32 undef, i32 4, i32 8, i32 16>
349 ; CHECK-NEXT: ret <8 x i32> [[TMP1]]
351 %a0 = extractelement <8 x i32> %a, i32 0
352 %a1 = extractelement <8 x i32> %a, i32 1
353 %a2 = extractelement <8 x i32> %a, i32 2
354 %a3 = extractelement <8 x i32> %a, i32 3
355 %a4 = extractelement <8 x i32> %a, i32 4
356 %a5 = extractelement <8 x i32> %a, i32 5
357 %a6 = extractelement <8 x i32> %a, i32 6
358 %a7 = extractelement <8 x i32> %a, i32 7
359 %ab0 = add i32 %a0, undef
360 %ab1 = add i32 %a1, 4
361 %ab2 = add i32 %a2, 8
362 %ab3 = add i32 %a3, 16
363 %ab4 = add i32 %a4, undef
364 %ab5 = add i32 %a5, 4
365 %ab6 = add i32 %a6, 8
366 %ab7 = add i32 %a7, 16
367 %r0 = insertelement <8 x i32> poison, i32 %ab0, i32 0
368 %r1 = insertelement <8 x i32> %r0, i32 %ab1, i32 1
369 %r2 = insertelement <8 x i32> %r1, i32 %ab2, i32 2
370 %r3 = insertelement <8 x i32> %r2, i32 %ab3, i32 3
371 %r4 = insertelement <8 x i32> %r3, i32 %ab4, i32 4
372 %r5 = insertelement <8 x i32> %r4, i32 %ab5, i32 5
373 %r6 = insertelement <8 x i32> %r5, i32 %ab6, i32 6
374 %r7 = insertelement <8 x i32> %r6, i32 %ab7, i32 7
378 define <8 x i32> @sdiv_v8i32_undefs(<8 x i32> %a) {
379 ; SSE-LABEL: @sdiv_v8i32_undefs(
380 ; SSE-NEXT: [[A1:%.*]] = extractelement <8 x i32> [[A:%.*]], i64 1
381 ; SSE-NEXT: [[A2:%.*]] = extractelement <8 x i32> [[A]], i64 2
382 ; SSE-NEXT: [[A3:%.*]] = extractelement <8 x i32> [[A]], i64 3
383 ; SSE-NEXT: [[A5:%.*]] = extractelement <8 x i32> [[A]], i64 5
384 ; SSE-NEXT: [[A6:%.*]] = extractelement <8 x i32> [[A]], i64 6
385 ; SSE-NEXT: [[A7:%.*]] = extractelement <8 x i32> [[A]], i64 7
386 ; SSE-NEXT: [[AB1:%.*]] = sdiv i32 [[A1]], 4
387 ; SSE-NEXT: [[AB2:%.*]] = sdiv i32 [[A2]], 8
388 ; SSE-NEXT: [[AB3:%.*]] = sdiv i32 [[A3]], 16
389 ; SSE-NEXT: [[AB5:%.*]] = sdiv i32 [[A5]], 4
390 ; SSE-NEXT: [[AB6:%.*]] = sdiv i32 [[A6]], 8
391 ; SSE-NEXT: [[AB7:%.*]] = sdiv i32 [[A7]], 16
392 ; SSE-NEXT: [[R1:%.*]] = insertelement <8 x i32> poison, i32 [[AB1]], i64 1
393 ; SSE-NEXT: [[R2:%.*]] = insertelement <8 x i32> [[R1]], i32 [[AB2]], i64 2
394 ; SSE-NEXT: [[R3:%.*]] = insertelement <8 x i32> [[R2]], i32 [[AB3]], i64 3
395 ; SSE-NEXT: [[R5:%.*]] = insertelement <8 x i32> [[R3]], i32 [[AB5]], i64 5
396 ; SSE-NEXT: [[R6:%.*]] = insertelement <8 x i32> [[R5]], i32 [[AB6]], i64 6
397 ; SSE-NEXT: [[R7:%.*]] = insertelement <8 x i32> [[R6]], i32 [[AB7]], i64 7
398 ; SSE-NEXT: ret <8 x i32> [[R7]]
400 ; SLM-LABEL: @sdiv_v8i32_undefs(
401 ; SLM-NEXT: [[A1:%.*]] = extractelement <8 x i32> [[A:%.*]], i64 1
402 ; SLM-NEXT: [[A2:%.*]] = extractelement <8 x i32> [[A]], i64 2
403 ; SLM-NEXT: [[A3:%.*]] = extractelement <8 x i32> [[A]], i64 3
404 ; SLM-NEXT: [[A5:%.*]] = extractelement <8 x i32> [[A]], i64 5
405 ; SLM-NEXT: [[A6:%.*]] = extractelement <8 x i32> [[A]], i64 6
406 ; SLM-NEXT: [[A7:%.*]] = extractelement <8 x i32> [[A]], i64 7
407 ; SLM-NEXT: [[AB1:%.*]] = sdiv i32 [[A1]], 4
408 ; SLM-NEXT: [[AB2:%.*]] = sdiv i32 [[A2]], 8
409 ; SLM-NEXT: [[AB3:%.*]] = sdiv i32 [[A3]], 16
410 ; SLM-NEXT: [[AB5:%.*]] = sdiv i32 [[A5]], 4
411 ; SLM-NEXT: [[AB6:%.*]] = sdiv i32 [[A6]], 8
412 ; SLM-NEXT: [[AB7:%.*]] = sdiv i32 [[A7]], 16
413 ; SLM-NEXT: [[R1:%.*]] = insertelement <8 x i32> poison, i32 [[AB1]], i64 1
414 ; SLM-NEXT: [[R2:%.*]] = insertelement <8 x i32> [[R1]], i32 [[AB2]], i64 2
415 ; SLM-NEXT: [[R3:%.*]] = insertelement <8 x i32> [[R2]], i32 [[AB3]], i64 3
416 ; SLM-NEXT: [[R5:%.*]] = insertelement <8 x i32> [[R3]], i32 [[AB5]], i64 5
417 ; SLM-NEXT: [[R6:%.*]] = insertelement <8 x i32> [[R5]], i32 [[AB6]], i64 6
418 ; SLM-NEXT: [[R7:%.*]] = insertelement <8 x i32> [[R6]], i32 [[AB7]], i64 7
419 ; SLM-NEXT: ret <8 x i32> [[R7]]
421 ; AVX1-LABEL: @sdiv_v8i32_undefs(
422 ; AVX1-NEXT: [[A1:%.*]] = extractelement <8 x i32> [[A:%.*]], i64 1
423 ; AVX1-NEXT: [[A2:%.*]] = extractelement <8 x i32> [[A]], i64 2
424 ; AVX1-NEXT: [[A3:%.*]] = extractelement <8 x i32> [[A]], i64 3
425 ; AVX1-NEXT: [[A5:%.*]] = extractelement <8 x i32> [[A]], i64 5
426 ; AVX1-NEXT: [[A6:%.*]] = extractelement <8 x i32> [[A]], i64 6
427 ; AVX1-NEXT: [[A7:%.*]] = extractelement <8 x i32> [[A]], i64 7
428 ; AVX1-NEXT: [[AB1:%.*]] = sdiv i32 [[A1]], 4
429 ; AVX1-NEXT: [[AB2:%.*]] = sdiv i32 [[A2]], 8
430 ; AVX1-NEXT: [[AB3:%.*]] = sdiv i32 [[A3]], 16
431 ; AVX1-NEXT: [[AB5:%.*]] = sdiv i32 [[A5]], 4
432 ; AVX1-NEXT: [[AB6:%.*]] = sdiv i32 [[A6]], 8
433 ; AVX1-NEXT: [[AB7:%.*]] = sdiv i32 [[A7]], 16
434 ; AVX1-NEXT: [[R1:%.*]] = insertelement <8 x i32> poison, i32 [[AB1]], i64 1
435 ; AVX1-NEXT: [[R2:%.*]] = insertelement <8 x i32> [[R1]], i32 [[AB2]], i64 2
436 ; AVX1-NEXT: [[R3:%.*]] = insertelement <8 x i32> [[R2]], i32 [[AB3]], i64 3
437 ; AVX1-NEXT: [[R5:%.*]] = insertelement <8 x i32> [[R3]], i32 [[AB5]], i64 5
438 ; AVX1-NEXT: [[R6:%.*]] = insertelement <8 x i32> [[R5]], i32 [[AB6]], i64 6
439 ; AVX1-NEXT: [[R7:%.*]] = insertelement <8 x i32> [[R6]], i32 [[AB7]], i64 7
440 ; AVX1-NEXT: ret <8 x i32> [[R7]]
442 ; AVX2-LABEL: @sdiv_v8i32_undefs(
443 ; AVX2-NEXT: [[A1:%.*]] = extractelement <8 x i32> [[A:%.*]], i64 1
444 ; AVX2-NEXT: [[A5:%.*]] = extractelement <8 x i32> [[A]], i64 5
445 ; AVX2-NEXT: [[AB1:%.*]] = sdiv i32 [[A1]], 4
446 ; AVX2-NEXT: [[TMP1:%.*]] = shufflevector <8 x i32> [[A]], <8 x i32> poison, <2 x i32> <i32 2, i32 3>
447 ; AVX2-NEXT: [[TMP2:%.*]] = sdiv <2 x i32> [[TMP1]], <i32 8, i32 16>
448 ; AVX2-NEXT: [[AB5:%.*]] = sdiv i32 [[A5]], 4
449 ; AVX2-NEXT: [[TMP3:%.*]] = shufflevector <8 x i32> [[A]], <8 x i32> poison, <2 x i32> <i32 6, i32 7>
450 ; AVX2-NEXT: [[TMP4:%.*]] = sdiv <2 x i32> [[TMP3]], <i32 8, i32 16>
451 ; AVX2-NEXT: [[R1:%.*]] = insertelement <8 x i32> poison, i32 [[AB1]], i64 1
452 ; AVX2-NEXT: [[TMP5:%.*]] = shufflevector <2 x i32> [[TMP2]], <2 x i32> poison, <8 x i32> <i32 0, i32 1, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison>
453 ; AVX2-NEXT: [[R32:%.*]] = shufflevector <8 x i32> [[R1]], <8 x i32> [[TMP5]], <8 x i32> <i32 poison, i32 1, i32 8, i32 9, i32 poison, i32 poison, i32 poison, i32 poison>
454 ; AVX2-NEXT: [[R5:%.*]] = insertelement <8 x i32> [[R32]], i32 [[AB5]], i64 5
455 ; AVX2-NEXT: [[TMP6:%.*]] = shufflevector <2 x i32> [[TMP4]], <2 x i32> poison, <8 x i32> <i32 0, i32 1, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison>
456 ; AVX2-NEXT: [[R71:%.*]] = shufflevector <8 x i32> [[R5]], <8 x i32> [[TMP6]], <8 x i32> <i32 poison, i32 1, i32 2, i32 3, i32 poison, i32 5, i32 8, i32 9>
457 ; AVX2-NEXT: ret <8 x i32> [[R71]]
459 ; AVX512-LABEL: @sdiv_v8i32_undefs(
460 ; AVX512-NEXT: [[A1:%.*]] = extractelement <8 x i32> [[A:%.*]], i64 1
461 ; AVX512-NEXT: [[A5:%.*]] = extractelement <8 x i32> [[A]], i64 5
462 ; AVX512-NEXT: [[AB1:%.*]] = sdiv i32 [[A1]], 4
463 ; AVX512-NEXT: [[TMP1:%.*]] = shufflevector <8 x i32> [[A]], <8 x i32> poison, <2 x i32> <i32 2, i32 3>
464 ; AVX512-NEXT: [[TMP2:%.*]] = sdiv <2 x i32> [[TMP1]], <i32 8, i32 16>
465 ; AVX512-NEXT: [[AB5:%.*]] = sdiv i32 [[A5]], 4
466 ; AVX512-NEXT: [[TMP3:%.*]] = shufflevector <8 x i32> [[A]], <8 x i32> poison, <2 x i32> <i32 6, i32 7>
467 ; AVX512-NEXT: [[TMP4:%.*]] = sdiv <2 x i32> [[TMP3]], <i32 8, i32 16>
468 ; AVX512-NEXT: [[R1:%.*]] = insertelement <8 x i32> poison, i32 [[AB1]], i64 1
469 ; AVX512-NEXT: [[TMP5:%.*]] = shufflevector <2 x i32> [[TMP2]], <2 x i32> poison, <8 x i32> <i32 0, i32 1, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison>
470 ; AVX512-NEXT: [[R32:%.*]] = shufflevector <8 x i32> [[R1]], <8 x i32> [[TMP5]], <8 x i32> <i32 poison, i32 1, i32 8, i32 9, i32 poison, i32 poison, i32 poison, i32 poison>
471 ; AVX512-NEXT: [[R5:%.*]] = insertelement <8 x i32> [[R32]], i32 [[AB5]], i64 5
472 ; AVX512-NEXT: [[TMP6:%.*]] = shufflevector <2 x i32> [[TMP4]], <2 x i32> poison, <8 x i32> <i32 0, i32 1, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison>
473 ; AVX512-NEXT: [[R71:%.*]] = shufflevector <8 x i32> [[R5]], <8 x i32> [[TMP6]], <8 x i32> <i32 poison, i32 1, i32 2, i32 3, i32 poison, i32 5, i32 8, i32 9>
474 ; AVX512-NEXT: ret <8 x i32> [[R71]]
476 %a0 = extractelement <8 x i32> %a, i32 0
477 %a1 = extractelement <8 x i32> %a, i32 1
478 %a2 = extractelement <8 x i32> %a, i32 2
479 %a3 = extractelement <8 x i32> %a, i32 3
480 %a4 = extractelement <8 x i32> %a, i32 4
481 %a5 = extractelement <8 x i32> %a, i32 5
482 %a6 = extractelement <8 x i32> %a, i32 6
483 %a7 = extractelement <8 x i32> %a, i32 7
484 %ab0 = sdiv i32 %a0, undef
485 %ab1 = sdiv i32 %a1, 4
486 %ab2 = sdiv i32 %a2, 8
487 %ab3 = sdiv i32 %a3, 16
488 %ab4 = sdiv i32 %a4, undef
489 %ab5 = sdiv i32 %a5, 4
490 %ab6 = sdiv i32 %a6, 8
491 %ab7 = sdiv i32 %a7, 16
492 %r0 = insertelement <8 x i32> poison, i32 %ab0, i32 0
493 %r1 = insertelement <8 x i32> %r0, i32 %ab1, i32 1
494 %r2 = insertelement <8 x i32> %r1, i32 %ab2, i32 2
495 %r3 = insertelement <8 x i32> %r2, i32 %ab3, i32 3
496 %r4 = insertelement <8 x i32> %r3, i32 %ab4, i32 4
497 %r5 = insertelement <8 x i32> %r4, i32 %ab5, i32 5
498 %r6 = insertelement <8 x i32> %r5, i32 %ab6, i32 6
499 %r7 = insertelement <8 x i32> %r6, i32 %ab7, i32 7
503 define <8 x i32> @add_sub_v8i32_splat(<8 x i32> %a, i32 %b) {
504 ; CHECK-LABEL: @add_sub_v8i32_splat(
505 ; CHECK-NEXT: [[TMP1:%.*]] = insertelement <8 x i32> poison, i32 [[B:%.*]], i64 0
506 ; CHECK-NEXT: [[TMP2:%.*]] = shufflevector <8 x i32> [[TMP1]], <8 x i32> poison, <8 x i32> zeroinitializer
507 ; CHECK-NEXT: [[TMP3:%.*]] = add <8 x i32> [[TMP2]], [[A:%.*]]
508 ; CHECK-NEXT: [[TMP4:%.*]] = sub <8 x i32> [[TMP2]], [[A]]
509 ; 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>
510 ; CHECK-NEXT: ret <8 x i32> [[TMP5]]
512 %a0 = extractelement <8 x i32> %a, i32 0
513 %a1 = extractelement <8 x i32> %a, i32 1
514 %a2 = extractelement <8 x i32> %a, i32 2
515 %a3 = extractelement <8 x i32> %a, i32 3
516 %a4 = extractelement <8 x i32> %a, i32 4
517 %a5 = extractelement <8 x i32> %a, i32 5
518 %a6 = extractelement <8 x i32> %a, i32 6
519 %a7 = extractelement <8 x i32> %a, i32 7
520 %ab0 = add i32 %a0, %b
521 %ab1 = add i32 %b, %a1
522 %ab2 = add i32 %a2, %b
523 %ab3 = add i32 %b, %a3
524 %ab4 = sub i32 %b, %a4
525 %ab5 = sub i32 %b, %a5
526 %ab6 = sub i32 %b, %a6
527 %ab7 = sub i32 %b, %a7
528 %r0 = insertelement <8 x i32> poison, i32 %ab0, i32 0
529 %r1 = insertelement <8 x i32> %r0, i32 %ab1, i32 1
530 %r2 = insertelement <8 x i32> %r1, i32 %ab2, i32 2
531 %r3 = insertelement <8 x i32> %r2, i32 %ab3, i32 3
532 %r4 = insertelement <8 x i32> %r3, i32 %ab4, i32 4
533 %r5 = insertelement <8 x i32> %r4, i32 %ab5, i32 5
534 %r6 = insertelement <8 x i32> %r5, i32 %ab6, i32 6
535 %r7 = insertelement <8 x i32> %r6, i32 %ab7, i32 7