summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/avx512-ext.ll
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2016-11-13 15:16:43 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2016-11-13 15:16:43 +0000
commit8f7c56125e7c6106846fe742bdf80cd006e8c486 (patch)
tree64e1c7ffefec15715b0b9ba266a06970923e9707 /llvm/test/CodeGen/X86/avx512-ext.ll
parentce59a536f78c6aaac2c176a58dbc7176ddf22c8a (diff)
downloadbcm5719-llvm-8f7c56125e7c6106846fe742bdf80cd006e8c486.tar.gz
bcm5719-llvm-8f7c56125e7c6106846fe742bdf80cd006e8c486.zip
[X86][AVX512] Add masked VPMOZX test case for PR26762
llvm-svn: 286763
Diffstat (limited to 'llvm/test/CodeGen/X86/avx512-ext.ll')
-rw-r--r--llvm/test/CodeGen/X86/avx512-ext.ll22
1 files changed, 22 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/avx512-ext.ll b/llvm/test/CodeGen/X86/avx512-ext.ll
index d1e256c2673..77022b7a903 100644
--- a/llvm/test/CodeGen/X86/avx512-ext.ll
+++ b/llvm/test/CodeGen/X86/avx512-ext.ll
@@ -1822,6 +1822,28 @@ define <16 x i16> @shuffle_zext_16x8_to_16x16(<16 x i8> %a) nounwind readnone {
ret <16 x i16> %2
}
+define <16 x i16> @shuffle_zext_16x8_to_16x16_mask(<16 x i8> %a, <16 x i1> %mask) nounwind readnone {
+; KNL-LABEL: shuffle_zext_16x8_to_16x16_mask:
+; KNL: ## BB#0:
+; KNL-NEXT: vpmovzxbw {{.*#+}} ymm1 = xmm1[0],zero,xmm1[1],zero,xmm1[2],zero,xmm1[3],zero,xmm1[4],zero,xmm1[5],zero,xmm1[6],zero,xmm1[7],zero,xmm1[8],zero,xmm1[9],zero,xmm1[10],zero,xmm1[11],zero,xmm1[12],zero,xmm1[13],zero,xmm1[14],zero,xmm1[15],zero
+; KNL-NEXT: vpmovzxbw {{.*#+}} ymm0 = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero,xmm0[4],zero,xmm0[5],zero,xmm0[6],zero,xmm0[7],zero,xmm0[8],zero,xmm0[9],zero,xmm0[10],zero,xmm0[11],zero,xmm0[12],zero,xmm0[13],zero,xmm0[14],zero,xmm0[15],zero
+; KNL-NEXT: vpsllw $15, %ymm1, %ymm1
+; KNL-NEXT: vpsraw $15, %ymm1, %ymm1
+; KNL-NEXT: vpand %ymm0, %ymm1, %ymm0
+; KNL-NEXT: retq
+;
+; SKX-LABEL: shuffle_zext_16x8_to_16x16_mask:
+; SKX: ## BB#0:
+; SKX-NEXT: vpsllw $7, %xmm1, %xmm1
+; SKX-NEXT: vpmovb2m %xmm1, %k1
+; SKX-NEXT: vpmovzxbw {{.*#+}} ymm0 {%k1} {z} = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero,xmm0[4],zero,xmm0[5],zero,xmm0[6],zero,xmm0[7],zero,xmm0[8],zero,xmm0[9],zero,xmm0[10],zero,xmm0[11],zero,xmm0[12],zero,xmm0[13],zero,xmm0[14],zero,xmm0[15],zero
+; SKX-NEXT: retq
+ %x = shufflevector <16 x i8> %a, <16 x i8> zeroinitializer, <32 x i32> <i32 0, i32 16, i32 1, i32 16, i32 2, i32 16, i32 3, i32 16, i32 4, i32 16, i32 5, i32 16, i32 6, i32 16, i32 7, i32 16, i32 8, i32 16, i32 9, i32 16, i32 10, i32 16, i32 11, i32 16, i32 12, i32 16, i32 13, i32 16, i32 14, i32 16, i32 15, i32 16>
+ %bc = bitcast <32 x i8> %x to <16 x i16>
+ %ret = select <16 x i1> %mask, <16 x i16> %bc, <16 x i16> zeroinitializer
+ ret <16 x i16> %ret
+}
+
define <16 x i16> @zext_32x8_to_16x16(<32 x i8> %a) {
; ALL-LABEL: zext_32x8_to_16x16:
; ALL: ## BB#0:
OpenPOWER on IntegriCloud