|
2 | 2 | ; RUN: llc < %s -mtriple=i686-unknown -mattr=+avx512bw,+avx512vl | FileCheck %s --check-prefixes=CHECK,X86
|
3 | 3 | ; RUN: llc < %s -mtriple=x86_64-unknown -mattr=+avx512bw,+avx512vl | FileCheck %s --check-prefixes=CHECK,X64
|
4 | 4 |
|
| 5 | +declare <32 x i16> @llvm.x86.avx512.permvar.hi.512(<32 x i16>, <32 x i16>) |
5 | 6 | declare <16 x i16> @llvm.x86.avx512.maskz.vpermt2var.hi.256(<16 x i16>, <16 x i16>, <16 x i16>, i16)
|
6 | 7 | declare <16 x i16> @llvm.x86.avx512.mask.vpermi2var.hi.256(<16 x i16>, <16 x i16>, <16 x i16>, i16)
|
7 | 8 |
|
@@ -183,6 +184,20 @@ define <8 x i32> @concat_vrotlv_v4i32(<4 x i32> %a0, <4 x i32> %a1, <8 x i32> %a
|
183 | 184 | ret <8 x i32> %shuffle
|
184 | 185 | }
|
185 | 186 |
|
| 187 | +define <8 x i16> @demandedelts_vpermvar_32i16_v8i16(<32 x i16> %x0) { |
| 188 | +; CHECK-LABEL: demandedelts_vpermvar_32i16_v8i16: |
| 189 | +; CHECK: # %bb.0: |
| 190 | +; CHECK-NEXT: vbroadcasti32x4 {{.*#+}} zmm1 = [7,0,6,1,5,2,4,3,7,0,6,1,5,2,4,3,7,0,6,1,5,2,4,3,7,0,6,1,5,2,4,3] |
| 191 | +; CHECK-NEXT: # zmm1 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3] |
| 192 | +; CHECK-NEXT: vpermw %zmm0, %zmm1, %zmm0 |
| 193 | +; CHECK-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0 |
| 194 | +; CHECK-NEXT: vzeroupper |
| 195 | +; CHECK-NEXT: ret{{[l|q]}} |
| 196 | + %shuffle = call <32 x i16> @llvm.x86.avx512.permvar.hi.512(<32 x i16> %x0, <32 x i16> <i16 7, i16 0, i16 6, i16 1, i16 5, i16 2, i16 4, i16 3, i16 31, i16 30, i16 29, i16 28, i16 27, i16 26, i16 25, i16 24, i16 23, i16 22, i16 21, i16 20, i16 19, i16 18, i16 17, i16 16, i16 15, i16 14, i16 13, i16 12, i16 11, i16 10, i16 9, i16 8>) |
| 197 | + %res = shufflevector <32 x i16> %shuffle, <32 x i16> poison, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7> |
| 198 | + ret <8 x i16> %res |
| 199 | +} |
| 200 | + |
186 | 201 | define void @PR46178(ptr %0) {
|
187 | 202 | ; X86-LABEL: PR46178:
|
188 | 203 | ; X86: # %bb.0:
|
@@ -258,11 +273,11 @@ define i64 @PR55050() {
|
258 | 273 | ; X86-NEXT: xorl %edx, %edx
|
259 | 274 | ; X86-NEXT: xorl %eax, %eax
|
260 | 275 | ; X86-NEXT: testb %dl, %dl
|
261 |
| -; X86-NEXT: jne .LBB14_2 |
| 276 | +; X86-NEXT: jne .LBB15_2 |
262 | 277 | ; X86-NEXT: # %bb.1: # %if
|
263 | 278 | ; X86-NEXT: xorl %eax, %eax
|
264 | 279 | ; X86-NEXT: xorl %edx, %edx
|
265 |
| -; X86-NEXT: .LBB14_2: # %exit |
| 280 | +; X86-NEXT: .LBB15_2: # %exit |
266 | 281 | ; X86-NEXT: retl
|
267 | 282 | ;
|
268 | 283 | ; X64-LABEL: PR55050:
|
|
0 commit comments