[TTI] getTypeBasedIntrinsicInstrCost - add basic handling for strided load/store...
[llvm-project.git] / llvm / test / CodeGen / X86 / avxneconvert-intrinsics.ll
blobef87ac31fcf48cbd148967d6ff063166b3c712ab
1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -O0 -verify-machineinstrs -mtriple=x86_64-unknown-unknown --show-mc-encoding -mattr=+avxneconvert | FileCheck %s --check-prefixes=CHECK,X64
3 ; RUN: llc < %s -O0 -verify-machineinstrs -mtriple=i686-unknown-unknown --show-mc-encoding -mattr=+avxneconvert | FileCheck %s --check-prefixes=CHECK,X86
5 define <4 x float> @test_int_x86_vbcstnebf162ps128(ptr %A) {
6 ; X64-LABEL: test_int_x86_vbcstnebf162ps128:
7 ; X64:       # %bb.0:
8 ; X64-NEXT:    vbcstnebf162ps (%rdi), %xmm0 # encoding: [0xc4,0xe2,0x7a,0xb1,0x07]
9 ; X64-NEXT:    retq # encoding: [0xc3]
11 ; X86-LABEL: test_int_x86_vbcstnebf162ps128:
12 ; X86:       # %bb.0:
13 ; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x04]
14 ; X86-NEXT:    vbcstnebf162ps (%eax), %xmm0 # encoding: [0xc4,0xe2,0x7a,0xb1,0x00]
15 ; X86-NEXT:    retl # encoding: [0xc3]
16   %ret = call <4 x float> @llvm.x86.vbcstnebf162ps128(ptr %A)
17   ret <4 x float> %ret
19 declare <4 x float> @llvm.x86.vbcstnebf162ps128(ptr %A)
21 define <8 x float> @test_int_x86_vbcstnebf162ps256(ptr %A) {
22 ; X64-LABEL: test_int_x86_vbcstnebf162ps256:
23 ; X64:       # %bb.0:
24 ; X64-NEXT:    vbcstnebf162ps (%rdi), %ymm0 # encoding: [0xc4,0xe2,0x7e,0xb1,0x07]
25 ; X64-NEXT:    retq # encoding: [0xc3]
27 ; X86-LABEL: test_int_x86_vbcstnebf162ps256:
28 ; X86:       # %bb.0:
29 ; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x04]
30 ; X86-NEXT:    vbcstnebf162ps (%eax), %ymm0 # encoding: [0xc4,0xe2,0x7e,0xb1,0x00]
31 ; X86-NEXT:    retl # encoding: [0xc3]
32   %ret = call <8 x float> @llvm.x86.vbcstnebf162ps256(ptr %A)
33   ret <8 x float> %ret
35 declare <8 x float> @llvm.x86.vbcstnebf162ps256(ptr %A)
37 define <4 x float> @test_int_x86_vbcstnesh2ps128(ptr %A) {
38 ; X64-LABEL: test_int_x86_vbcstnesh2ps128:
39 ; X64:       # %bb.0:
40 ; X64-NEXT:    vbcstnesh2ps (%rdi), %xmm0 # encoding: [0xc4,0xe2,0x79,0xb1,0x07]
41 ; X64-NEXT:    retq # encoding: [0xc3]
43 ; X86-LABEL: test_int_x86_vbcstnesh2ps128:
44 ; X86:       # %bb.0:
45 ; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x04]
46 ; X86-NEXT:    vbcstnesh2ps (%eax), %xmm0 # encoding: [0xc4,0xe2,0x79,0xb1,0x00]
47 ; X86-NEXT:    retl # encoding: [0xc3]
48   %ret = call <4 x float> @llvm.x86.vbcstnesh2ps128(ptr %A)
49   ret <4 x float> %ret
51 declare <4 x float> @llvm.x86.vbcstnesh2ps128(ptr %A)
53 define <8 x float> @test_int_x86_vbcstnesh2ps256(ptr %A) {
54 ; X64-LABEL: test_int_x86_vbcstnesh2ps256:
55 ; X64:       # %bb.0:
56 ; X64-NEXT:    vbcstnesh2ps (%rdi), %ymm0 # encoding: [0xc4,0xe2,0x7d,0xb1,0x07]
57 ; X64-NEXT:    retq # encoding: [0xc3]
59 ; X86-LABEL: test_int_x86_vbcstnesh2ps256:
60 ; X86:       # %bb.0:
61 ; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x04]
62 ; X86-NEXT:    vbcstnesh2ps (%eax), %ymm0 # encoding: [0xc4,0xe2,0x7d,0xb1,0x00]
63 ; X86-NEXT:    retl # encoding: [0xc3]
64   %ret = call <8 x float> @llvm.x86.vbcstnesh2ps256(ptr %A)
65   ret <8 x float> %ret
67 declare <8 x float> @llvm.x86.vbcstnesh2ps256(ptr %A)
69 define <4 x float> @test_int_x86_vcvtneebf162ps128(ptr %A) {
70 ; X64-LABEL: test_int_x86_vcvtneebf162ps128:
71 ; X64:       # %bb.0:
72 ; X64-NEXT:    vcvtneebf162ps (%rdi), %xmm0 # encoding: [0xc4,0xe2,0x7a,0xb0,0x07]
73 ; X64-NEXT:    retq # encoding: [0xc3]
75 ; X86-LABEL: test_int_x86_vcvtneebf162ps128:
76 ; X86:       # %bb.0:
77 ; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x04]
78 ; X86-NEXT:    vcvtneebf162ps (%eax), %xmm0 # encoding: [0xc4,0xe2,0x7a,0xb0,0x00]
79 ; X86-NEXT:    retl # encoding: [0xc3]
80   %ret = call <4 x float> @llvm.x86.vcvtneebf162ps128(ptr %A)
81   ret <4 x float> %ret
83 declare <4 x float> @llvm.x86.vcvtneebf162ps128(ptr %A)
85 define <8 x float> @test_int_x86_vcvtneebf162ps256(ptr %A) {
86 ; X64-LABEL: test_int_x86_vcvtneebf162ps256:
87 ; X64:       # %bb.0:
88 ; X64-NEXT:    vcvtneebf162ps (%rdi), %ymm0 # encoding: [0xc4,0xe2,0x7e,0xb0,0x07]
89 ; X64-NEXT:    retq # encoding: [0xc3]
91 ; X86-LABEL: test_int_x86_vcvtneebf162ps256:
92 ; X86:       # %bb.0:
93 ; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x04]
94 ; X86-NEXT:    vcvtneebf162ps (%eax), %ymm0 # encoding: [0xc4,0xe2,0x7e,0xb0,0x00]
95 ; X86-NEXT:    retl # encoding: [0xc3]
96   %ret = call <8 x float> @llvm.x86.vcvtneebf162ps256(ptr %A)
97   ret <8 x float> %ret
99 declare <8 x float> @llvm.x86.vcvtneebf162ps256(ptr %A)
101 define <4 x float> @test_int_x86_vcvtneeph2ps128(ptr %A) {
102 ; X64-LABEL: test_int_x86_vcvtneeph2ps128:
103 ; X64:       # %bb.0:
104 ; X64-NEXT:    vcvtneeph2ps (%rdi), %xmm0 # encoding: [0xc4,0xe2,0x79,0xb0,0x07]
105 ; X64-NEXT:    retq # encoding: [0xc3]
107 ; X86-LABEL: test_int_x86_vcvtneeph2ps128:
108 ; X86:       # %bb.0:
109 ; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x04]
110 ; X86-NEXT:    vcvtneeph2ps (%eax), %xmm0 # encoding: [0xc4,0xe2,0x79,0xb0,0x00]
111 ; X86-NEXT:    retl # encoding: [0xc3]
112   %ret = call <4 x float> @llvm.x86.vcvtneeph2ps128(ptr %A)
113   ret <4 x float> %ret
115 declare <4 x float> @llvm.x86.vcvtneeph2ps128(ptr %A)
117 define <8 x float> @test_int_x86_vcvtneeph2ps256(ptr %A) {
118 ; X64-LABEL: test_int_x86_vcvtneeph2ps256:
119 ; X64:       # %bb.0:
120 ; X64-NEXT:    vcvtneeph2ps (%rdi), %ymm0 # encoding: [0xc4,0xe2,0x7d,0xb0,0x07]
121 ; X64-NEXT:    retq # encoding: [0xc3]
123 ; X86-LABEL: test_int_x86_vcvtneeph2ps256:
124 ; X86:       # %bb.0:
125 ; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x04]
126 ; X86-NEXT:    vcvtneeph2ps (%eax), %ymm0 # encoding: [0xc4,0xe2,0x7d,0xb0,0x00]
127 ; X86-NEXT:    retl # encoding: [0xc3]
128   %ret = call <8 x float> @llvm.x86.vcvtneeph2ps256(ptr %A)
129   ret <8 x float> %ret
131 declare <8 x float> @llvm.x86.vcvtneeph2ps256(ptr %A)
133 define <4 x float> @test_int_x86_vcvtneobf162ps128(ptr %A) {
134 ; X64-LABEL: test_int_x86_vcvtneobf162ps128:
135 ; X64:       # %bb.0:
136 ; X64-NEXT:    vcvtneobf162ps (%rdi), %xmm0 # encoding: [0xc4,0xe2,0x7b,0xb0,0x07]
137 ; X64-NEXT:    retq # encoding: [0xc3]
139 ; X86-LABEL: test_int_x86_vcvtneobf162ps128:
140 ; X86:       # %bb.0:
141 ; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x04]
142 ; X86-NEXT:    vcvtneobf162ps (%eax), %xmm0 # encoding: [0xc4,0xe2,0x7b,0xb0,0x00]
143 ; X86-NEXT:    retl # encoding: [0xc3]
144   %ret = call <4 x float> @llvm.x86.vcvtneobf162ps128(ptr %A)
145   ret <4 x float> %ret
147 declare <4 x float> @llvm.x86.vcvtneobf162ps128(ptr %A)
149 define <8 x float> @test_int_x86_vcvtneobf162ps256(ptr %A) {
150 ; X64-LABEL: test_int_x86_vcvtneobf162ps256:
151 ; X64:       # %bb.0:
152 ; X64-NEXT:    vcvtneobf162ps (%rdi), %ymm0 # encoding: [0xc4,0xe2,0x7f,0xb0,0x07]
153 ; X64-NEXT:    retq # encoding: [0xc3]
155 ; X86-LABEL: test_int_x86_vcvtneobf162ps256:
156 ; X86:       # %bb.0:
157 ; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x04]
158 ; X86-NEXT:    vcvtneobf162ps (%eax), %ymm0 # encoding: [0xc4,0xe2,0x7f,0xb0,0x00]
159 ; X86-NEXT:    retl # encoding: [0xc3]
160   %ret = call <8 x float> @llvm.x86.vcvtneobf162ps256(ptr %A)
161   ret <8 x float> %ret
163 declare <8 x float> @llvm.x86.vcvtneobf162ps256(ptr %A)
165 define <4 x float> @test_int_x86_vcvtneoph2ps128(ptr %A) {
166 ; X64-LABEL: test_int_x86_vcvtneoph2ps128:
167 ; X64:       # %bb.0:
168 ; X64-NEXT:    vcvtneoph2ps (%rdi), %xmm0 # encoding: [0xc4,0xe2,0x78,0xb0,0x07]
169 ; X64-NEXT:    retq # encoding: [0xc3]
171 ; X86-LABEL: test_int_x86_vcvtneoph2ps128:
172 ; X86:       # %bb.0:
173 ; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x04]
174 ; X86-NEXT:    vcvtneoph2ps (%eax), %xmm0 # encoding: [0xc4,0xe2,0x78,0xb0,0x00]
175 ; X86-NEXT:    retl # encoding: [0xc3]
176   %ret = call <4 x float> @llvm.x86.vcvtneoph2ps128(ptr %A)
177   ret <4 x float> %ret
179 declare <4 x float> @llvm.x86.vcvtneoph2ps128(ptr %A)
181 define <8 x float> @test_int_x86_vcvtneoph2ps256(ptr %A) {
182 ; X64-LABEL: test_int_x86_vcvtneoph2ps256:
183 ; X64:       # %bb.0:
184 ; X64-NEXT:    vcvtneoph2ps (%rdi), %ymm0 # encoding: [0xc4,0xe2,0x7c,0xb0,0x07]
185 ; X64-NEXT:    retq # encoding: [0xc3]
187 ; X86-LABEL: test_int_x86_vcvtneoph2ps256:
188 ; X86:       # %bb.0:
189 ; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x04]
190 ; X86-NEXT:    vcvtneoph2ps (%eax), %ymm0 # encoding: [0xc4,0xe2,0x7c,0xb0,0x00]
191 ; X86-NEXT:    retl # encoding: [0xc3]
192   %ret = call <8 x float> @llvm.x86.vcvtneoph2ps256(ptr %A)
193   ret <8 x float> %ret
195 declare <8 x float> @llvm.x86.vcvtneoph2ps256(ptr %A)
197 define <8 x bfloat> @test_int_x86_vcvtneps2bf16128(<4 x float> %A) {
198 ; CHECK-LABEL: test_int_x86_vcvtneps2bf16128:
199 ; CHECK:       # %bb.0:
200 ; CHECK-NEXT:    {vex} vcvtneps2bf16 %xmm0, %xmm0 # encoding: [0xc4,0xe2,0x7a,0x72,0xc0]
201 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
202   %ret = call <8 x bfloat> @llvm.x86.vcvtneps2bf16128(<4 x float> %A)
203   ret <8 x bfloat> %ret
205 declare <8 x bfloat> @llvm.x86.vcvtneps2bf16128(<4 x float> %A)
207 define <8 x bfloat> @test_int_x86_vcvtneps2bf16256(<8 x float> %A) {
208 ; CHECK-LABEL: test_int_x86_vcvtneps2bf16256:
209 ; CHECK:       # %bb.0:
210 ; CHECK-NEXT:    {vex} vcvtneps2bf16 %ymm0, %xmm0 # encoding: [0xc4,0xe2,0x7e,0x72,0xc0]
211 ; CHECK-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]
212 ; CHECK-NEXT:    ret{{[l|q]}} # encoding: [0xc3]
213   %ret = call <8 x bfloat> @llvm.x86.vcvtneps2bf16256(<8 x float> %A)
214   ret <8 x bfloat> %ret
216 declare <8 x bfloat> @llvm.x86.vcvtneps2bf16256(<8 x float> %A)
218 define <8 x bfloat> @select(i8 %x, <8 x bfloat> %y) nounwind {
219 ; X64-LABEL: select:
220 ; X64:       # %bb.0:
221 ; X64-NEXT:    vmovaps %xmm0, %xmm1 # encoding: [0xc5,0xf8,0x28,0xc8]
222 ; X64-NEXT:    movb %dil, %al # encoding: [0x40,0x88,0xf8]
223 ; X64-NEXT:    movb %al, -{{[0-9]+}}(%rsp) # encoding: [0x88,0x44,0x24,0xff]
224 ; X64-NEXT:    movzbl -{{[0-9]+}}(%rsp), %eax # encoding: [0x0f,0xb6,0x44,0x24,0xff]
225 ; X64-NEXT:    movl %eax, %ecx # encoding: [0x89,0xc1]
226 ; X64-NEXT:    andl $1, %ecx # encoding: [0x83,0xe1,0x01]
227 ; X64-NEXT:    negl %ecx # encoding: [0xf7,0xd9]
228 ; X64-NEXT:    vmovd %ecx, %xmm0 # encoding: [0xc5,0xf9,0x6e,0xc1]
229 ; X64-NEXT:    # kill: def $al killed $al killed $eax
230 ; X64-NEXT:    movb %al, %cl # encoding: [0x88,0xc1]
231 ; X64-NEXT:    shrb %cl # encoding: [0xd0,0xe9]
232 ; X64-NEXT:    movzbl %cl, %ecx # encoding: [0x0f,0xb6,0xc9]
233 ; X64-NEXT:    andl $1, %ecx # encoding: [0x83,0xe1,0x01]
234 ; X64-NEXT:    negl %ecx # encoding: [0xf7,0xd9]
235 ; X64-NEXT:    vpinsrw $1, %ecx, %xmm0, %xmm0 # encoding: [0xc5,0xf9,0xc4,0xc1,0x01]
236 ; X64-NEXT:    movb %al, %cl # encoding: [0x88,0xc1]
237 ; X64-NEXT:    shrb $2, %cl # encoding: [0xc0,0xe9,0x02]
238 ; X64-NEXT:    movzbl %cl, %ecx # encoding: [0x0f,0xb6,0xc9]
239 ; X64-NEXT:    andl $1, %ecx # encoding: [0x83,0xe1,0x01]
240 ; X64-NEXT:    negl %ecx # encoding: [0xf7,0xd9]
241 ; X64-NEXT:    vpinsrw $2, %ecx, %xmm0, %xmm0 # encoding: [0xc5,0xf9,0xc4,0xc1,0x02]
242 ; X64-NEXT:    movb %al, %cl # encoding: [0x88,0xc1]
243 ; X64-NEXT:    shrb $3, %cl # encoding: [0xc0,0xe9,0x03]
244 ; X64-NEXT:    movzbl %cl, %ecx # encoding: [0x0f,0xb6,0xc9]
245 ; X64-NEXT:    andl $1, %ecx # encoding: [0x83,0xe1,0x01]
246 ; X64-NEXT:    negl %ecx # encoding: [0xf7,0xd9]
247 ; X64-NEXT:    vpinsrw $3, %ecx, %xmm0, %xmm0 # encoding: [0xc5,0xf9,0xc4,0xc1,0x03]
248 ; X64-NEXT:    movb %al, %cl # encoding: [0x88,0xc1]
249 ; X64-NEXT:    shrb $4, %cl # encoding: [0xc0,0xe9,0x04]
250 ; X64-NEXT:    movzbl %cl, %ecx # encoding: [0x0f,0xb6,0xc9]
251 ; X64-NEXT:    andl $1, %ecx # encoding: [0x83,0xe1,0x01]
252 ; X64-NEXT:    negl %ecx # encoding: [0xf7,0xd9]
253 ; X64-NEXT:    vpinsrw $4, %ecx, %xmm0, %xmm0 # encoding: [0xc5,0xf9,0xc4,0xc1,0x04]
254 ; X64-NEXT:    movb %al, %cl # encoding: [0x88,0xc1]
255 ; X64-NEXT:    shrb $5, %cl # encoding: [0xc0,0xe9,0x05]
256 ; X64-NEXT:    movzbl %cl, %ecx # encoding: [0x0f,0xb6,0xc9]
257 ; X64-NEXT:    andl $1, %ecx # encoding: [0x83,0xe1,0x01]
258 ; X64-NEXT:    negl %ecx # encoding: [0xf7,0xd9]
259 ; X64-NEXT:    vpinsrw $5, %ecx, %xmm0, %xmm0 # encoding: [0xc5,0xf9,0xc4,0xc1,0x05]
260 ; X64-NEXT:    movb %al, %cl # encoding: [0x88,0xc1]
261 ; X64-NEXT:    shrb $6, %cl # encoding: [0xc0,0xe9,0x06]
262 ; X64-NEXT:    movzbl %cl, %ecx # encoding: [0x0f,0xb6,0xc9]
263 ; X64-NEXT:    andl $1, %ecx # encoding: [0x83,0xe1,0x01]
264 ; X64-NEXT:    negl %ecx # encoding: [0xf7,0xd9]
265 ; X64-NEXT:    vpinsrw $6, %ecx, %xmm0, %xmm0 # encoding: [0xc5,0xf9,0xc4,0xc1,0x06]
266 ; X64-NEXT:    shrb $7, %al # encoding: [0xc0,0xe8,0x07]
267 ; X64-NEXT:    movzbl %al, %eax # encoding: [0x0f,0xb6,0xc0]
268 ; X64-NEXT:    negl %eax # encoding: [0xf7,0xd8]
269 ; X64-NEXT:    vpinsrw $7, %eax, %xmm0, %xmm0 # encoding: [0xc5,0xf9,0xc4,0xc0,0x07]
270 ; X64-NEXT:    vpandn %xmm1, %xmm0, %xmm0 # encoding: [0xc5,0xf9,0xdf,0xc1]
271 ; X64-NEXT:    retq # encoding: [0xc3]
273 ; X86-LABEL: select:
274 ; X86:       # %bb.0:
275 ; X86-NEXT:    pushl %eax # encoding: [0x50]
276 ; X86-NEXT:    vmovaps %xmm0, %xmm1 # encoding: [0xc5,0xf8,0x28,0xc8]
277 ; X86-NEXT:    movb {{[0-9]+}}(%esp), %al # encoding: [0x8a,0x44,0x24,0x08]
278 ; X86-NEXT:    movb %al, {{[0-9]+}}(%esp) # encoding: [0x88,0x44,0x24,0x03]
279 ; X86-NEXT:    movzbl {{[0-9]+}}(%esp), %eax # encoding: [0x0f,0xb6,0x44,0x24,0x03]
280 ; X86-NEXT:    movl %eax, %ecx # encoding: [0x89,0xc1]
281 ; X86-NEXT:    andl $1, %ecx # encoding: [0x83,0xe1,0x01]
282 ; X86-NEXT:    negl %ecx # encoding: [0xf7,0xd9]
283 ; X86-NEXT:    vmovd %ecx, %xmm0 # encoding: [0xc5,0xf9,0x6e,0xc1]
284 ; X86-NEXT:    # kill: def $al killed $al killed $eax
285 ; X86-NEXT:    movb %al, %cl # encoding: [0x88,0xc1]
286 ; X86-NEXT:    shrb %cl # encoding: [0xd0,0xe9]
287 ; X86-NEXT:    movzbl %cl, %ecx # encoding: [0x0f,0xb6,0xc9]
288 ; X86-NEXT:    andl $1, %ecx # encoding: [0x83,0xe1,0x01]
289 ; X86-NEXT:    negl %ecx # encoding: [0xf7,0xd9]
290 ; X86-NEXT:    vpinsrw $1, %ecx, %xmm0, %xmm0 # encoding: [0xc5,0xf9,0xc4,0xc1,0x01]
291 ; X86-NEXT:    movb %al, %cl # encoding: [0x88,0xc1]
292 ; X86-NEXT:    shrb $2, %cl # encoding: [0xc0,0xe9,0x02]
293 ; X86-NEXT:    movzbl %cl, %ecx # encoding: [0x0f,0xb6,0xc9]
294 ; X86-NEXT:    andl $1, %ecx # encoding: [0x83,0xe1,0x01]
295 ; X86-NEXT:    negl %ecx # encoding: [0xf7,0xd9]
296 ; X86-NEXT:    vpinsrw $2, %ecx, %xmm0, %xmm0 # encoding: [0xc5,0xf9,0xc4,0xc1,0x02]
297 ; X86-NEXT:    movb %al, %cl # encoding: [0x88,0xc1]
298 ; X86-NEXT:    shrb $3, %cl # encoding: [0xc0,0xe9,0x03]
299 ; X86-NEXT:    movzbl %cl, %ecx # encoding: [0x0f,0xb6,0xc9]
300 ; X86-NEXT:    andl $1, %ecx # encoding: [0x83,0xe1,0x01]
301 ; X86-NEXT:    negl %ecx # encoding: [0xf7,0xd9]
302 ; X86-NEXT:    vpinsrw $3, %ecx, %xmm0, %xmm0 # encoding: [0xc5,0xf9,0xc4,0xc1,0x03]
303 ; X86-NEXT:    movb %al, %cl # encoding: [0x88,0xc1]
304 ; X86-NEXT:    shrb $4, %cl # encoding: [0xc0,0xe9,0x04]
305 ; X86-NEXT:    movzbl %cl, %ecx # encoding: [0x0f,0xb6,0xc9]
306 ; X86-NEXT:    andl $1, %ecx # encoding: [0x83,0xe1,0x01]
307 ; X86-NEXT:    negl %ecx # encoding: [0xf7,0xd9]
308 ; X86-NEXT:    vpinsrw $4, %ecx, %xmm0, %xmm0 # encoding: [0xc5,0xf9,0xc4,0xc1,0x04]
309 ; X86-NEXT:    movb %al, %cl # encoding: [0x88,0xc1]
310 ; X86-NEXT:    shrb $5, %cl # encoding: [0xc0,0xe9,0x05]
311 ; X86-NEXT:    movzbl %cl, %ecx # encoding: [0x0f,0xb6,0xc9]
312 ; X86-NEXT:    andl $1, %ecx # encoding: [0x83,0xe1,0x01]
313 ; X86-NEXT:    negl %ecx # encoding: [0xf7,0xd9]
314 ; X86-NEXT:    vpinsrw $5, %ecx, %xmm0, %xmm0 # encoding: [0xc5,0xf9,0xc4,0xc1,0x05]
315 ; X86-NEXT:    movb %al, %cl # encoding: [0x88,0xc1]
316 ; X86-NEXT:    shrb $6, %cl # encoding: [0xc0,0xe9,0x06]
317 ; X86-NEXT:    movzbl %cl, %ecx # encoding: [0x0f,0xb6,0xc9]
318 ; X86-NEXT:    andl $1, %ecx # encoding: [0x83,0xe1,0x01]
319 ; X86-NEXT:    negl %ecx # encoding: [0xf7,0xd9]
320 ; X86-NEXT:    vpinsrw $6, %ecx, %xmm0, %xmm0 # encoding: [0xc5,0xf9,0xc4,0xc1,0x06]
321 ; X86-NEXT:    shrb $7, %al # encoding: [0xc0,0xe8,0x07]
322 ; X86-NEXT:    movzbl %al, %eax # encoding: [0x0f,0xb6,0xc0]
323 ; X86-NEXT:    negl %eax # encoding: [0xf7,0xd8]
324 ; X86-NEXT:    vpinsrw $7, %eax, %xmm0, %xmm0 # encoding: [0xc5,0xf9,0xc4,0xc0,0x07]
325 ; X86-NEXT:    vpandn %xmm1, %xmm0, %xmm0 # encoding: [0xc5,0xf9,0xdf,0xc1]
326 ; X86-NEXT:    popl %eax # encoding: [0x58]
327 ; X86-NEXT:    retl # encoding: [0xc3]
328   %1 = bitcast i8 %x to <8 x i1>
329   %2 = select <8 x i1> %1, <8 x bfloat> zeroinitializer, <8 x bfloat> %y
330   ret <8 x bfloat> %2