define void @test22(<4 x i1> %a, <4 x i1>* %addr) {
; KNL-LABEL: test22:
; KNL: ## BB#0:
-; KNL-NEXT: vpextrd $3, %xmm0, %eax
-; KNL-NEXT: andl $1, %eax
-; KNL-NEXT: movb %al, (%rdi)
-; KNL-NEXT: vpextrd $2, %xmm0, %eax
-; KNL-NEXT: andl $1, %eax
-; KNL-NEXT: movb %al, (%rdi)
-; KNL-NEXT: vpextrd $1, %xmm0, %eax
-; KNL-NEXT: andl $1, %eax
-; KNL-NEXT: movb %al, (%rdi)
-; KNL-NEXT: vmovd %xmm0, %eax
-; KNL-NEXT: andl $1, %eax
+; KNL-NEXT: vpslld $31, %ymm0, %ymm0
+; KNL-NEXT: vptestmd %zmm0, %zmm0, %k0
+; KNL-NEXT: kmovw %k0, %eax
; KNL-NEXT: movb %al, (%rdi)
; KNL-NEXT: retq
;
define void @test23(<2 x i1> %a, <2 x i1>* %addr) {
; KNL-LABEL: test23:
; KNL: ## BB#0:
-; KNL-NEXT: vpextrq $1, %xmm0, %rax
-; KNL-NEXT: andl $1, %eax
-; KNL-NEXT: movb %al, (%rdi)
-; KNL-NEXT: vmovq %xmm0, %rax
-; KNL-NEXT: andl $1, %eax
+; KNL-NEXT: vpsllq $63, %zmm0, %zmm0
+; KNL-NEXT: vptestmq %zmm0, %zmm0, %k0
+; KNL-NEXT: kmovw %k0, %eax
; KNL-NEXT: movb %al, (%rdi)
; KNL-NEXT: retq
;
; KNL-LABEL: store_v2i1:
; KNL: ## BB#0:
; KNL-NEXT: vpxor {{.*}}(%rip), %xmm0, %xmm0
-; KNL-NEXT: vpextrq $1, %xmm0, %rax
-; KNL-NEXT: andl $1, %eax
-; KNL-NEXT: movb %al, (%rdi)
-; KNL-NEXT: vmovq %xmm0, %rax
-; KNL-NEXT: andl $1, %eax
+; KNL-NEXT: vpsllq $63, %zmm0, %zmm0
+; KNL-NEXT: vptestmq %zmm0, %zmm0, %k0
+; KNL-NEXT: kmovw %k0, %eax
; KNL-NEXT: movb %al, (%rdi)
; KNL-NEXT: retq
;
; KNL: ## BB#0:
; KNL-NEXT: vpbroadcastd {{.*}}(%rip), %xmm1
; KNL-NEXT: vpxor %xmm1, %xmm0, %xmm0
-; KNL-NEXT: vpextrd $3, %xmm0, %eax
-; KNL-NEXT: andl $1, %eax
-; KNL-NEXT: movb %al, (%rdi)
-; KNL-NEXT: vpextrd $2, %xmm0, %eax
-; KNL-NEXT: andl $1, %eax
-; KNL-NEXT: movb %al, (%rdi)
-; KNL-NEXT: vpextrd $1, %xmm0, %eax
-; KNL-NEXT: andl $1, %eax
-; KNL-NEXT: movb %al, (%rdi)
-; KNL-NEXT: vmovd %xmm0, %eax
-; KNL-NEXT: andl $1, %eax
+; KNL-NEXT: vpslld $31, %ymm0, %ymm0
+; KNL-NEXT: vptestmd %zmm0, %zmm0, %k0
+; KNL-NEXT: kmovw %k0, %eax
; KNL-NEXT: movb %al, (%rdi)
; KNL-NEXT: retq
;
%c = sext <64 x i1> %b to <64 x i8>
ret <64 x i8> %c
}
+
+define void @store_8i1(<8 x i1>* %a, <8 x i1> %v) {
+; KNL-LABEL: store_8i1:
+; KNL: ## BB#0:
+; KNL-NEXT: vpmovsxwq %xmm0, %zmm0
+; KNL-NEXT: vpsllq $63, %zmm0, %zmm0
+; KNL-NEXT: vptestmq %zmm0, %zmm0, %k0
+; KNL-NEXT: kmovw %k0, %eax
+; KNL-NEXT: movb %al, (%rdi)
+; KNL-NEXT: retq
+;
+; SKX-LABEL: store_8i1:
+; SKX: ## BB#0:
+; SKX-NEXT: vpsllw $15, %xmm0, %xmm0
+; SKX-NEXT: vpmovw2m %xmm0, %k0
+; SKX-NEXT: kmovb %k0, (%rdi)
+; SKX-NEXT: retq
+ store <8 x i1> %v, <8 x i1>* %a
+ ret void
+}
+
+define void @store_8i1_1(<8 x i1>* %a, <8 x i16> %v) {
+; KNL-LABEL: store_8i1_1:
+; KNL: ## BB#0:
+; KNL-NEXT: vpmovsxwq %xmm0, %zmm0
+; KNL-NEXT: vpsllq $63, %zmm0, %zmm0
+; KNL-NEXT: vptestmq %zmm0, %zmm0, %k0
+; KNL-NEXT: kmovw %k0, %eax
+; KNL-NEXT: movb %al, (%rdi)
+; KNL-NEXT: retq
+;
+; SKX-LABEL: store_8i1_1:
+; SKX: ## BB#0:
+; SKX-NEXT: vpsllw $15, %xmm0, %xmm0
+; SKX-NEXT: vpmovw2m %xmm0, %k0
+; SKX-NEXT: kmovb %k0, (%rdi)
+; SKX-NEXT: retq
+ %v1 = trunc <8 x i16> %v to <8 x i1>
+ store <8 x i1> %v1, <8 x i1>* %a
+ ret void
+}
+
+define void @store_16i1(<16 x i1>* %a, <16 x i1> %v) {
+; KNL-LABEL: store_16i1:
+; KNL: ## BB#0:
+; KNL-NEXT: vpmovsxbd %xmm0, %zmm0
+; KNL-NEXT: vpslld $31, %zmm0, %zmm0
+; KNL-NEXT: vptestmd %zmm0, %zmm0, %k0
+; KNL-NEXT: kmovw %k0, (%rdi)
+; KNL-NEXT: retq
+;
+; SKX-LABEL: store_16i1:
+; SKX: ## BB#0:
+; SKX-NEXT: vpsllw $7, %xmm0, %xmm0
+; SKX-NEXT: vpmovb2m %xmm0, %k0
+; SKX-NEXT: kmovw %k0, (%rdi)
+; SKX-NEXT: retq
+ store <16 x i1> %v, <16 x i1>* %a
+ ret void
+}
+
+define void @store_32i1(<32 x i1>* %a, <32 x i1> %v) {
+; KNL-LABEL: store_32i1:
+; KNL: ## BB#0:
+; KNL-NEXT: vextractf128 $1, %ymm0, %xmm1
+; KNL-NEXT: vpmovsxbd %xmm1, %zmm1
+; KNL-NEXT: vpslld $31, %zmm1, %zmm1
+; KNL-NEXT: vptestmd %zmm1, %zmm1, %k0
+; KNL-NEXT: kmovw %k0, 2(%rdi)
+; KNL-NEXT: vpmovsxbd %xmm0, %zmm0
+; KNL-NEXT: vpslld $31, %zmm0, %zmm0
+; KNL-NEXT: vptestmd %zmm0, %zmm0, %k0
+; KNL-NEXT: kmovw %k0, (%rdi)
+; KNL-NEXT: retq
+;
+; SKX-LABEL: store_32i1:
+; SKX: ## BB#0:
+; SKX-NEXT: vpsllw $7, %ymm0, %ymm0
+; SKX-NEXT: vpmovb2m %ymm0, %k0
+; SKX-NEXT: kmovd %k0, (%rdi)
+; SKX-NEXT: retq
+ store <32 x i1> %v, <32 x i1>* %a
+ ret void
+}
+
+define void @store_32i1_1(<32 x i1>* %a, <32 x i16> %v) {
+; KNL-LABEL: store_32i1_1:
+; KNL: ## BB#0:
+; KNL-NEXT: vpmovsxwd %ymm0, %zmm0
+; KNL-NEXT: vpmovdb %zmm0, %xmm0
+; KNL-NEXT: vpmovsxwd %ymm1, %zmm1
+; KNL-NEXT: vpmovdb %zmm1, %xmm1
+; KNL-NEXT: vpmovsxbd %xmm1, %zmm1
+; KNL-NEXT: vpslld $31, %zmm1, %zmm1
+; KNL-NEXT: vptestmd %zmm1, %zmm1, %k0
+; KNL-NEXT: kmovw %k0, 2(%rdi)
+; KNL-NEXT: vpmovsxbd %xmm0, %zmm0
+; KNL-NEXT: vpslld $31, %zmm0, %zmm0
+; KNL-NEXT: vptestmd %zmm0, %zmm0, %k0
+; KNL-NEXT: kmovw %k0, (%rdi)
+; KNL-NEXT: retq
+;
+; SKX-LABEL: store_32i1_1:
+; SKX: ## BB#0:
+; SKX-NEXT: vpsllw $15, %zmm0, %zmm0
+; SKX-NEXT: vpmovw2m %zmm0, %k0
+; SKX-NEXT: kmovd %k0, (%rdi)
+; SKX-NEXT: retq
+ %v1 = trunc <32 x i16> %v to <32 x i1>
+ store <32 x i1> %v1, <32 x i1>* %a
+ ret void
+}
+
+
+define void @store_64i1(<64 x i1>* %a, <64 x i1> %v) {
+;
+; SKX-LABEL: store_64i1:
+; SKX: ## BB#0:
+; SKX-NEXT: vpsllw $7, %zmm0, %zmm0
+; SKX-NEXT: vpmovb2m %zmm0, %k0
+; SKX-NEXT: kmovq %k0, (%rdi)
+; SKX-NEXT: retq
+ store <64 x i1> %v, <64 x i1>* %a
+ ret void
+}
+; NOTE: Assertions have been autogenerated by update_llc_test_checks.py
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+sse2 | FileCheck %s --check-prefix=SSE --check-prefix=SSE2
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+sse4.2 | FileCheck %s --check-prefix=SSE --check-prefix=SSE42
; AVX512-NEXT: vpcmpgtb %ymm6, %ymm2, %ymm2
; AVX512-NEXT: vpcmpgtb %ymm7, %ymm3, %ymm3
; AVX512-NEXT: vextracti128 $1, %ymm3, %xmm4
-; AVX512-NEXT: vpextrb $15, %xmm4, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 12(%rdi)
-; AVX512-NEXT: vpextrb $14, %xmm4, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 12(%rdi)
-; AVX512-NEXT: vpextrb $13, %xmm4, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 12(%rdi)
-; AVX512-NEXT: vpextrb $12, %xmm4, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 12(%rdi)
-; AVX512-NEXT: vpextrb $11, %xmm4, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 12(%rdi)
-; AVX512-NEXT: vpextrb $10, %xmm4, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 12(%rdi)
-; AVX512-NEXT: vpextrb $9, %xmm4, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 12(%rdi)
-; AVX512-NEXT: vpextrb $8, %xmm4, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 12(%rdi)
-; AVX512-NEXT: vpextrb $7, %xmm4, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 12(%rdi)
-; AVX512-NEXT: vpextrb $6, %xmm4, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 12(%rdi)
-; AVX512-NEXT: vpextrb $5, %xmm4, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 12(%rdi)
-; AVX512-NEXT: vpextrb $4, %xmm4, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 12(%rdi)
-; AVX512-NEXT: vpextrb $3, %xmm4, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 12(%rdi)
-; AVX512-NEXT: vpextrb $2, %xmm4, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 12(%rdi)
-; AVX512-NEXT: vpextrb $1, %xmm4, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 12(%rdi)
-; AVX512-NEXT: vpextrb $0, %xmm4, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 12(%rdi)
-; AVX512-NEXT: vpextrb $15, %xmm3, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 12(%rdi)
-; AVX512-NEXT: vpextrb $14, %xmm3, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 12(%rdi)
-; AVX512-NEXT: vpextrb $13, %xmm3, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 12(%rdi)
-; AVX512-NEXT: vpextrb $12, %xmm3, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 12(%rdi)
-; AVX512-NEXT: vpextrb $11, %xmm3, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 12(%rdi)
-; AVX512-NEXT: vpextrb $10, %xmm3, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 12(%rdi)
-; AVX512-NEXT: vpextrb $9, %xmm3, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 12(%rdi)
-; AVX512-NEXT: vpextrb $8, %xmm3, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 12(%rdi)
-; AVX512-NEXT: vpextrb $7, %xmm3, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 12(%rdi)
-; AVX512-NEXT: vpextrb $6, %xmm3, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 12(%rdi)
-; AVX512-NEXT: vpextrb $5, %xmm3, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 12(%rdi)
-; AVX512-NEXT: vpextrb $4, %xmm3, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 12(%rdi)
-; AVX512-NEXT: vpextrb $3, %xmm3, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 12(%rdi)
-; AVX512-NEXT: vpextrb $2, %xmm3, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 12(%rdi)
-; AVX512-NEXT: vpextrb $1, %xmm3, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 12(%rdi)
-; AVX512-NEXT: vpextrb $0, %xmm3, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 12(%rdi)
+; AVX512-NEXT: vpmovsxbd %xmm4, %zmm4
+; AVX512-NEXT: vpslld $31, %zmm4, %zmm4
+; AVX512-NEXT: vptestmd %zmm4, %zmm4, %k0
+; AVX512-NEXT: kmovw %k0, 14(%rdi)
+; AVX512-NEXT: vpmovsxbd %xmm3, %zmm3
+; AVX512-NEXT: vpslld $31, %zmm3, %zmm3
+; AVX512-NEXT: vptestmd %zmm3, %zmm3, %k0
+; AVX512-NEXT: kmovw %k0, 12(%rdi)
; AVX512-NEXT: vextracti128 $1, %ymm2, %xmm3
-; AVX512-NEXT: vpextrb $15, %xmm3, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 8(%rdi)
-; AVX512-NEXT: vpextrb $14, %xmm3, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 8(%rdi)
-; AVX512-NEXT: vpextrb $13, %xmm3, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 8(%rdi)
-; AVX512-NEXT: vpextrb $12, %xmm3, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 8(%rdi)
-; AVX512-NEXT: vpextrb $11, %xmm3, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 8(%rdi)
-; AVX512-NEXT: vpextrb $10, %xmm3, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 8(%rdi)
-; AVX512-NEXT: vpextrb $9, %xmm3, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 8(%rdi)
-; AVX512-NEXT: vpextrb $8, %xmm3, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 8(%rdi)
-; AVX512-NEXT: vpextrb $7, %xmm3, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 8(%rdi)
-; AVX512-NEXT: vpextrb $6, %xmm3, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 8(%rdi)
-; AVX512-NEXT: vpextrb $5, %xmm3, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 8(%rdi)
-; AVX512-NEXT: vpextrb $4, %xmm3, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 8(%rdi)
-; AVX512-NEXT: vpextrb $3, %xmm3, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 8(%rdi)
-; AVX512-NEXT: vpextrb $2, %xmm3, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 8(%rdi)
-; AVX512-NEXT: vpextrb $1, %xmm3, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 8(%rdi)
-; AVX512-NEXT: vpextrb $0, %xmm3, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 8(%rdi)
-; AVX512-NEXT: vpextrb $15, %xmm2, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 8(%rdi)
-; AVX512-NEXT: vpextrb $14, %xmm2, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 8(%rdi)
-; AVX512-NEXT: vpextrb $13, %xmm2, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 8(%rdi)
-; AVX512-NEXT: vpextrb $12, %xmm2, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 8(%rdi)
-; AVX512-NEXT: vpextrb $11, %xmm2, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 8(%rdi)
-; AVX512-NEXT: vpextrb $10, %xmm2, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 8(%rdi)
-; AVX512-NEXT: vpextrb $9, %xmm2, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 8(%rdi)
-; AVX512-NEXT: vpextrb $8, %xmm2, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 8(%rdi)
-; AVX512-NEXT: vpextrb $7, %xmm2, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 8(%rdi)
-; AVX512-NEXT: vpextrb $6, %xmm2, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 8(%rdi)
-; AVX512-NEXT: vpextrb $5, %xmm2, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 8(%rdi)
-; AVX512-NEXT: vpextrb $4, %xmm2, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 8(%rdi)
-; AVX512-NEXT: vpextrb $3, %xmm2, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 8(%rdi)
-; AVX512-NEXT: vpextrb $2, %xmm2, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 8(%rdi)
-; AVX512-NEXT: vpextrb $1, %xmm2, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 8(%rdi)
-; AVX512-NEXT: vpextrb $0, %xmm2, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 8(%rdi)
+; AVX512-NEXT: vpmovsxbd %xmm3, %zmm3
+; AVX512-NEXT: vpslld $31, %zmm3, %zmm3
+; AVX512-NEXT: vptestmd %zmm3, %zmm3, %k0
+; AVX512-NEXT: kmovw %k0, 10(%rdi)
+; AVX512-NEXT: vpmovsxbd %xmm2, %zmm2
+; AVX512-NEXT: vpslld $31, %zmm2, %zmm2
+; AVX512-NEXT: vptestmd %zmm2, %zmm2, %k0
+; AVX512-NEXT: kmovw %k0, 8(%rdi)
; AVX512-NEXT: vextracti128 $1, %ymm1, %xmm2
-; AVX512-NEXT: vpextrb $15, %xmm2, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 4(%rdi)
-; AVX512-NEXT: vpextrb $14, %xmm2, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 4(%rdi)
-; AVX512-NEXT: vpextrb $13, %xmm2, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 4(%rdi)
-; AVX512-NEXT: vpextrb $12, %xmm2, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 4(%rdi)
-; AVX512-NEXT: vpextrb $11, %xmm2, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 4(%rdi)
-; AVX512-NEXT: vpextrb $10, %xmm2, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 4(%rdi)
-; AVX512-NEXT: vpextrb $9, %xmm2, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 4(%rdi)
-; AVX512-NEXT: vpextrb $8, %xmm2, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 4(%rdi)
-; AVX512-NEXT: vpextrb $7, %xmm2, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 4(%rdi)
-; AVX512-NEXT: vpextrb $6, %xmm2, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 4(%rdi)
-; AVX512-NEXT: vpextrb $5, %xmm2, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 4(%rdi)
-; AVX512-NEXT: vpextrb $4, %xmm2, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 4(%rdi)
-; AVX512-NEXT: vpextrb $3, %xmm2, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 4(%rdi)
-; AVX512-NEXT: vpextrb $2, %xmm2, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 4(%rdi)
-; AVX512-NEXT: vpextrb $1, %xmm2, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 4(%rdi)
-; AVX512-NEXT: vpextrb $0, %xmm2, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 4(%rdi)
-; AVX512-NEXT: vpextrb $15, %xmm1, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 4(%rdi)
-; AVX512-NEXT: vpextrb $14, %xmm1, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 4(%rdi)
-; AVX512-NEXT: vpextrb $13, %xmm1, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 4(%rdi)
-; AVX512-NEXT: vpextrb $12, %xmm1, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 4(%rdi)
-; AVX512-NEXT: vpextrb $11, %xmm1, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 4(%rdi)
-; AVX512-NEXT: vpextrb $10, %xmm1, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 4(%rdi)
-; AVX512-NEXT: vpextrb $9, %xmm1, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 4(%rdi)
-; AVX512-NEXT: vpextrb $8, %xmm1, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 4(%rdi)
-; AVX512-NEXT: vpextrb $7, %xmm1, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 4(%rdi)
-; AVX512-NEXT: vpextrb $6, %xmm1, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 4(%rdi)
-; AVX512-NEXT: vpextrb $5, %xmm1, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 4(%rdi)
-; AVX512-NEXT: vpextrb $4, %xmm1, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 4(%rdi)
-; AVX512-NEXT: vpextrb $3, %xmm1, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 4(%rdi)
-; AVX512-NEXT: vpextrb $2, %xmm1, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 4(%rdi)
-; AVX512-NEXT: vpextrb $1, %xmm1, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 4(%rdi)
-; AVX512-NEXT: vpextrb $0, %xmm1, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, 4(%rdi)
+; AVX512-NEXT: vpmovsxbd %xmm2, %zmm2
+; AVX512-NEXT: vpslld $31, %zmm2, %zmm2
+; AVX512-NEXT: vptestmd %zmm2, %zmm2, %k0
+; AVX512-NEXT: kmovw %k0, 6(%rdi)
+; AVX512-NEXT: vpmovsxbd %xmm1, %zmm1
+; AVX512-NEXT: vpslld $31, %zmm1, %zmm1
+; AVX512-NEXT: vptestmd %zmm1, %zmm1, %k0
+; AVX512-NEXT: kmovw %k0, 4(%rdi)
; AVX512-NEXT: vextracti128 $1, %ymm0, %xmm1
-; AVX512-NEXT: vpextrb $15, %xmm1, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, (%rdi)
-; AVX512-NEXT: vpextrb $14, %xmm1, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, (%rdi)
-; AVX512-NEXT: vpextrb $13, %xmm1, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, (%rdi)
-; AVX512-NEXT: vpextrb $12, %xmm1, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, (%rdi)
-; AVX512-NEXT: vpextrb $11, %xmm1, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, (%rdi)
-; AVX512-NEXT: vpextrb $10, %xmm1, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, (%rdi)
-; AVX512-NEXT: vpextrb $9, %xmm1, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, (%rdi)
-; AVX512-NEXT: vpextrb $8, %xmm1, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, (%rdi)
-; AVX512-NEXT: vpextrb $7, %xmm1, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, (%rdi)
-; AVX512-NEXT: vpextrb $6, %xmm1, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, (%rdi)
-; AVX512-NEXT: vpextrb $5, %xmm1, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, (%rdi)
-; AVX512-NEXT: vpextrb $4, %xmm1, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, (%rdi)
-; AVX512-NEXT: vpextrb $3, %xmm1, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, (%rdi)
-; AVX512-NEXT: vpextrb $2, %xmm1, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, (%rdi)
-; AVX512-NEXT: vpextrb $1, %xmm1, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, (%rdi)
-; AVX512-NEXT: vpextrb $0, %xmm1, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, (%rdi)
-; AVX512-NEXT: vpextrb $15, %xmm0, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, (%rdi)
-; AVX512-NEXT: vpextrb $14, %xmm0, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, (%rdi)
-; AVX512-NEXT: vpextrb $13, %xmm0, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, (%rdi)
-; AVX512-NEXT: vpextrb $12, %xmm0, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, (%rdi)
-; AVX512-NEXT: vpextrb $11, %xmm0, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, (%rdi)
-; AVX512-NEXT: vpextrb $10, %xmm0, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, (%rdi)
-; AVX512-NEXT: vpextrb $9, %xmm0, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, (%rdi)
-; AVX512-NEXT: vpextrb $8, %xmm0, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, (%rdi)
-; AVX512-NEXT: vpextrb $7, %xmm0, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, (%rdi)
-; AVX512-NEXT: vpextrb $6, %xmm0, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, (%rdi)
-; AVX512-NEXT: vpextrb $5, %xmm0, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, (%rdi)
-; AVX512-NEXT: vpextrb $4, %xmm0, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, (%rdi)
-; AVX512-NEXT: vpextrb $3, %xmm0, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, (%rdi)
-; AVX512-NEXT: vpextrb $2, %xmm0, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, (%rdi)
-; AVX512-NEXT: vpextrb $1, %xmm0, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, (%rdi)
-; AVX512-NEXT: vpextrb $0, %xmm0, %eax
-; AVX512-NEXT: andb $1, %al
-; AVX512-NEXT: movb %al, (%rdi)
+; AVX512-NEXT: vpmovsxbd %xmm1, %zmm1
+; AVX512-NEXT: vpslld $31, %zmm1, %zmm1
+; AVX512-NEXT: vptestmd %zmm1, %zmm1, %k0
+; AVX512-NEXT: kmovw %k0, 2(%rdi)
+; AVX512-NEXT: vpmovsxbd %xmm0, %zmm0
+; AVX512-NEXT: vpslld $31, %zmm0, %zmm0
+; AVX512-NEXT: vptestmd %zmm0, %zmm0, %k0
+; AVX512-NEXT: kmovw %k0, (%rdi)
; AVX512-NEXT: movq %rdi, %rax
; AVX512-NEXT: retq
%1 = icmp sgt <128 x i8> %a0, %a1