// If the kshift instructions of the correct width aren't natively supported
// then we need to promote the vector to the native size to get the correct
// zeroing behavior.
- bool HasNativeShift = true;
if ((!Subtarget.hasDQI() && NumElems == 8) || (NumElems < 8)) {
- HasNativeShift = false;
- // For now don't do this if we are going to end up using the shuffle
- // below. This minimizes test diffs.
- // TODO: Remove this restriction once we no longer need a shuffle fallback.
- if (Vec.isUndef() || IdxVal == 0) {
- // Need to promote to v16i1, do the insert, then extract back.
- Vec = DAG.getNode(ISD::INSERT_SUBVECTOR, dl, MVT::v16i1,
- DAG.getUNDEF(MVT::v16i1), Vec,
- DAG.getIntPtrConstant(0, dl));
- Op = DAG.getNode(ISD::INSERT_VECTOR_ELT, dl, MVT::v16i1, Vec, Elt, Idx);
- return DAG.getNode(ISD::EXTRACT_SUBVECTOR, dl, VecVT, Op,
- DAG.getIntPtrConstant(0, dl));
- }
+ // Need to promote to v16i1, do the insert, then extract back.
+ Vec = DAG.getNode(ISD::INSERT_SUBVECTOR, dl, MVT::v16i1,
+ DAG.getUNDEF(MVT::v16i1), Vec,
+ DAG.getIntPtrConstant(0, dl));
+ Op = DAG.getNode(ISD::INSERT_VECTOR_ELT, dl, MVT::v16i1, Vec, Elt, Idx);
+ return DAG.getNode(ISD::EXTRACT_SUBVECTOR, dl, VecVT, Op,
+ DAG.getIntPtrConstant(0, dl));
}
SDValue EltInVec = DAG.getNode(ISD::SCALAR_TO_VECTOR, dl, VecVT, Elt);
return DAG.getNode(ISD::OR, dl, VecVT, Vec, EltInVec);
}
// Insertion of one bit into last position
- if (HasNativeShift && IdxVal == NumElems - 1) {
+ if (IdxVal == NumElems - 1) {
// Move the bit to the last position inside the vector.
EltInVec = DAG.getNode(X86ISD::KSHIFTL, dl, VecVT, EltInVec,
DAG.getConstant(IdxVal, dl, MVT::i8));
return DAG.getNode(ISD::OR, dl, VecVT, Vec, EltInVec);
}
- // Use shuffle to insert element.
- SmallVector<int, 64> MaskVec(NumElems);
- for (unsigned i = 0; i != NumElems; ++i)
- MaskVec[i] = (i == IdxVal) ? NumElems : i;
-
- return DAG.getVectorShuffle(VecVT, dl, Vec, EltInVec, MaskVec);
+ // Move the current value of the bit to be replace to bit 0.
+ SDValue Merged = DAG.getNode(X86ISD::KSHIFTR, dl, VecVT, Vec,
+ DAG.getConstant(IdxVal, dl, MVT::i8));
+ // Xor with the new bit.
+ Merged = DAG.getNode(ISD::XOR, dl, VecVT, Merged, EltInVec);
+ // Shift to MSB, filling bottom bits with 0.
+ Merged = DAG.getNode(X86ISD::KSHIFTL, dl, VecVT, Merged,
+ DAG.getConstant(NumElems - 1, dl, MVT::i8));
+ // Shift to the final position, filling upper bits with 0.
+ Merged = DAG.getNode(X86ISD::KSHIFTR, dl, VecVT, Merged,
+ DAG.getConstant(NumElems - 1 - IdxVal, dl, MVT::i8));
+ // Xor with original vector to cancel out the original bit value that's still
+ // present.
+ return DAG.getNode(ISD::XOR, dl, VecVT, Merged, Vec);
}
SDValue X86TargetLowering::LowerINSERT_VECTOR_ELT(SDValue Op,
; KNL-LABEL: test16:
; KNL: ## %bb.0:
; KNL-NEXT: movb (%rdi), %al
-; KNL-NEXT: kmovw %esi, %k1
-; KNL-NEXT: kmovw %eax, %k2
-; KNL-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k2} {z}
-; KNL-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; KNL-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,3,4,5,6,7,8,9,16,11,12,13,14,15]
-; KNL-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; KNL-NEXT: vpslld $31, %zmm2, %zmm0
-; KNL-NEXT: vptestmd %zmm0, %zmm0, %k0
+; KNL-NEXT: kmovw %esi, %k0
+; KNL-NEXT: kmovw %eax, %k1
+; KNL-NEXT: kshiftrw $10, %k0, %k2
+; KNL-NEXT: kxorw %k1, %k2, %k1
+; KNL-NEXT: kshiftlw $15, %k1, %k1
+; KNL-NEXT: kshiftrw $5, %k1, %k1
+; KNL-NEXT: kxorw %k0, %k1, %k0
; KNL-NEXT: kmovw %k0, %eax
; KNL-NEXT: ## kill: def %ax killed %ax killed %eax
-; KNL-NEXT: vzeroupper
; KNL-NEXT: retq
;
; SKX-LABEL: test16:
; SKX: ## %bb.0:
; SKX-NEXT: kmovb (%rdi), %k0
; SKX-NEXT: kmovd %esi, %k1
-; SKX-NEXT: vpmovm2d %k0, %zmm0
-; SKX-NEXT: vpmovm2d %k1, %zmm1
-; SKX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,3,4,5,6,7,8,9,16,11,12,13,14,15]
-; SKX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; SKX-NEXT: vpmovd2m %zmm2, %k0
+; SKX-NEXT: kshiftrw $10, %k1, %k2
+; SKX-NEXT: kxorw %k0, %k2, %k0
+; SKX-NEXT: kshiftlw $15, %k0, %k0
+; SKX-NEXT: kshiftrw $5, %k0, %k0
+; SKX-NEXT: kxorw %k1, %k0, %k0
; SKX-NEXT: kmovd %k0, %eax
; SKX-NEXT: ## kill: def %ax killed %ax killed %eax
-; SKX-NEXT: vzeroupper
; SKX-NEXT: retq
%x = load i1 , i1 * %addr, align 128
%a1 = bitcast i16 %a to <16 x i1>
; KNL-LABEL: test17:
; KNL: ## %bb.0:
; KNL-NEXT: movb (%rdi), %al
-; KNL-NEXT: kmovw %esi, %k1
-; KNL-NEXT: kmovw %eax, %k2
-; KNL-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k2} {z}
-; KNL-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; KNL-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,3,8,5,6,7]
-; KNL-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; KNL-NEXT: vpsllq $63, %zmm2, %zmm0
-; KNL-NEXT: vptestmq %zmm0, %zmm0, %k0
+; KNL-NEXT: kmovw %esi, %k0
+; KNL-NEXT: kmovw %eax, %k1
+; KNL-NEXT: kshiftrw $4, %k0, %k2
+; KNL-NEXT: kxorw %k1, %k2, %k1
+; KNL-NEXT: kshiftlw $15, %k1, %k1
+; KNL-NEXT: kshiftrw $11, %k1, %k1
+; KNL-NEXT: kxorw %k0, %k1, %k0
; KNL-NEXT: kmovw %k0, %eax
; KNL-NEXT: ## kill: def %al killed %al killed %eax
-; KNL-NEXT: vzeroupper
; KNL-NEXT: retq
;
; SKX-LABEL: test17:
; SKX: ## %bb.0:
; SKX-NEXT: kmovb (%rdi), %k0
; SKX-NEXT: kmovd %esi, %k1
-; SKX-NEXT: vpmovm2q %k0, %zmm0
-; SKX-NEXT: vpmovm2q %k1, %zmm1
-; SKX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,3,8,5,6,7]
-; SKX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; SKX-NEXT: vpmovq2m %zmm2, %k0
+; SKX-NEXT: kshiftrb $4, %k1, %k2
+; SKX-NEXT: kxorb %k0, %k2, %k0
+; SKX-NEXT: kshiftlb $7, %k0, %k0
+; SKX-NEXT: kshiftrb $3, %k0, %k0
+; SKX-NEXT: kxorb %k1, %k0, %k0
; SKX-NEXT: kmovd %k0, %eax
; SKX-NEXT: ## kill: def %al killed %al killed %eax
-; SKX-NEXT: vzeroupper
; SKX-NEXT: retq
%x = load i1 , i1 * %addr, align 128
%a1 = bitcast i8 %a to <8 x i1>
; SKX-NEXT: vpcmpltud %zmm2, %zmm0, %k0
; SKX-NEXT: vpcmpltud %zmm3, %zmm1, %k1
; SKX-NEXT: kunpckwd %k0, %k1, %k0
-; SKX-NEXT: vpmovm2w %k0, %zmm0
-; SKX-NEXT: kmovd %eax, %k0
-; SKX-NEXT: vpmovm2w %k0, %zmm1
-; SKX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,3,32,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31]
-; SKX-NEXT: vpermi2w %zmm1, %zmm0, %zmm2
-; SKX-NEXT: vpmovw2m %zmm2, %k0
+; SKX-NEXT: kshiftrd $4, %k0, %k1
+; SKX-NEXT: kmovd %eax, %k2
+; SKX-NEXT: kxord %k2, %k1, %k1
+; SKX-NEXT: kshiftld $31, %k1, %k1
+; SKX-NEXT: kshiftrd $27, %k1, %k1
+; SKX-NEXT: kxord %k0, %k1, %k0
; SKX-NEXT: kmovd %k0, %eax
; SKX-NEXT: vzeroupper
; SKX-NEXT: retq
; KNL-NEXT: vpxor %xmm2, %xmm1, %xmm1
; KNL-NEXT: vpcmpgtd %xmm0, %xmm1, %xmm0
; KNL-NEXT: vpextrb $4, %xmm0, %ecx
-; KNL-NEXT: kmovw %ecx, %k1
-; KNL-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; KNL-NEXT: kmovw %ecx, %k0
; KNL-NEXT: vpextrb $0, %xmm0, %ecx
; KNL-NEXT: andl $1, %ecx
-; KNL-NEXT: kmovw %ecx, %k0
-; KNL-NEXT: kshiftrw $1, %k0, %k1
-; KNL-NEXT: kshiftlw $1, %k1, %k1
-; KNL-NEXT: korw %k0, %k1, %k1
-; KNL-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; KNL-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; KNL-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; KNL-NEXT: vpsllq $63, %zmm3, %zmm1
-; KNL-NEXT: vptestmq %zmm1, %zmm1, %k1
-; KNL-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; KNL-NEXT: kmovw %eax, %k1
-; KNL-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; KNL-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; KNL-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; KNL-NEXT: vpsllq $63, %zmm3, %zmm1
-; KNL-NEXT: vptestmq %zmm1, %zmm1, %k1
-; KNL-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; KNL-NEXT: kmovw %ecx, %k1
+; KNL-NEXT: kshiftrw $1, %k0, %k2
+; KNL-NEXT: kshiftlw $1, %k2, %k2
+; KNL-NEXT: korw %k1, %k2, %k1
+; KNL-NEXT: kshiftrw $1, %k1, %k2
+; KNL-NEXT: kxorw %k0, %k2, %k0
+; KNL-NEXT: kshiftlw $15, %k0, %k0
+; KNL-NEXT: kshiftrw $14, %k0, %k0
+; KNL-NEXT: kxorw %k1, %k0, %k0
+; KNL-NEXT: kshiftrw $2, %k0, %k1
+; KNL-NEXT: kmovw %eax, %k2
+; KNL-NEXT: kxorw %k2, %k1, %k1
+; KNL-NEXT: kshiftlw $15, %k1, %k1
+; KNL-NEXT: kshiftrw $13, %k1, %k1
+; KNL-NEXT: kxorw %k0, %k1, %k0
+; KNL-NEXT: kshiftrw $3, %k0, %k1
; KNL-NEXT: vpextrb $12, %xmm0, %eax
-; KNL-NEXT: kmovw %eax, %k1
-; KNL-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; KNL-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; KNL-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; KNL-NEXT: vpsllq $63, %zmm2, %zmm0
-; KNL-NEXT: vptestmq %zmm0, %zmm0, %k0
+; KNL-NEXT: kmovw %eax, %k2
+; KNL-NEXT: kxorw %k2, %k1, %k1
+; KNL-NEXT: kshiftlw $15, %k1, %k1
+; KNL-NEXT: kshiftrw $12, %k1, %k1
+; KNL-NEXT: kxorw %k0, %k1, %k0
; KNL-NEXT: kmovw %k0, %eax
; KNL-NEXT: ## kill: def %al killed %al killed %eax
-; KNL-NEXT: vzeroupper
; KNL-NEXT: retq
;
; SKX-LABEL: test_iinsertelement_v4i1:
; SKX-NEXT: cmpl %esi, %edi
; SKX-NEXT: setb %al
; SKX-NEXT: vpcmpltud %xmm1, %xmm0, %k0
-; SKX-NEXT: vpmovm2d %k0, %xmm0
-; SKX-NEXT: kmovd %eax, %k0
-; SKX-NEXT: vpmovm2d %k0, %xmm1
-; SKX-NEXT: vpbroadcastq %xmm1, %xmm1
-; SKX-NEXT: vpblendd {{.*#+}} xmm0 = xmm0[0,1],xmm1[2],xmm0[3]
-; SKX-NEXT: vpmovd2m %xmm0, %k0
+; SKX-NEXT: kshiftrw $2, %k0, %k1
+; SKX-NEXT: kmovd %eax, %k2
+; SKX-NEXT: kxorw %k2, %k1, %k1
+; SKX-NEXT: kshiftlw $15, %k1, %k1
+; SKX-NEXT: kshiftrw $13, %k1, %k1
+; SKX-NEXT: kxorw %k0, %k1, %k0
; SKX-NEXT: kmovd %k0, %eax
; SKX-NEXT: ## kill: def %al killed %al killed %eax
; SKX-NEXT: retq
; KNL-NEXT: kmovw %ecx, %k0
; KNL-NEXT: kshiftrw $1, %k0, %k1
; KNL-NEXT: kshiftlw $1, %k1, %k1
-; KNL-NEXT: korw %k0, %k1, %k1
-; KNL-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; KNL-NEXT: kmovw %eax, %k1
-; KNL-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; KNL-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,8,2,3,4,5,6,7]
-; KNL-NEXT: vpermi2q %zmm1, %zmm0, %zmm2
-; KNL-NEXT: vpsllq $63, %zmm2, %zmm0
-; KNL-NEXT: vptestmq %zmm0, %zmm0, %k0
+; KNL-NEXT: korw %k0, %k1, %k0
+; KNL-NEXT: kshiftrw $1, %k0, %k1
+; KNL-NEXT: kmovw %eax, %k2
+; KNL-NEXT: kxorw %k2, %k1, %k1
+; KNL-NEXT: kshiftlw $15, %k1, %k1
+; KNL-NEXT: kshiftrw $14, %k1, %k1
+; KNL-NEXT: kxorw %k0, %k1, %k0
; KNL-NEXT: kmovw %k0, %eax
; KNL-NEXT: ## kill: def %al killed %al killed %eax
-; KNL-NEXT: vzeroupper
; KNL-NEXT: retq
;
; SKX-LABEL: test_iinsertelement_v2i1:
; SKX-NEXT: cmpl %esi, %edi
; SKX-NEXT: setb %al
; SKX-NEXT: vpcmpltuq %xmm1, %xmm0, %k0
-; SKX-NEXT: vpmovm2q %k0, %xmm0
-; SKX-NEXT: kmovd %eax, %k0
-; SKX-NEXT: vpmovm2q %k0, %xmm1
-; SKX-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm0[0],xmm1[0]
-; SKX-NEXT: vpmovq2m %xmm0, %k0
+; SKX-NEXT: kshiftrw $1, %k0, %k1
+; SKX-NEXT: kmovd %eax, %k2
+; SKX-NEXT: kxorw %k2, %k1, %k1
+; SKX-NEXT: kshiftlw $15, %k1, %k1
+; SKX-NEXT: kshiftrw $14, %k1, %k1
+; SKX-NEXT: kxorw %k0, %k1, %k0
; SKX-NEXT: kmovd %k0, %eax
; SKX-NEXT: ## kill: def %al killed %al killed %eax
; SKX-NEXT: retq
; SKX-NEXT: kmovq %rdi, %k0
; SKX-NEXT: movb $1, %al
; SKX-NEXT: kmovd %eax, %k1
-; SKX-NEXT: vpmovm2b %k1, %zmm0
-; SKX-NEXT: vpsllq $40, %xmm0, %xmm0
-; SKX-NEXT: vpmovm2b %k0, %zmm1
-; SKX-NEXT: movl $32, %eax
-; SKX-NEXT: kmovd %eax, %k1
-; SKX-NEXT: vpblendmb %ymm0, %ymm1, %ymm0 {%k1}
-; SKX-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; SKX-NEXT: vpmovb2m %zmm0, %k0
+; SKX-NEXT: kshiftrq $5, %k0, %k2
+; SKX-NEXT: kxorq %k1, %k2, %k1
+; SKX-NEXT: kshiftlq $63, %k1, %k1
+; SKX-NEXT: kshiftrq $58, %k1, %k1
+; SKX-NEXT: kxorq %k0, %k1, %k0
; SKX-NEXT: vpmovm2b %k0, %zmm0
; SKX-NEXT: retq
;
; AVX512BW-NEXT: kmovq %rdi, %k0
; AVX512BW-NEXT: movb $1, %al
; AVX512BW-NEXT: kmovd %eax, %k1
-; AVX512BW-NEXT: vpmovm2b %k1, %zmm0
-; AVX512BW-NEXT: vpsllq $40, %xmm0, %xmm0
-; AVX512BW-NEXT: vpmovm2b %k0, %zmm1
-; AVX512BW-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512BW-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; AVX512BW-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; AVX512BW-NEXT: vpmovb2m %zmm0, %k0
+; AVX512BW-NEXT: kshiftrq $5, %k0, %k2
+; AVX512BW-NEXT: kxorq %k1, %k2, %k1
+; AVX512BW-NEXT: kshiftlq $63, %k1, %k1
+; AVX512BW-NEXT: kshiftrq $58, %k1, %k1
+; AVX512BW-NEXT: kxorq %k0, %k1, %k0
; AVX512BW-NEXT: vpmovm2b %k0, %zmm0
; AVX512BW-NEXT: retq
;
; SKX-NEXT: cmpl %edx, %esi
; SKX-NEXT: setg %al
; SKX-NEXT: kmovd %eax, %k1
-; SKX-NEXT: vpmovm2b %k1, %zmm0
-; SKX-NEXT: vpsllq $40, %xmm0, %xmm0
-; SKX-NEXT: vpmovm2b %k0, %zmm1
-; SKX-NEXT: movl $32, %eax
-; SKX-NEXT: kmovd %eax, %k1
-; SKX-NEXT: vpblendmb %ymm0, %ymm1, %ymm0 {%k1}
-; SKX-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; SKX-NEXT: vpmovb2m %zmm0, %k0
+; SKX-NEXT: kshiftrq $5, %k0, %k2
+; SKX-NEXT: kxorq %k1, %k2, %k1
+; SKX-NEXT: kshiftlq $63, %k1, %k1
+; SKX-NEXT: kshiftrq $58, %k1, %k1
+; SKX-NEXT: kxorq %k0, %k1, %k0
; SKX-NEXT: vpmovm2b %k0, %zmm0
; SKX-NEXT: retq
;
; AVX512BW-NEXT: cmpl %edx, %esi
; AVX512BW-NEXT: setg %al
; AVX512BW-NEXT: kmovd %eax, %k1
-; AVX512BW-NEXT: vpmovm2b %k1, %zmm0
-; AVX512BW-NEXT: vpsllq $40, %xmm0, %xmm0
-; AVX512BW-NEXT: vpmovm2b %k0, %zmm1
-; AVX512BW-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512BW-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; AVX512BW-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; AVX512BW-NEXT: vpmovb2m %zmm0, %k0
+; AVX512BW-NEXT: kshiftrq $5, %k0, %k2
+; AVX512BW-NEXT: kxorq %k1, %k2, %k1
+; AVX512BW-NEXT: kshiftlq $63, %k1, %k1
+; AVX512BW-NEXT: kshiftrq $58, %k1, %k1
+; AVX512BW-NEXT: kxorq %k0, %k1, %k0
; AVX512BW-NEXT: vpmovm2b %k0, %zmm0
; AVX512BW-NEXT: retq
;
define <8 x i1> @test18(i8 %a, i16 %y) {
; KNL-LABEL: test18:
; KNL: ## %bb.0:
-; KNL-NEXT: kmovw %edi, %k2
-; KNL-NEXT: kmovw %esi, %k0
-; KNL-NEXT: kshiftlw $7, %k0, %k1
+; KNL-NEXT: kmovw %edi, %k0
+; KNL-NEXT: kmovw %esi, %k1
+; KNL-NEXT: kshiftlw $7, %k1, %k2
+; KNL-NEXT: kshiftrw $15, %k2, %k2
+; KNL-NEXT: kshiftlw $6, %k1, %k1
; KNL-NEXT: kshiftrw $15, %k1, %k1
-; KNL-NEXT: kshiftlw $6, %k0, %k0
-; KNL-NEXT: kshiftrw $15, %k0, %k3
-; KNL-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k2} {z}
-; KNL-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k3} {z}
-; KNL-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,3,4,5,8,7]
-; KNL-NEXT: vpermi2q %zmm1, %zmm0, %zmm2
-; KNL-NEXT: vpsllq $63, %zmm2, %zmm0
-; KNL-NEXT: vptestmq %zmm0, %zmm0, %k2
-; KNL-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k2} {z}
-; KNL-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; KNL-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,3,4,5,6,8]
-; KNL-NEXT: vpermi2q %zmm1, %zmm0, %zmm2
-; KNL-NEXT: vpsllq $63, %zmm2, %zmm0
-; KNL-NEXT: vptestmq %zmm0, %zmm0, %k1
+; KNL-NEXT: kshiftrw $6, %k0, %k3
+; KNL-NEXT: kxorw %k1, %k3, %k1
+; KNL-NEXT: kshiftlw $15, %k1, %k1
+; KNL-NEXT: kshiftrw $9, %k1, %k1
+; KNL-NEXT: kxorw %k0, %k1, %k0
+; KNL-NEXT: kshiftrw $7, %k0, %k1
+; KNL-NEXT: kxorw %k2, %k1, %k1
+; KNL-NEXT: kshiftlw $15, %k1, %k1
+; KNL-NEXT: kshiftrw $8, %k1, %k1
+; KNL-NEXT: kxorw %k0, %k1, %k1
; KNL-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
; KNL-NEXT: vpmovdw %zmm0, %ymm0
; KNL-NEXT: ## kill: def %xmm0 killed %xmm0 killed %ymm0
;
; SKX-LABEL: test18:
; SKX: ## %bb.0:
-; SKX-NEXT: kmovd %edi, %k1
-; SKX-NEXT: kmovd %esi, %k2
-; SKX-NEXT: kshiftlw $7, %k2, %k0
-; SKX-NEXT: kshiftrw $15, %k0, %k0
-; SKX-NEXT: kshiftlw $6, %k2, %k2
+; SKX-NEXT: kmovd %edi, %k0
+; SKX-NEXT: kmovd %esi, %k1
+; SKX-NEXT: kshiftlw $7, %k1, %k2
; SKX-NEXT: kshiftrw $15, %k2, %k2
-; SKX-NEXT: vpmovm2q %k1, %zmm0
-; SKX-NEXT: vpmovm2q %k2, %zmm1
-; SKX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,3,4,5,8,7]
-; SKX-NEXT: vpermi2q %zmm1, %zmm0, %zmm2
-; SKX-NEXT: vpmovq2m %zmm2, %k1
-; SKX-NEXT: kshiftlb $1, %k1, %k1
+; SKX-NEXT: kshiftlw $6, %k1, %k1
+; SKX-NEXT: kshiftrw $15, %k1, %k1
+; SKX-NEXT: kshiftrb $6, %k0, %k3
+; SKX-NEXT: kxorb %k1, %k3, %k1
+; SKX-NEXT: kshiftlb $7, %k1, %k1
; SKX-NEXT: kshiftrb $1, %k1, %k1
-; SKX-NEXT: kshiftlb $7, %k0, %k0
-; SKX-NEXT: korb %k0, %k1, %k0
+; SKX-NEXT: kxorb %k0, %k1, %k0
+; SKX-NEXT: kshiftlb $1, %k0, %k0
+; SKX-NEXT: kshiftrb $1, %k0, %k0
+; SKX-NEXT: kshiftlb $7, %k2, %k1
+; SKX-NEXT: korb %k1, %k0, %k0
; SKX-NEXT: vpmovm2w %k0, %xmm0
-; SKX-NEXT: vzeroupper
; SKX-NEXT: retq
;
; AVX512BW-LABEL: test18:
; AVX512BW: ## %bb.0:
-; AVX512BW-NEXT: kmovd %edi, %k2
-; AVX512BW-NEXT: kmovd %esi, %k0
-; AVX512BW-NEXT: kshiftlw $7, %k0, %k1
+; AVX512BW-NEXT: kmovd %edi, %k0
+; AVX512BW-NEXT: kmovd %esi, %k1
+; AVX512BW-NEXT: kshiftlw $7, %k1, %k2
+; AVX512BW-NEXT: kshiftrw $15, %k2, %k2
+; AVX512BW-NEXT: kshiftlw $6, %k1, %k1
; AVX512BW-NEXT: kshiftrw $15, %k1, %k1
-; AVX512BW-NEXT: kshiftlw $6, %k0, %k0
-; AVX512BW-NEXT: kshiftrw $15, %k0, %k3
-; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k2} {z}
-; AVX512BW-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k3} {z}
-; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,3,4,5,8,7]
-; AVX512BW-NEXT: vpermi2q %zmm1, %zmm0, %zmm2
-; AVX512BW-NEXT: vpsllq $63, %zmm2, %zmm0
-; AVX512BW-NEXT: vptestmq %zmm0, %zmm0, %k2
-; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k2} {z}
-; AVX512BW-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,3,4,5,6,8]
-; AVX512BW-NEXT: vpermi2q %zmm1, %zmm0, %zmm2
-; AVX512BW-NEXT: vpsllq $63, %zmm2, %zmm0
-; AVX512BW-NEXT: vptestmq %zmm0, %zmm0, %k0
+; AVX512BW-NEXT: kshiftrw $6, %k0, %k3
+; AVX512BW-NEXT: kxorw %k1, %k3, %k1
+; AVX512BW-NEXT: kshiftlw $15, %k1, %k1
+; AVX512BW-NEXT: kshiftrw $9, %k1, %k1
+; AVX512BW-NEXT: kxorw %k0, %k1, %k0
+; AVX512BW-NEXT: kshiftrw $7, %k0, %k1
+; AVX512BW-NEXT: kxorw %k2, %k1, %k1
+; AVX512BW-NEXT: kshiftlw $15, %k1, %k1
+; AVX512BW-NEXT: kshiftrw $8, %k1, %k1
+; AVX512BW-NEXT: kxorw %k0, %k1, %k0
; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
; AVX512BW-NEXT: ## kill: def %xmm0 killed %xmm0 killed %zmm0
; AVX512BW-NEXT: vzeroupper
;
; AVX512DQ-LABEL: test18:
; AVX512DQ: ## %bb.0:
-; AVX512DQ-NEXT: kmovw %edi, %k1
-; AVX512DQ-NEXT: kmovw %esi, %k2
-; AVX512DQ-NEXT: kshiftlw $7, %k2, %k0
-; AVX512DQ-NEXT: kshiftrw $15, %k0, %k0
-; AVX512DQ-NEXT: kshiftlw $6, %k2, %k2
+; AVX512DQ-NEXT: kmovw %edi, %k0
+; AVX512DQ-NEXT: kmovw %esi, %k1
+; AVX512DQ-NEXT: kshiftlw $7, %k1, %k2
; AVX512DQ-NEXT: kshiftrw $15, %k2, %k2
-; AVX512DQ-NEXT: vpmovm2q %k1, %zmm0
-; AVX512DQ-NEXT: vpmovm2q %k2, %zmm1
-; AVX512DQ-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,3,4,5,8,7]
-; AVX512DQ-NEXT: vpermi2q %zmm1, %zmm0, %zmm2
-; AVX512DQ-NEXT: vpmovq2m %zmm2, %k1
-; AVX512DQ-NEXT: kshiftlb $1, %k1, %k1
+; AVX512DQ-NEXT: kshiftlw $6, %k1, %k1
+; AVX512DQ-NEXT: kshiftrw $15, %k1, %k1
+; AVX512DQ-NEXT: kshiftrb $6, %k0, %k3
+; AVX512DQ-NEXT: kxorb %k1, %k3, %k1
+; AVX512DQ-NEXT: kshiftlb $7, %k1, %k1
; AVX512DQ-NEXT: kshiftrb $1, %k1, %k1
-; AVX512DQ-NEXT: kshiftlb $7, %k0, %k0
-; AVX512DQ-NEXT: korb %k0, %k1, %k0
+; AVX512DQ-NEXT: kxorb %k0, %k1, %k0
+; AVX512DQ-NEXT: kshiftlb $1, %k0, %k0
+; AVX512DQ-NEXT: kshiftrb $1, %k0, %k0
+; AVX512DQ-NEXT: kshiftlb $7, %k2, %k1
+; AVX512DQ-NEXT: korb %k1, %k0, %k0
; AVX512DQ-NEXT: vpmovm2d %k0, %zmm0
; AVX512DQ-NEXT: vpmovdw %zmm0, %ymm0
; AVX512DQ-NEXT: ## kill: def %xmm0 killed %xmm0 killed %ymm0
; GENERIC-NEXT: kmovq %rdi, %k0 # sched: [1:0.33]
; GENERIC-NEXT: movb $1, %al # sched: [1:0.33]
; GENERIC-NEXT: kmovd %eax, %k1 # sched: [1:0.33]
-; GENERIC-NEXT: vpmovm2b %k1, %zmm0 # sched: [1:0.33]
-; GENERIC-NEXT: vpsllq $40, %xmm0, %xmm0 # sched: [1:1.00]
-; GENERIC-NEXT: vpmovm2b %k0, %zmm1 # sched: [1:0.33]
-; GENERIC-NEXT: movl $32, %eax # sched: [1:0.33]
-; GENERIC-NEXT: kmovd %eax, %k1 # sched: [1:0.33]
-; GENERIC-NEXT: vpblendmb %ymm0, %ymm1, %ymm0 {%k1} # sched: [2:1.00]
-; GENERIC-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7] sched: [1:1.00]
-; GENERIC-NEXT: vpmovb2m %zmm0, %k0 # sched: [1:0.33]
+; GENERIC-NEXT: kshiftrq $5, %k0, %k2 # sched: [1:1.00]
+; GENERIC-NEXT: kxorq %k1, %k2, %k1 # sched: [1:1.00]
+; GENERIC-NEXT: kshiftlq $63, %k1, %k1 # sched: [1:1.00]
+; GENERIC-NEXT: kshiftrq $58, %k1, %k1 # sched: [1:1.00]
+; GENERIC-NEXT: kxorq %k0, %k1, %k0 # sched: [1:1.00]
; GENERIC-NEXT: vpmovm2b %k0, %zmm0 # sched: [1:0.33]
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; SKX-NEXT: kmovq %rdi, %k0 # sched: [1:1.00]
; SKX-NEXT: movb $1, %al # sched: [1:0.25]
; SKX-NEXT: kmovd %eax, %k1 # sched: [1:1.00]
-; SKX-NEXT: vpmovm2b %k1, %zmm0 # sched: [1:0.25]
-; SKX-NEXT: vpsllq $40, %xmm0, %xmm0 # sched: [1:0.50]
-; SKX-NEXT: vpmovm2b %k0, %zmm1 # sched: [1:0.25]
-; SKX-NEXT: movl $32, %eax # sched: [1:0.25]
-; SKX-NEXT: kmovd %eax, %k1 # sched: [1:1.00]
-; SKX-NEXT: vpblendmb %ymm0, %ymm1, %ymm0 {%k1} # sched: [1:0.33]
-; SKX-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7] sched: [3:1.00]
-; SKX-NEXT: vpmovb2m %zmm0, %k0 # sched: [1:1.00]
+; SKX-NEXT: kshiftrq $5, %k0, %k2 # sched: [3:1.00]
+; SKX-NEXT: kxorq %k1, %k2, %k1 # sched: [1:1.00]
+; SKX-NEXT: kshiftlq $63, %k1, %k1 # sched: [3:1.00]
+; SKX-NEXT: kshiftrq $58, %k1, %k1 # sched: [3:1.00]
+; SKX-NEXT: kxorq %k0, %k1, %k0 # sched: [1:1.00]
; SKX-NEXT: vpmovm2b %k0, %zmm0 # sched: [1:0.25]
; SKX-NEXT: retq # sched: [7:1.00]
%a = bitcast i64 %x to <64 x i1>
; GENERIC-NEXT: cmpl %edx, %esi # sched: [1:0.33]
; GENERIC-NEXT: setg %al # sched: [1:0.50]
; GENERIC-NEXT: kmovd %eax, %k1 # sched: [1:0.33]
-; GENERIC-NEXT: vpmovm2b %k1, %zmm0 # sched: [1:0.33]
-; GENERIC-NEXT: vpsllq $40, %xmm0, %xmm0 # sched: [1:1.00]
-; GENERIC-NEXT: vpmovm2b %k0, %zmm1 # sched: [1:0.33]
-; GENERIC-NEXT: movl $32, %eax # sched: [1:0.33]
-; GENERIC-NEXT: kmovd %eax, %k1 # sched: [1:0.33]
-; GENERIC-NEXT: vpblendmb %ymm0, %ymm1, %ymm0 {%k1} # sched: [2:1.00]
-; GENERIC-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7] sched: [1:1.00]
-; GENERIC-NEXT: vpmovb2m %zmm0, %k0 # sched: [1:0.33]
+; GENERIC-NEXT: kshiftrq $5, %k0, %k2 # sched: [1:1.00]
+; GENERIC-NEXT: kxorq %k1, %k2, %k1 # sched: [1:1.00]
+; GENERIC-NEXT: kshiftlq $63, %k1, %k1 # sched: [1:1.00]
+; GENERIC-NEXT: kshiftrq $58, %k1, %k1 # sched: [1:1.00]
+; GENERIC-NEXT: kxorq %k0, %k1, %k0 # sched: [1:1.00]
; GENERIC-NEXT: vpmovm2b %k0, %zmm0 # sched: [1:0.33]
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; SKX-NEXT: cmpl %edx, %esi # sched: [1:0.25]
; SKX-NEXT: setg %al # sched: [1:0.50]
; SKX-NEXT: kmovd %eax, %k1 # sched: [1:1.00]
-; SKX-NEXT: vpmovm2b %k1, %zmm0 # sched: [1:0.25]
-; SKX-NEXT: vpsllq $40, %xmm0, %xmm0 # sched: [1:0.50]
-; SKX-NEXT: vpmovm2b %k0, %zmm1 # sched: [1:0.25]
-; SKX-NEXT: movl $32, %eax # sched: [1:0.25]
-; SKX-NEXT: kmovd %eax, %k1 # sched: [1:1.00]
-; SKX-NEXT: vpblendmb %ymm0, %ymm1, %ymm0 {%k1} # sched: [1:0.33]
-; SKX-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7] sched: [3:1.00]
-; SKX-NEXT: vpmovb2m %zmm0, %k0 # sched: [1:1.00]
+; SKX-NEXT: kshiftrq $5, %k0, %k2 # sched: [3:1.00]
+; SKX-NEXT: kxorq %k1, %k2, %k1 # sched: [1:1.00]
+; SKX-NEXT: kshiftlq $63, %k1, %k1 # sched: [3:1.00]
+; SKX-NEXT: kshiftrq $58, %k1, %k1 # sched: [3:1.00]
+; SKX-NEXT: kxorq %k0, %k1, %k0 # sched: [1:1.00]
; SKX-NEXT: vpmovm2b %k0, %zmm0 # sched: [1:0.25]
; SKX-NEXT: retq # sched: [7:1.00]
%a = bitcast i64 %x to <64 x i1>
define <8 x i1> @vmov_test18(i8 %a, i16 %y) {
; GENERIC-LABEL: vmov_test18:
; GENERIC: # %bb.0:
-; GENERIC-NEXT: kmovd %edi, %k1 # sched: [1:0.33]
-; GENERIC-NEXT: kmovd %esi, %k2 # sched: [1:0.33]
-; GENERIC-NEXT: kshiftlw $7, %k2, %k0 # sched: [1:1.00]
-; GENERIC-NEXT: kshiftrw $15, %k0, %k0 # sched: [1:1.00]
-; GENERIC-NEXT: kshiftlw $6, %k2, %k2 # sched: [1:1.00]
+; GENERIC-NEXT: kmovd %edi, %k0 # sched: [1:0.33]
+; GENERIC-NEXT: kmovd %esi, %k1 # sched: [1:0.33]
+; GENERIC-NEXT: kshiftlw $7, %k1, %k2 # sched: [1:1.00]
; GENERIC-NEXT: kshiftrw $15, %k2, %k2 # sched: [1:1.00]
-; GENERIC-NEXT: vpmovm2q %k1, %zmm0 # sched: [1:0.33]
-; GENERIC-NEXT: vpmovm2q %k2, %zmm1 # sched: [1:0.33]
-; GENERIC-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,3,4,5,8,7] sched: [4:0.50]
-; GENERIC-NEXT: vpermi2q %zmm1, %zmm0, %zmm2 # sched: [1:1.00]
-; GENERIC-NEXT: vpmovq2m %zmm2, %k1 # sched: [1:0.33]
-; GENERIC-NEXT: kshiftlb $1, %k1, %k1 # sched: [1:1.00]
+; GENERIC-NEXT: kshiftlw $6, %k1, %k1 # sched: [1:1.00]
+; GENERIC-NEXT: kshiftrw $15, %k1, %k1 # sched: [1:1.00]
+; GENERIC-NEXT: kshiftrb $6, %k0, %k3 # sched: [1:1.00]
+; GENERIC-NEXT: kxorb %k1, %k3, %k1 # sched: [1:1.00]
+; GENERIC-NEXT: kshiftlb $7, %k1, %k1 # sched: [1:1.00]
; GENERIC-NEXT: kshiftrb $1, %k1, %k1 # sched: [1:1.00]
-; GENERIC-NEXT: kshiftlb $7, %k0, %k0 # sched: [1:1.00]
-; GENERIC-NEXT: korb %k0, %k1, %k0 # sched: [1:1.00]
+; GENERIC-NEXT: kxorb %k0, %k1, %k0 # sched: [1:1.00]
+; GENERIC-NEXT: kshiftlb $1, %k0, %k0 # sched: [1:1.00]
+; GENERIC-NEXT: kshiftrb $1, %k0, %k0 # sched: [1:1.00]
+; GENERIC-NEXT: kshiftlb $7, %k2, %k1 # sched: [1:1.00]
+; GENERIC-NEXT: korb %k1, %k0, %k0 # sched: [1:1.00]
; GENERIC-NEXT: vpmovm2w %k0, %xmm0 # sched: [1:0.33]
-; GENERIC-NEXT: vzeroupper
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; SKX-LABEL: vmov_test18:
; SKX: # %bb.0:
-; SKX-NEXT: kmovd %edi, %k1 # sched: [1:1.00]
-; SKX-NEXT: kmovd %esi, %k2 # sched: [1:1.00]
-; SKX-NEXT: kshiftlw $7, %k2, %k0 # sched: [3:1.00]
-; SKX-NEXT: kshiftrw $15, %k0, %k0 # sched: [3:1.00]
-; SKX-NEXT: kshiftlw $6, %k2, %k2 # sched: [3:1.00]
+; SKX-NEXT: kmovd %edi, %k0 # sched: [1:1.00]
+; SKX-NEXT: kmovd %esi, %k1 # sched: [1:1.00]
+; SKX-NEXT: kshiftlw $7, %k1, %k2 # sched: [3:1.00]
; SKX-NEXT: kshiftrw $15, %k2, %k2 # sched: [3:1.00]
-; SKX-NEXT: vpmovm2q %k1, %zmm0 # sched: [1:0.25]
-; SKX-NEXT: vpmovm2q %k2, %zmm1 # sched: [1:0.25]
-; SKX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,3,4,5,8,7] sched: [8:0.50]
-; SKX-NEXT: vpermi2q %zmm1, %zmm0, %zmm2 # sched: [3:1.00]
-; SKX-NEXT: vpmovq2m %zmm2, %k1 # sched: [1:1.00]
-; SKX-NEXT: kshiftlb $1, %k1, %k1 # sched: [3:1.00]
+; SKX-NEXT: kshiftlw $6, %k1, %k1 # sched: [3:1.00]
+; SKX-NEXT: kshiftrw $15, %k1, %k1 # sched: [3:1.00]
+; SKX-NEXT: kshiftrb $6, %k0, %k3 # sched: [3:1.00]
+; SKX-NEXT: kxorb %k1, %k3, %k1 # sched: [1:1.00]
+; SKX-NEXT: kshiftlb $7, %k1, %k1 # sched: [3:1.00]
; SKX-NEXT: kshiftrb $1, %k1, %k1 # sched: [3:1.00]
-; SKX-NEXT: kshiftlb $7, %k0, %k0 # sched: [3:1.00]
-; SKX-NEXT: korb %k0, %k1, %k0 # sched: [1:1.00]
+; SKX-NEXT: kxorb %k0, %k1, %k0 # sched: [1:1.00]
+; SKX-NEXT: kshiftlb $1, %k0, %k0 # sched: [3:1.00]
+; SKX-NEXT: kshiftrb $1, %k0, %k0 # sched: [3:1.00]
+; SKX-NEXT: kshiftlb $7, %k2, %k1 # sched: [3:1.00]
+; SKX-NEXT: korb %k1, %k0, %k0 # sched: [1:1.00]
; SKX-NEXT: vpmovm2w %k0, %xmm0 # sched: [1:0.25]
-; SKX-NEXT: vzeroupper # sched: [4:1.00]
; SKX-NEXT: retq # sched: [7:1.00]
%b = bitcast i8 %a to <8 x i1>
%b1 = bitcast i16 %y to <16 x i1>
; X32: # %bb.0: # %entry
; X32-NEXT: pushl %ebx
; X32-NEXT: .cfi_def_cfa_offset 8
+; X32-NEXT: pushl %esi
+; X32-NEXT: .cfi_def_cfa_offset 12
+; X32-NEXT: .cfi_offset %esi, -12
; X32-NEXT: .cfi_offset %ebx, -8
-; X32-NEXT: vmovdqa64 %zmm0, %zmm3
-; X32-NEXT: movl {{[0-9]+}}(%esp), %eax
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: andb $2, %cl
-; X32-NEXT: shrb %cl
+; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx
; X32-NEXT: kmovd %ecx, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vpsllw $8, %xmm1, %xmm1
-; X32-NEXT: kmovd %eax, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm2
-; X32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm0, %ymm2, %ymm1, %ymm1
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm1 = zmm1[0,1,2,3],zmm2[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm1, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: andb $15, %cl
-; X32-NEXT: movl %ecx, %edx
+; X32-NEXT: kshiftrq $1, %k0, %k1
+; X32-NEXT: movl %ecx, %eax
+; X32-NEXT: andb $2, %al
+; X32-NEXT: shrb %al
+; X32-NEXT: kmovd %eax, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $62, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $2, %k0, %k1
+; X32-NEXT: movl %ecx, %eax
+; X32-NEXT: andb $15, %al
+; X32-NEXT: movl %eax, %edx
; X32-NEXT: shrb $2, %dl
-; X32-NEXT: kmovd %edx, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm2
-; X32-NEXT: vpbroadcastw %xmm2, %xmm2
-; X32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm0, %ymm1, %ymm2, %ymm2
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm1 = zmm2[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm1, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: shrb $3, %cl
-; X32-NEXT: kmovd %ecx, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm2
-; X32-NEXT: vpslld $24, %xmm2, %xmm2
-; X32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm0, %ymm1, %ymm2, %ymm2
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm1 = zmm2[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm1, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrb $4, %cl
-; X32-NEXT: kmovd %ecx, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm2
-; X32-NEXT: vpbroadcastd %xmm2, %xmm2
-; X32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm0, %ymm1, %ymm2, %ymm2
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm1 = zmm2[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm1, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrb $5, %cl
-; X32-NEXT: andb $1, %cl
-; X32-NEXT: kmovd %ecx, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm2
-; X32-NEXT: vpsllq $40, %xmm2, %xmm2
-; X32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm0, %ymm1, %ymm2, %ymm2
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm1 = zmm2[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm1, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrb $6, %cl
-; X32-NEXT: kmovd %ecx, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm2
-; X32-NEXT: vpbroadcastw %xmm2, %xmm2
-; X32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm0, %ymm1, %ymm2, %ymm2
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm1 = zmm2[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm1, %k0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrb $7, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm1
-; X32-NEXT: vpsllq $56, %xmm1, %xmm1
-; X32-NEXT: vpmovm2b %k0, %zmm2
-; X32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm0, %ymm2, %ymm1, %ymm1
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm1 = zmm1[0,1,2,3],zmm2[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm1, %k0
-; X32-NEXT: movb %ah, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm1
-; X32-NEXT: vpbroadcastq %xmm1, %xmm1
-; X32-NEXT: vpmovm2b %k0, %zmm2
-; X32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm0, %ymm2, %ymm1, %ymm1
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm1 = zmm1[0,1,2,3],zmm2[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm1, %k0
-; X32-NEXT: andb $2, %cl
-; X32-NEXT: shrb %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm1
-; X32-NEXT: vpslldq {{.*#+}} xmm1 = zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm1[0,1,2,3,4,5,6]
-; X32-NEXT: vpmovm2b %k0, %zmm2
-; X32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm0, %ymm2, %ymm1, %ymm1
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm1 = zmm1[0,1,2,3],zmm2[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm1, %k0
-; X32-NEXT: movb %ah, %cl
-; X32-NEXT: andb $15, %cl
-; X32-NEXT: movl %ecx, %edx
+; X32-NEXT: kmovd %edx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $61, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $3, %k0, %k1
+; X32-NEXT: shrb $3, %al
+; X32-NEXT: kmovd %eax, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $60, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $4, %k0, %k1
+; X32-NEXT: movl %ecx, %eax
+; X32-NEXT: shrb $4, %al
+; X32-NEXT: kmovd %eax, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $59, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $5, %k0, %k1
+; X32-NEXT: movl %ecx, %eax
+; X32-NEXT: shrb $5, %al
+; X32-NEXT: andb $1, %al
+; X32-NEXT: kmovd %eax, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $58, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $6, %k0, %k1
+; X32-NEXT: movl %ecx, %eax
+; X32-NEXT: shrb $6, %al
+; X32-NEXT: kmovd %eax, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $57, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $7, %k0, %k1
+; X32-NEXT: movl %ecx, %eax
+; X32-NEXT: shrb $7, %al
+; X32-NEXT: kmovd %eax, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $56, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $8, %k0, %k1
+; X32-NEXT: movb %ch, %al
+; X32-NEXT: kmovd %eax, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $55, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $9, %k0, %k1
+; X32-NEXT: andb $2, %al
+; X32-NEXT: shrb %al
+; X32-NEXT: kmovd %eax, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $54, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $10, %k0, %k1
+; X32-NEXT: movb %ch, %al
+; X32-NEXT: andb $15, %al
+; X32-NEXT: movl %eax, %edx
; X32-NEXT: shrb $2, %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm1
-; X32-NEXT: vpbroadcastw %xmm1, %xmm1
-; X32-NEXT: vpmovm2b %k0, %zmm2
-; X32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm0, %ymm2, %ymm1, %ymm1
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm1 = zmm1[0,1,2,3],zmm2[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm1, %k0
-; X32-NEXT: shrb $3, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm1
-; X32-NEXT: vpslldq {{.*#+}} xmm1 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm1[0,1,2,3,4]
-; X32-NEXT: vpmovm2b %k0, %zmm2
-; X32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm0, %ymm2, %ymm1, %ymm1
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm1 = zmm1[0,1,2,3],zmm2[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm1, %k0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrl $12, %ecx
-; X32-NEXT: andl $15, %ecx
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm1
-; X32-NEXT: vpbroadcastd %xmm1, %xmm1
-; X32-NEXT: vpmovm2b %k0, %zmm2
-; X32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm0, %ymm2, %ymm1, %ymm1
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm1 = zmm1[0,1,2,3],zmm2[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm1, %k0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrl $13, %ecx
-; X32-NEXT: andb $1, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm1
-; X32-NEXT: vpslldq {{.*#+}} xmm1 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm1[0,1,2]
-; X32-NEXT: vpmovm2b %k0, %zmm2
-; X32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm0, %ymm2, %ymm1, %ymm1
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm1 = zmm1[0,1,2,3],zmm2[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm1, %k0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrl $14, %ecx
-; X32-NEXT: andl $3, %ecx
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm1
-; X32-NEXT: vpbroadcastw %xmm1, %xmm1
-; X32-NEXT: vpmovm2b %k0, %zmm2
-; X32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm0, %ymm2, %ymm1, %ymm1
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm1 = zmm1[0,1,2,3],zmm2[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm1, %k0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrl $15, %ecx
-; X32-NEXT: andl $1, %ecx
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm1
-; X32-NEXT: vpslldq {{.*#+}} xmm1 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm1[0]
-; X32-NEXT: vpmovm2b %k0, %zmm2
-; X32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm0, %ymm2, %ymm1, %ymm1
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm1 = zmm1[0,1,2,3],zmm2[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm1, %k0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrl $16, %ecx
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm1
-; X32-NEXT: vinserti128 $1, %xmm1, %ymm0, %ymm1
-; X32-NEXT: vpmovm2b %k0, %zmm2
-; X32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm0, %ymm2, %ymm1, %ymm1
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm1 = zmm1[0,1,2,3],zmm2[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm1, %k0
-; X32-NEXT: movl %ecx, %edx
-; X32-NEXT: andb $2, %dl
-; X32-NEXT: shrb %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm1
-; X32-NEXT: vpsllw $8, %xmm1, %xmm1
-; X32-NEXT: vinserti128 $1, %xmm1, %ymm0, %ymm1
-; X32-NEXT: vpmovm2b %k0, %zmm2
-; X32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm0, %ymm2, %ymm1, %ymm1
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm1 = zmm1[0,1,2,3],zmm2[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm1, %k0
+; X32-NEXT: kmovd %edx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $53, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $11, %k0, %k1
+; X32-NEXT: shrb $3, %al
+; X32-NEXT: kmovd %eax, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: movl %ecx, %eax
+; X32-NEXT: shrl $12, %eax
+; X32-NEXT: andl $15, %eax
+; X32-NEXT: kmovd %eax, %k2
+; X32-NEXT: movl %ecx, %eax
+; X32-NEXT: shrl $13, %eax
+; X32-NEXT: andb $1, %al
+; X32-NEXT: kmovd %eax, %k3
+; X32-NEXT: movl %ecx, %eax
+; X32-NEXT: shrl $14, %eax
+; X32-NEXT: andl $3, %eax
+; X32-NEXT: kmovd %eax, %k4
+; X32-NEXT: movl %ecx, %eax
+; X32-NEXT: shrl $15, %eax
+; X32-NEXT: andl $1, %eax
+; X32-NEXT: kmovd %eax, %k5
+; X32-NEXT: movl %ecx, %edx
+; X32-NEXT: shrl $16, %edx
+; X32-NEXT: movl %edx, %eax
+; X32-NEXT: andb $2, %al
+; X32-NEXT: shrb %al
+; X32-NEXT: kmovd %eax, %k6
+; X32-NEXT: movl %edx, %ebx
+; X32-NEXT: andb $15, %bl
+; X32-NEXT: movl %ebx, %eax
+; X32-NEXT: shrb $2, %al
+; X32-NEXT: kmovd %eax, %k7
+; X32-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $52, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $12, %k0, %k1
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $51, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $13, %k0, %k1
+; X32-NEXT: kxorq %k3, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $50, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $14, %k0, %k1
+; X32-NEXT: kxorq %k4, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $49, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $15, %k0, %k1
+; X32-NEXT: kxorq %k5, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $48, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $16, %k0, %k1
+; X32-NEXT: kmovd %edx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $47, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $17, %k0, %k1
+; X32-NEXT: kxorq %k6, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $46, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $18, %k0, %k1
+; X32-NEXT: kxorq %k7, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $45, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $19, %k0, %k1
+; X32-NEXT: shrb $3, %bl
+; X32-NEXT: kmovd %ebx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $44, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $20, %k0, %k1
+; X32-NEXT: movl %edx, %ebx
+; X32-NEXT: shrb $4, %bl
+; X32-NEXT: kmovd %ebx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $43, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $21, %k0, %k1
+; X32-NEXT: movl %edx, %ebx
+; X32-NEXT: shrb $5, %bl
+; X32-NEXT: andb $1, %bl
+; X32-NEXT: kmovd %ebx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $42, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $22, %k0, %k1
+; X32-NEXT: movl %edx, %ebx
+; X32-NEXT: shrb $6, %bl
+; X32-NEXT: kmovd %ebx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $41, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $23, %k0, %k1
+; X32-NEXT: shrb $7, %dl
+; X32-NEXT: kmovd %edx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $40, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $24, %k0, %k1
; X32-NEXT: movl %ecx, %edx
+; X32-NEXT: shrl $24, %edx
+; X32-NEXT: kmovd %edx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $39, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $25, %k0, %k1
+; X32-NEXT: movl %edx, %ebx
+; X32-NEXT: andb $2, %bl
+; X32-NEXT: shrb %bl
+; X32-NEXT: kmovd %ebx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $38, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $26, %k0, %k1
; X32-NEXT: andb $15, %dl
; X32-NEXT: movl %edx, %ebx
; X32-NEXT: shrb $2, %bl
-; X32-NEXT: kmovd %ebx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm1
-; X32-NEXT: vpbroadcastw %xmm1, %xmm1
-; X32-NEXT: vinserti128 $1, %xmm1, %ymm0, %ymm1
-; X32-NEXT: vpmovm2b %k0, %zmm2
-; X32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm0, %ymm2, %ymm1, %ymm1
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm1 = zmm1[0,1,2,3],zmm2[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm1, %k0
+; X32-NEXT: kmovd %ebx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $37, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $27, %k0, %k1
; X32-NEXT: shrb $3, %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm1
-; X32-NEXT: vpslld $24, %xmm1, %xmm1
-; X32-NEXT: vinserti128 $1, %xmm1, %ymm0, %ymm1
-; X32-NEXT: vpmovm2b %k0, %zmm2
-; X32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm0, %ymm2, %ymm1, %ymm1
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm1 = zmm1[0,1,2,3],zmm2[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm1, %k0
+; X32-NEXT: kmovd %edx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $36, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $28, %k0, %k1
; X32-NEXT: movl %ecx, %edx
-; X32-NEXT: shrb $4, %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm1
-; X32-NEXT: vpbroadcastd %xmm1, %xmm1
-; X32-NEXT: vinserti128 $1, %xmm1, %ymm0, %ymm1
-; X32-NEXT: vpmovm2b %k0, %zmm2
-; X32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm0, %ymm2, %ymm1, %ymm1
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm1 = zmm1[0,1,2,3],zmm2[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm1, %k0
+; X32-NEXT: shrl $28, %edx
+; X32-NEXT: kmovd %edx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $35, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $29, %k0, %k1
; X32-NEXT: movl %ecx, %edx
-; X32-NEXT: shrb $5, %dl
+; X32-NEXT: shrl $29, %edx
; X32-NEXT: andb $1, %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm1
-; X32-NEXT: vpsllq $40, %xmm1, %xmm1
-; X32-NEXT: vinserti128 $1, %xmm1, %ymm0, %ymm1
-; X32-NEXT: vpmovm2b %k0, %zmm2
-; X32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm0, %ymm2, %ymm1, %ymm1
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm1 = zmm1[0,1,2,3],zmm2[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm1, %k0
-; X32-NEXT: movl %ecx, %edx
-; X32-NEXT: shrb $6, %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm1
-; X32-NEXT: vpbroadcastw %xmm1, %xmm1
-; X32-NEXT: vinserti128 $1, %xmm1, %ymm0, %ymm1
-; X32-NEXT: vpmovm2b %k0, %zmm2
-; X32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm0, %ymm2, %ymm1, %ymm1
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm1 = zmm1[0,1,2,3],zmm2[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm1, %k0
-; X32-NEXT: shrb $7, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm1
-; X32-NEXT: vpsllq $56, %xmm1, %xmm1
-; X32-NEXT: vinserti128 $1, %xmm1, %ymm0, %ymm1
-; X32-NEXT: vpmovm2b %k0, %zmm2
-; X32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm0, %ymm2, %ymm1, %ymm1
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm1 = zmm1[0,1,2,3],zmm2[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm1, %k0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrl $24, %ecx
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm1
-; X32-NEXT: vpbroadcastq %xmm1, %ymm1
-; X32-NEXT: vpmovm2b %k0, %zmm2
-; X32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm0, %ymm2, %ymm1, %ymm1
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm1 = zmm1[0,1,2,3],zmm2[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm1, %k0
-; X32-NEXT: movl %ecx, %edx
-; X32-NEXT: andb $2, %dl
-; X32-NEXT: shrb %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm1
-; X32-NEXT: vpslldq {{.*#+}} xmm1 = zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm1[0,1,2,3,4,5,6]
-; X32-NEXT: vinserti128 $1, %xmm1, %ymm0, %ymm1
-; X32-NEXT: vpmovm2b %k0, %zmm2
-; X32-NEXT: vmovdqa {{.*#+}} ymm5 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm5, %ymm2, %ymm1, %ymm1
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm1 = zmm1[0,1,2,3],zmm2[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm1, %k0
-; X32-NEXT: andb $15, %cl
+; X32-NEXT: kmovd %edx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $34, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $30, %k0, %k1
; X32-NEXT: movl %ecx, %edx
-; X32-NEXT: shrb $2, %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm1
-; X32-NEXT: vpbroadcastw %xmm1, %xmm1
-; X32-NEXT: vinserti128 $1, %xmm1, %ymm0, %ymm1
-; X32-NEXT: vpmovm2b %k0, %zmm4
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm4, %ymm1, %ymm1
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm1 = zmm1[0,1,2,3],zmm4[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm1, %k0
-; X32-NEXT: shrb $3, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm1
-; X32-NEXT: vpslldq {{.*#+}} xmm1 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm1[0,1,2,3,4]
-; X32-NEXT: vinserti128 $1, %xmm1, %ymm0, %ymm1
-; X32-NEXT: vpmovm2b %k0, %zmm4
-; X32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm0, %ymm4, %ymm1, %ymm1
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm1 = zmm1[0,1,2,3],zmm4[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm1, %k0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrl $28, %ecx
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm1
-; X32-NEXT: vpbroadcastd %xmm1, %xmm1
-; X32-NEXT: vinserti128 $1, %xmm1, %ymm0, %ymm1
-; X32-NEXT: vpmovm2b %k0, %zmm4
-; X32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255]
-; X32-NEXT: vpblendvb %ymm0, %ymm4, %ymm1, %ymm1
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm1 = zmm1[0,1,2,3],zmm4[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm1, %k0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrl $29, %ecx
-; X32-NEXT: andb $1, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm1
-; X32-NEXT: vpslldq {{.*#+}} xmm1 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm1[0,1,2]
-; X32-NEXT: vinserti128 $1, %xmm1, %ymm0, %ymm1
-; X32-NEXT: vpmovm2b %k0, %zmm0
-; X32-NEXT: vmovdqa {{.*#+}} ymm4 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255]
-; X32-NEXT: vpblendvb %ymm4, %ymm0, %ymm1, %ymm1
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm1[0,1,2,3],zmm0[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrl $30, %ecx
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastw %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm1
-; X32-NEXT: vpmovm2b %k0, %zmm0
-; X32-NEXT: vmovdqa {{.*#+}} ymm4 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255]
-; X32-NEXT: vpblendvb %ymm4, %ymm0, %ymm1, %ymm1
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm1[0,1,2,3],zmm0[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: shrl $31, %eax
-; X32-NEXT: kmovd %eax, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0]
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0]
-; X32-NEXT: vpblendvb %ymm7, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl {{[0-9]+}}(%esp), %eax
-; X32-NEXT: kmovd %eax, %k1
-; X32-NEXT: vpmovm2b %k0, %zmm0
-; X32-NEXT: vextracti64x4 $1, %zmm0, %ymm1
-; X32-NEXT: vpmovm2b %k1, %zmm7
-; X32-NEXT: vmovdqa {{.*#+}} ymm6 = [0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm6, %ymm1, %ymm7, %ymm1
-; X32-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: shrl $30, %edx
+; X32-NEXT: kmovd %edx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $33, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $31, %k0, %k1
+; X32-NEXT: shrl $31, %ecx
+; X32-NEXT: kmovd %ecx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $32, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $32, %k0, %k1
+; X32-NEXT: kmovd %eax, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $31, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $33, %k0, %k1
; X32-NEXT: movl %eax, %ecx
; X32-NEXT: andb $2, %cl
; X32-NEXT: shrb %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpsllw $8, %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %ecx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $30, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $34, %k0, %k1
; X32-NEXT: movl %eax, %ecx
; X32-NEXT: andb $15, %cl
; X32-NEXT: movl %ecx, %edx
; X32-NEXT: shrb $2, %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastw %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %edx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $29, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $35, %k0, %k1
; X32-NEXT: shrb $3, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpslld $24, %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %ecx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $28, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $36, %k0, %k1
; X32-NEXT: movl %eax, %ecx
; X32-NEXT: shrb $4, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastd %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %ecx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $27, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $37, %k0, %k1
; X32-NEXT: movl %eax, %ecx
; X32-NEXT: shrb $5, %cl
; X32-NEXT: andb $1, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpsllq $40, %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %ecx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $26, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $38, %k0, %k1
; X32-NEXT: movl %eax, %ecx
; X32-NEXT: shrb $6, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastw %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %ecx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $25, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $39, %k0, %k1
; X32-NEXT: movl %eax, %ecx
; X32-NEXT: shrb $7, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpsllq $56, %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %ecx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $24, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $40, %k0, %k1
; X32-NEXT: movb %ah, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastq %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %ecx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
; X32-NEXT: andb $2, %cl
; X32-NEXT: shrb %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2,3,4,5,6]
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %ecx, %k2
; X32-NEXT: movb %ah, %cl
; X32-NEXT: andb $15, %cl
; X32-NEXT: movl %ecx, %edx
; X32-NEXT: shrb $2, %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastw %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %edx, %k3
; X32-NEXT: shrb $3, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2,3,4]
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrl $12, %ecx
-; X32-NEXT: andl $15, %ecx
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastd %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %ecx, %k4
; X32-NEXT: movl %eax, %ecx
; X32-NEXT: shrl $13, %ecx
; X32-NEXT: andb $1, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2]
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrl $14, %ecx
-; X32-NEXT: andl $3, %ecx
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastw %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrl $15, %ecx
-; X32-NEXT: andl $1, %ecx
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0]
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %ecx, %k5
; X32-NEXT: movl %eax, %ecx
; X32-NEXT: shrl $16, %ecx
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
; X32-NEXT: movl %ecx, %edx
; X32-NEXT: andb $2, %dl
; X32-NEXT: shrb %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpsllw $8, %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %edx, %k6
; X32-NEXT: movl %ecx, %edx
; X32-NEXT: andb $15, %dl
; X32-NEXT: movl %edx, %ebx
; X32-NEXT: shrb $2, %bl
-; X32-NEXT: kmovd %ebx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastw %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %ebx, %k7
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $23, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $41, %k0, %k1
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $22, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $42, %k0, %k1
+; X32-NEXT: kxorq %k3, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $21, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $43, %k0, %k1
+; X32-NEXT: kxorq %k4, %k1, %k1
+; X32-NEXT: movl %eax, %esi
+; X32-NEXT: shrl $12, %esi
+; X32-NEXT: andl $15, %esi
+; X32-NEXT: kmovd %esi, %k2
+; X32-NEXT: movl %eax, %esi
+; X32-NEXT: shrl $14, %esi
+; X32-NEXT: andl $3, %esi
+; X32-NEXT: kmovd %esi, %k3
+; X32-NEXT: movl %eax, %esi
+; X32-NEXT: shrl $15, %esi
+; X32-NEXT: andl $1, %esi
+; X32-NEXT: kmovd %esi, %k4
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $20, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $44, %k0, %k1
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $19, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $45, %k0, %k1
+; X32-NEXT: kxorq %k5, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $18, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $46, %k0, %k1
+; X32-NEXT: kxorq %k3, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $17, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $47, %k0, %k1
+; X32-NEXT: kxorq %k4, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $16, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $48, %k0, %k1
+; X32-NEXT: kmovd %ecx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $15, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $49, %k0, %k1
+; X32-NEXT: kxorq %k6, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $14, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $50, %k0, %k1
+; X32-NEXT: kxorq %k7, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $13, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $51, %k0, %k1
; X32-NEXT: shrb $3, %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpslld $24, %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %edx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $12, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k4
+; X32-NEXT: kshiftrq $52, %k4, %k0
; X32-NEXT: movl %ecx, %edx
; X32-NEXT: shrb $4, %dl
; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastd %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kxorq %k1, %k0, %k5
; X32-NEXT: movl %ecx, %edx
; X32-NEXT: shrb $5, %dl
; X32-NEXT: andb $1, %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpsllq $40, %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %edx, %k6
; X32-NEXT: movl %ecx, %edx
; X32-NEXT: shrb $6, %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastw %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %edx, %k7
; X32-NEXT: shrb $7, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpsllq $56, %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %ecx, %k0
; X32-NEXT: movl %eax, %ecx
; X32-NEXT: shrl $24, %ecx
; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastq %xmm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
; X32-NEXT: movl %ecx, %edx
; X32-NEXT: andb $2, %dl
; X32-NEXT: shrb %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2,3,4,5,6]
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vpblendvb %ymm5, %ymm6, %ymm0, %ymm0
+; X32-NEXT: kmovd %edx, %k2
; X32-NEXT: andb $15, %cl
; X32-NEXT: movl %ecx, %edx
; X32-NEXT: shrb $2, %dl
-; X32-NEXT: kmovd %edx, %k0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vpbroadcastw %xmm1, %xmm1
-; X32-NEXT: vinserti128 $1, %xmm1, %ymm0, %ymm1
-; X32-NEXT: vextracti64x4 $1, %zmm0, %ymm5
-; X32-NEXT: vpblendvb %ymm2, %ymm5, %ymm1, %ymm2
+; X32-NEXT: kmovd %edx, %k3
+; X32-NEXT: kshiftlq $63, %k5, %k5
+; X32-NEXT: kshiftrq $11, %k5, %k5
+; X32-NEXT: kxorq %k4, %k5, %k4
+; X32-NEXT: kshiftrq $53, %k4, %k5
+; X32-NEXT: kxorq %k6, %k5, %k5
+; X32-NEXT: kshiftlq $63, %k5, %k5
+; X32-NEXT: kshiftrq $10, %k5, %k5
+; X32-NEXT: kxorq %k4, %k5, %k5
+; X32-NEXT: kshiftrq $54, %k5, %k4
+; X32-NEXT: kxorq %k7, %k4, %k6
; X32-NEXT: shrb $3, %cl
-; X32-NEXT: kmovd %ecx, %k0
+; X32-NEXT: kmovd %ecx, %k4
; X32-NEXT: movl %eax, %ecx
; X32-NEXT: shrl $29, %ecx
; X32-NEXT: andb $1, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vinserti64x4 $1, %ymm2, %zmm0, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k2
-; X32-NEXT: vpmovm2b %k2, %zmm0
-; X32-NEXT: vextracti64x4 $1, %zmm0, %ymm1
-; X32-NEXT: vpmovm2b %k0, %zmm2
-; X32-NEXT: vpslldq {{.*#+}} xmm2 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm2[0,1,2,3,4]
-; X32-NEXT: vinserti128 $1, %xmm2, %ymm0, %ymm2
-; X32-NEXT: vmovdqa {{.*#+}} ymm5 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm5, %ymm1, %ymm2, %ymm1
-; X32-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm0
-; X32-NEXT: vextracti64x4 $1, %zmm0, %ymm1
+; X32-NEXT: kmovd %ecx, %k7
+; X32-NEXT: kshiftlq $63, %k6, %k6
+; X32-NEXT: kshiftrq $9, %k6, %k6
+; X32-NEXT: kxorq %k5, %k6, %k5
+; X32-NEXT: kshiftrq $55, %k5, %k6
+; X32-NEXT: kxorq %k0, %k6, %k0
+; X32-NEXT: kshiftlq $63, %k0, %k0
+; X32-NEXT: kshiftrq $8, %k0, %k0
+; X32-NEXT: kxorq %k5, %k0, %k0
+; X32-NEXT: kshiftrq $56, %k0, %k5
+; X32-NEXT: kxorq %k1, %k5, %k1
; X32-NEXT: movl %eax, %ecx
; X32-NEXT: shrl $28, %ecx
-; X32-NEXT: kmovd %ecx, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm2
-; X32-NEXT: vpbroadcastd %xmm2, %xmm2
-; X32-NEXT: vinserti128 $1, %xmm2, %ymm0, %ymm2
-; X32-NEXT: vmovdqa {{.*#+}} ymm5 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255]
-; X32-NEXT: vpblendvb %ymm5, %ymm1, %ymm2, %ymm1
-; X32-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm0
-; X32-NEXT: vextracti64x4 $1, %zmm0, %ymm1
-; X32-NEXT: vpmovm2b %k1, %zmm2
-; X32-NEXT: vpslldq {{.*#+}} xmm2 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm2[0,1,2]
-; X32-NEXT: vinserti128 $1, %xmm2, %ymm0, %ymm2
-; X32-NEXT: vmovdqa {{.*#+}} ymm5 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255]
-; X32-NEXT: vpblendvb %ymm5, %ymm1, %ymm2, %ymm1
+; X32-NEXT: kmovd %ecx, %k5
; X32-NEXT: movl %eax, %ecx
; X32-NEXT: shrl $30, %ecx
-; X32-NEXT: kmovd %ecx, %k0
-; X32-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vextracti64x4 $1, %zmm0, %ymm1
-; X32-NEXT: vpmovm2b %k0, %zmm2
-; X32-NEXT: vpbroadcastw %xmm2, %xmm2
-; X32-NEXT: vinserti128 $1, %xmm2, %ymm0, %ymm2
-; X32-NEXT: vpblendvb %ymm4, %ymm1, %ymm2, %ymm1
-; X32-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %ecx, %k6
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $7, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $57, %k0, %k1
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $6, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $58, %k0, %k1
+; X32-NEXT: kxorq %k3, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $5, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $59, %k0, %k1
+; X32-NEXT: kxorq %k4, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $4, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $60, %k0, %k1
+; X32-NEXT: kxorq %k5, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $3, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $61, %k0, %k1
+; X32-NEXT: kxorq %k7, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $2, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $62, %k0, %k1
+; X32-NEXT: kxorq %k6, %k1, %k1
; X32-NEXT: shrl $31, %eax
-; X32-NEXT: kmovd %eax, %k1
+; X32-NEXT: kmovd %eax, %k2
; X32-NEXT: movb {{[0-9]+}}(%esp), %al
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $1, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
; X32-NEXT: kshiftlq $1, %k0, %k0
; X32-NEXT: kshiftrq $1, %k0, %k0
-; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k2, %k1
; X32-NEXT: korq %k1, %k0, %k1
-; X32-NEXT: vpbroadcastb %eax, %zmm3 {%k1}
-; X32-NEXT: vmovdqa64 %zmm3, %zmm0
+; X32-NEXT: vpbroadcastb %eax, %zmm0 {%k1}
+; X32-NEXT: popl %esi
; X32-NEXT: popl %ebx
; X32-NEXT: retl
;
; X32: # %bb.0: # %entry
; X32-NEXT: pushl %ebx
; X32-NEXT: .cfi_def_cfa_offset 8
+; X32-NEXT: pushl %esi
+; X32-NEXT: .cfi_def_cfa_offset 12
+; X32-NEXT: .cfi_offset %esi, -12
; X32-NEXT: .cfi_offset %ebx, -8
-; X32-NEXT: movl {{[0-9]+}}(%esp), %eax
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: andb $2, %cl
-; X32-NEXT: shrb %cl
+; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx
; X32-NEXT: kmovd %ecx, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm0
-; X32-NEXT: vpsllw $8, %xmm0, %xmm0
-; X32-NEXT: kmovd %eax, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: andb $15, %cl
-; X32-NEXT: movl %ecx, %edx
+; X32-NEXT: kshiftrq $1, %k0, %k1
+; X32-NEXT: movl %ecx, %eax
+; X32-NEXT: andb $2, %al
+; X32-NEXT: shrb %al
+; X32-NEXT: kmovd %eax, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $62, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $2, %k0, %k1
+; X32-NEXT: movl %ecx, %eax
+; X32-NEXT: andb $15, %al
+; X32-NEXT: movl %eax, %edx
; X32-NEXT: shrb $2, %dl
-; X32-NEXT: kmovd %edx, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vpbroadcastw %xmm1, %xmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm0, %ymm1, %ymm1
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm1[0,1,2,3],zmm0[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm0
-; X32-NEXT: shrb $3, %cl
-; X32-NEXT: kmovd %ecx, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vpslld $24, %xmm1, %xmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm0, %ymm1, %ymm1
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm1[0,1,2,3],zmm0[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrb $4, %cl
-; X32-NEXT: kmovd %ecx, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vpbroadcastd %xmm1, %xmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm0, %ymm1, %ymm1
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm1[0,1,2,3],zmm0[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrb $5, %cl
-; X32-NEXT: andb $1, %cl
-; X32-NEXT: kmovd %ecx, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vpsllq $40, %xmm1, %xmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm0, %ymm1, %ymm1
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm1[0,1,2,3],zmm0[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrb $6, %cl
-; X32-NEXT: kmovd %ecx, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vpbroadcastw %xmm1, %xmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm0, %ymm1, %ymm1
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm1[0,1,2,3],zmm0[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrb $7, %cl
-; X32-NEXT: kmovd %ecx, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vpsllq $56, %xmm1, %xmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm0, %ymm1, %ymm1
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm1[0,1,2,3],zmm0[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movb %ah, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastq %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: andb $2, %cl
-; X32-NEXT: shrb %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2,3,4,5,6]
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movb %ah, %cl
-; X32-NEXT: andb $15, %cl
-; X32-NEXT: movl %ecx, %edx
+; X32-NEXT: kmovd %edx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $61, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $3, %k0, %k1
+; X32-NEXT: shrb $3, %al
+; X32-NEXT: kmovd %eax, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $60, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $4, %k0, %k1
+; X32-NEXT: movl %ecx, %eax
+; X32-NEXT: shrb $4, %al
+; X32-NEXT: kmovd %eax, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $59, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $5, %k0, %k1
+; X32-NEXT: movl %ecx, %eax
+; X32-NEXT: shrb $5, %al
+; X32-NEXT: andb $1, %al
+; X32-NEXT: kmovd %eax, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $58, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $6, %k0, %k1
+; X32-NEXT: movl %ecx, %eax
+; X32-NEXT: shrb $6, %al
+; X32-NEXT: kmovd %eax, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $57, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $7, %k0, %k1
+; X32-NEXT: movl %ecx, %eax
+; X32-NEXT: shrb $7, %al
+; X32-NEXT: kmovd %eax, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $56, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $8, %k0, %k1
+; X32-NEXT: movb %ch, %al
+; X32-NEXT: kmovd %eax, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $55, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $9, %k0, %k1
+; X32-NEXT: andb $2, %al
+; X32-NEXT: shrb %al
+; X32-NEXT: kmovd %eax, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $54, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $10, %k0, %k1
+; X32-NEXT: movb %ch, %al
+; X32-NEXT: andb $15, %al
+; X32-NEXT: movl %eax, %edx
; X32-NEXT: shrb $2, %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastw %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: shrb $3, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2,3,4]
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrl $12, %ecx
-; X32-NEXT: andl $15, %ecx
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastd %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrl $13, %ecx
-; X32-NEXT: andb $1, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2]
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrl $14, %ecx
-; X32-NEXT: andl $3, %ecx
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastw %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrl $15, %ecx
-; X32-NEXT: andl $1, %ecx
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0]
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrl $16, %ecx
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl %ecx, %edx
-; X32-NEXT: andb $2, %dl
-; X32-NEXT: shrb %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpsllw $8, %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %edx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $53, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $11, %k0, %k1
+; X32-NEXT: shrb $3, %al
+; X32-NEXT: kmovd %eax, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: movl %ecx, %eax
+; X32-NEXT: shrl $12, %eax
+; X32-NEXT: andl $15, %eax
+; X32-NEXT: kmovd %eax, %k2
+; X32-NEXT: movl %ecx, %eax
+; X32-NEXT: shrl $13, %eax
+; X32-NEXT: andb $1, %al
+; X32-NEXT: kmovd %eax, %k3
+; X32-NEXT: movl %ecx, %eax
+; X32-NEXT: shrl $14, %eax
+; X32-NEXT: andl $3, %eax
+; X32-NEXT: kmovd %eax, %k4
+; X32-NEXT: movl %ecx, %eax
+; X32-NEXT: shrl $15, %eax
+; X32-NEXT: andl $1, %eax
+; X32-NEXT: kmovd %eax, %k5
+; X32-NEXT: movl %ecx, %edx
+; X32-NEXT: shrl $16, %edx
+; X32-NEXT: movl %edx, %eax
+; X32-NEXT: andb $2, %al
+; X32-NEXT: shrb %al
+; X32-NEXT: kmovd %eax, %k6
+; X32-NEXT: movl %edx, %ebx
+; X32-NEXT: andb $15, %bl
+; X32-NEXT: movl %ebx, %eax
+; X32-NEXT: shrb $2, %al
+; X32-NEXT: kmovd %eax, %k7
+; X32-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $52, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $12, %k0, %k1
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $51, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $13, %k0, %k1
+; X32-NEXT: kxorq %k3, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $50, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $14, %k0, %k1
+; X32-NEXT: kxorq %k4, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $49, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $15, %k0, %k1
+; X32-NEXT: kxorq %k5, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $48, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $16, %k0, %k1
+; X32-NEXT: kmovd %edx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $47, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $17, %k0, %k1
+; X32-NEXT: kxorq %k6, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $46, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $18, %k0, %k1
+; X32-NEXT: kxorq %k7, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $45, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $19, %k0, %k1
+; X32-NEXT: shrb $3, %bl
+; X32-NEXT: kmovd %ebx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $44, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $20, %k0, %k1
+; X32-NEXT: movl %edx, %ebx
+; X32-NEXT: shrb $4, %bl
+; X32-NEXT: kmovd %ebx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $43, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $21, %k0, %k1
+; X32-NEXT: movl %edx, %ebx
+; X32-NEXT: shrb $5, %bl
+; X32-NEXT: andb $1, %bl
+; X32-NEXT: kmovd %ebx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $42, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $22, %k0, %k1
+; X32-NEXT: movl %edx, %ebx
+; X32-NEXT: shrb $6, %bl
+; X32-NEXT: kmovd %ebx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $41, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $23, %k0, %k1
+; X32-NEXT: shrb $7, %dl
+; X32-NEXT: kmovd %edx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $40, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $24, %k0, %k1
; X32-NEXT: movl %ecx, %edx
+; X32-NEXT: shrl $24, %edx
+; X32-NEXT: kmovd %edx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $39, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $25, %k0, %k1
+; X32-NEXT: movl %edx, %ebx
+; X32-NEXT: andb $2, %bl
+; X32-NEXT: shrb %bl
+; X32-NEXT: kmovd %ebx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $38, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $26, %k0, %k1
; X32-NEXT: andb $15, %dl
; X32-NEXT: movl %edx, %ebx
; X32-NEXT: shrb $2, %bl
-; X32-NEXT: kmovd %ebx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastw %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %ebx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $37, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $27, %k0, %k1
; X32-NEXT: shrb $3, %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpslld $24, %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl %ecx, %edx
-; X32-NEXT: shrb $4, %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastd %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl %ecx, %edx
-; X32-NEXT: shrb $5, %dl
-; X32-NEXT: andb $1, %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpsllq $40, %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl %ecx, %edx
-; X32-NEXT: shrb $6, %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastw %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: shrb $7, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpsllq $56, %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm6 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm6, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrl $24, %ecx
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastq %xmm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %edx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $36, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $28, %k0, %k1
; X32-NEXT: movl %ecx, %edx
-; X32-NEXT: andb $2, %dl
-; X32-NEXT: shrb %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2,3,4,5,6]
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm4
-; X32-NEXT: vmovdqa {{.*#+}} ymm5 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm5, %ymm4, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm4[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: andb $15, %cl
+; X32-NEXT: shrl $28, %edx
+; X32-NEXT: kmovd %edx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $35, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $29, %k0, %k1
; X32-NEXT: movl %ecx, %edx
-; X32-NEXT: shrb $2, %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastw %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm4
-; X32-NEXT: vmovdqa {{.*#+}} ymm1 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm1, %ymm4, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm4[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: shrb $3, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2,3,4]
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm4
-; X32-NEXT: vmovdqa {{.*#+}} ymm1 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm1, %ymm4, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm4[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrl $28, %ecx
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastd %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm4
-; X32-NEXT: vmovdqa {{.*#+}} ymm1 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255]
-; X32-NEXT: vpblendvb %ymm1, %ymm4, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm4[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrl $29, %ecx
-; X32-NEXT: andb $1, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2]
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm1
-; X32-NEXT: vpmovm2b %k0, %zmm0
-; X32-NEXT: vmovdqa {{.*#+}} ymm3 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255]
-; X32-NEXT: vpblendvb %ymm3, %ymm0, %ymm1, %ymm1
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm1[0,1,2,3],zmm0[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrl $30, %ecx
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastw %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm1
-; X32-NEXT: vpmovm2b %k0, %zmm0
-; X32-NEXT: vmovdqa {{.*#+}} ymm3 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255]
-; X32-NEXT: vpblendvb %ymm3, %ymm0, %ymm1, %ymm1
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm1[0,1,2,3],zmm0[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: shrl $31, %eax
-; X32-NEXT: kmovd %eax, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0]
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0]
-; X32-NEXT: vpblendvb %ymm7, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl {{[0-9]+}}(%esp), %eax
-; X32-NEXT: kmovd %eax, %k1
-; X32-NEXT: vpmovm2b %k0, %zmm0
-; X32-NEXT: vextracti64x4 $1, %zmm0, %ymm1
-; X32-NEXT: vpmovm2b %k1, %zmm7
-; X32-NEXT: vmovdqa {{.*#+}} ymm4 = [0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm4, %ymm1, %ymm7, %ymm1
-; X32-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: shrl $29, %edx
+; X32-NEXT: andb $1, %dl
+; X32-NEXT: kmovd %edx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $34, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $30, %k0, %k1
+; X32-NEXT: movl %ecx, %edx
+; X32-NEXT: shrl $30, %edx
+; X32-NEXT: kmovd %edx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $33, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $31, %k0, %k1
+; X32-NEXT: shrl $31, %ecx
+; X32-NEXT: kmovd %ecx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $32, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $32, %k0, %k1
+; X32-NEXT: kmovd %eax, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $31, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $33, %k0, %k1
; X32-NEXT: movl %eax, %ecx
; X32-NEXT: andb $2, %cl
; X32-NEXT: shrb %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpsllw $8, %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %ecx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $30, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $34, %k0, %k1
; X32-NEXT: movl %eax, %ecx
; X32-NEXT: andb $15, %cl
; X32-NEXT: movl %ecx, %edx
; X32-NEXT: shrb $2, %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastw %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %edx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $29, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $35, %k0, %k1
; X32-NEXT: shrb $3, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpslld $24, %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %ecx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $28, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $36, %k0, %k1
; X32-NEXT: movl %eax, %ecx
; X32-NEXT: shrb $4, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastd %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %ecx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $27, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $37, %k0, %k1
; X32-NEXT: movl %eax, %ecx
; X32-NEXT: shrb $5, %cl
; X32-NEXT: andb $1, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpsllq $40, %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %ecx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $26, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $38, %k0, %k1
; X32-NEXT: movl %eax, %ecx
; X32-NEXT: shrb $6, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastw %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %ecx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $25, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $39, %k0, %k1
; X32-NEXT: movl %eax, %ecx
; X32-NEXT: shrb $7, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpsllq $56, %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %ecx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $24, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $40, %k0, %k1
; X32-NEXT: movb %ah, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastq %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %ecx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
; X32-NEXT: andb $2, %cl
; X32-NEXT: shrb %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2,3,4,5,6]
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %ecx, %k2
; X32-NEXT: movb %ah, %cl
; X32-NEXT: andb $15, %cl
; X32-NEXT: movl %ecx, %edx
; X32-NEXT: shrb $2, %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastw %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %edx, %k3
; X32-NEXT: shrb $3, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2,3,4]
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrl $12, %ecx
-; X32-NEXT: andl $15, %ecx
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastd %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %ecx, %k4
; X32-NEXT: movl %eax, %ecx
; X32-NEXT: shrl $13, %ecx
; X32-NEXT: andb $1, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2]
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrl $14, %ecx
-; X32-NEXT: andl $3, %ecx
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastw %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrl $15, %ecx
-; X32-NEXT: andl $1, %ecx
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0]
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %ecx, %k5
; X32-NEXT: movl %eax, %ecx
; X32-NEXT: shrl $16, %ecx
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
; X32-NEXT: movl %ecx, %edx
; X32-NEXT: andb $2, %dl
; X32-NEXT: shrb %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpsllw $8, %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %edx, %k6
; X32-NEXT: movl %ecx, %edx
; X32-NEXT: andb $15, %dl
; X32-NEXT: movl %edx, %ebx
; X32-NEXT: shrb $2, %bl
-; X32-NEXT: kmovd %ebx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastw %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %ebx, %k7
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $23, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $41, %k0, %k1
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $22, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $42, %k0, %k1
+; X32-NEXT: kxorq %k3, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $21, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $43, %k0, %k1
+; X32-NEXT: kxorq %k4, %k1, %k1
+; X32-NEXT: movl %eax, %esi
+; X32-NEXT: shrl $12, %esi
+; X32-NEXT: andl $15, %esi
+; X32-NEXT: kmovd %esi, %k2
+; X32-NEXT: movl %eax, %esi
+; X32-NEXT: shrl $14, %esi
+; X32-NEXT: andl $3, %esi
+; X32-NEXT: kmovd %esi, %k3
+; X32-NEXT: movl %eax, %esi
+; X32-NEXT: shrl $15, %esi
+; X32-NEXT: andl $1, %esi
+; X32-NEXT: kmovd %esi, %k4
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $20, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $44, %k0, %k1
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $19, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $45, %k0, %k1
+; X32-NEXT: kxorq %k5, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $18, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $46, %k0, %k1
+; X32-NEXT: kxorq %k3, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $17, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $47, %k0, %k1
+; X32-NEXT: kxorq %k4, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $16, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $48, %k0, %k1
+; X32-NEXT: kmovd %ecx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $15, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $49, %k0, %k1
+; X32-NEXT: kxorq %k6, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $14, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $50, %k0, %k1
+; X32-NEXT: kxorq %k7, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $13, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $51, %k0, %k1
; X32-NEXT: shrb $3, %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpslld $24, %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %edx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $12, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k4
+; X32-NEXT: kshiftrq $52, %k4, %k0
; X32-NEXT: movl %ecx, %edx
; X32-NEXT: shrb $4, %dl
; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastd %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kxorq %k1, %k0, %k5
; X32-NEXT: movl %ecx, %edx
; X32-NEXT: shrb $5, %dl
; X32-NEXT: andb $1, %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpsllq $40, %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %edx, %k6
; X32-NEXT: movl %ecx, %edx
; X32-NEXT: shrb $6, %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastw %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %edx, %k7
; X32-NEXT: shrb $7, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpsllq $56, %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; X32-NEXT: vpblendvb %ymm6, %ymm4, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %ecx, %k0
; X32-NEXT: movl %eax, %ecx
; X32-NEXT: shrl $24, %ecx
; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastq %xmm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; X32-NEXT: vpblendvb %ymm2, %ymm4, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm2
; X32-NEXT: movl %ecx, %edx
; X32-NEXT: andb $2, %dl
; X32-NEXT: shrb %dl
-; X32-NEXT: kmovd %edx, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm0
-; X32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2,3,4,5,6]
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vextracti64x4 $1, %zmm2, %ymm1
-; X32-NEXT: vpblendvb %ymm5, %ymm1, %ymm0, %ymm1
+; X32-NEXT: kmovd %edx, %k2
; X32-NEXT: andb $15, %cl
; X32-NEXT: movl %ecx, %edx
; X32-NEXT: shrb $2, %dl
-; X32-NEXT: kmovd %edx, %k0
+; X32-NEXT: kmovd %edx, %k3
+; X32-NEXT: kshiftlq $63, %k5, %k5
+; X32-NEXT: kshiftrq $11, %k5, %k5
+; X32-NEXT: kxorq %k4, %k5, %k4
+; X32-NEXT: kshiftrq $53, %k4, %k5
+; X32-NEXT: kxorq %k6, %k5, %k5
+; X32-NEXT: kshiftlq $63, %k5, %k5
+; X32-NEXT: kshiftrq $10, %k5, %k5
+; X32-NEXT: kxorq %k4, %k5, %k5
+; X32-NEXT: kshiftrq $54, %k5, %k4
+; X32-NEXT: kxorq %k7, %k4, %k6
; X32-NEXT: shrb $3, %cl
-; X32-NEXT: kmovd %ecx, %k1
+; X32-NEXT: kmovd %ecx, %k4
; X32-NEXT: movl %eax, %ecx
; X32-NEXT: shrl $29, %ecx
; X32-NEXT: andb $1, %cl
-; X32-NEXT: kmovd %ecx, %k2
-; X32-NEXT: vinserti64x4 $1, %ymm1, %zmm2, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k3
-; X32-NEXT: vpmovm2b %k3, %zmm0
-; X32-NEXT: vextracti64x4 $1, %zmm0, %ymm1
-; X32-NEXT: vpmovm2b %k0, %zmm2
-; X32-NEXT: vpbroadcastw %xmm2, %xmm2
-; X32-NEXT: vinserti128 $1, %xmm2, %ymm0, %ymm2
-; X32-NEXT: vmovdqa {{.*#+}} ymm4 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm4, %ymm1, %ymm2, %ymm1
-; X32-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm0
-; X32-NEXT: vextracti64x4 $1, %zmm0, %ymm1
-; X32-NEXT: vpmovm2b %k1, %zmm2
-; X32-NEXT: vpslldq {{.*#+}} xmm2 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm2[0,1,2,3,4]
-; X32-NEXT: vinserti128 $1, %xmm2, %ymm0, %ymm2
-; X32-NEXT: vmovdqa {{.*#+}} ymm4 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm4, %ymm1, %ymm2, %ymm1
-; X32-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm0
-; X32-NEXT: vextracti64x4 $1, %zmm0, %ymm1
+; X32-NEXT: kmovd %ecx, %k7
+; X32-NEXT: kshiftlq $63, %k6, %k6
+; X32-NEXT: kshiftrq $9, %k6, %k6
+; X32-NEXT: kxorq %k5, %k6, %k5
+; X32-NEXT: kshiftrq $55, %k5, %k6
+; X32-NEXT: kxorq %k0, %k6, %k0
+; X32-NEXT: kshiftlq $63, %k0, %k0
+; X32-NEXT: kshiftrq $8, %k0, %k0
+; X32-NEXT: kxorq %k5, %k0, %k0
+; X32-NEXT: kshiftrq $56, %k0, %k5
+; X32-NEXT: kxorq %k1, %k5, %k1
; X32-NEXT: movl %eax, %ecx
; X32-NEXT: shrl $28, %ecx
-; X32-NEXT: kmovd %ecx, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm2
-; X32-NEXT: vpbroadcastd %xmm2, %xmm2
-; X32-NEXT: vinserti128 $1, %xmm2, %ymm0, %ymm2
-; X32-NEXT: vmovdqa {{.*#+}} ymm4 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255]
-; X32-NEXT: vpblendvb %ymm4, %ymm1, %ymm2, %ymm1
-; X32-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm0
-; X32-NEXT: vextracti64x4 $1, %zmm0, %ymm1
-; X32-NEXT: vpmovm2b %k2, %zmm2
-; X32-NEXT: vpslldq {{.*#+}} xmm2 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm2[0,1,2]
-; X32-NEXT: vinserti128 $1, %xmm2, %ymm0, %ymm2
-; X32-NEXT: vmovdqa {{.*#+}} ymm4 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255]
-; X32-NEXT: vpblendvb %ymm4, %ymm1, %ymm2, %ymm1
+; X32-NEXT: kmovd %ecx, %k5
; X32-NEXT: movl %eax, %ecx
; X32-NEXT: shrl $30, %ecx
-; X32-NEXT: kmovd %ecx, %k0
-; X32-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vextracti64x4 $1, %zmm0, %ymm1
-; X32-NEXT: vpmovm2b %k0, %zmm2
-; X32-NEXT: vpbroadcastw %xmm2, %xmm2
-; X32-NEXT: vinserti128 $1, %xmm2, %ymm0, %ymm2
-; X32-NEXT: vpblendvb %ymm3, %ymm1, %ymm2, %ymm1
-; X32-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
+; X32-NEXT: kmovd %ecx, %k6
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $7, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $57, %k0, %k1
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $6, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $58, %k0, %k1
+; X32-NEXT: kxorq %k3, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $5, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $59, %k0, %k1
+; X32-NEXT: kxorq %k4, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $4, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $60, %k0, %k1
+; X32-NEXT: kxorq %k5, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $3, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $61, %k0, %k1
+; X32-NEXT: kxorq %k7, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $2, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $62, %k0, %k1
+; X32-NEXT: kxorq %k6, %k1, %k1
; X32-NEXT: shrl $31, %eax
-; X32-NEXT: kmovd %eax, %k0
+; X32-NEXT: kmovd %eax, %k2
; X32-NEXT: movb {{[0-9]+}}(%esp), %al
-; X32-NEXT: vpmovb2m %zmm0, %k1
-; X32-NEXT: kshiftlq $1, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
; X32-NEXT: kshiftrq $1, %k1, %k1
-; X32-NEXT: kshiftlq $63, %k0, %k0
-; X32-NEXT: korq %k0, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftlq $1, %k0, %k0
+; X32-NEXT: kshiftrq $1, %k0, %k0
+; X32-NEXT: kshiftlq $63, %k2, %k1
+; X32-NEXT: korq %k1, %k0, %k1
; X32-NEXT: vpbroadcastb %eax, %zmm0 {%k1} {z}
+; X32-NEXT: popl %esi
; X32-NEXT: popl %ebx
; X32-NEXT: retl
;
; X32-NEXT: movl %esp, %ebp
; X32-NEXT: .cfi_def_cfa_register %ebp
; X32-NEXT: pushl %ebx
-; X32-NEXT: andl $-64, %esp
-; X32-NEXT: subl $256, %esp # imm = 0x100
+; X32-NEXT: pushl %esi
+; X32-NEXT: andl $-8, %esp
+; X32-NEXT: subl $8, %esp
+; X32-NEXT: .cfi_offset %esi, -16
; X32-NEXT: .cfi_offset %ebx, -12
-; X32-NEXT: vmovaps %zmm1, {{[0-9]+}}(%esp) # 64-byte Spill
-; X32-NEXT: vmovaps %zmm0, {{[0-9]+}}(%esp) # 64-byte Spill
-; X32-NEXT: movl 8(%ebp), %eax
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: andb $2, %cl
-; X32-NEXT: shrb %cl
+; X32-NEXT: movl 8(%ebp), %ecx
; X32-NEXT: kmovd %ecx, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm0
-; X32-NEXT: vpsllw $8, %xmm0, %xmm0
-; X32-NEXT: kmovd %eax, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: andb $15, %cl
-; X32-NEXT: movl %ecx, %edx
+; X32-NEXT: kshiftrq $1, %k0, %k1
+; X32-NEXT: movl %ecx, %eax
+; X32-NEXT: andb $2, %al
+; X32-NEXT: shrb %al
+; X32-NEXT: kmovd %eax, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $62, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $2, %k0, %k1
+; X32-NEXT: movl %ecx, %eax
+; X32-NEXT: andb $15, %al
+; X32-NEXT: movl %eax, %edx
; X32-NEXT: shrb $2, %dl
-; X32-NEXT: kmovd %edx, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vpbroadcastw %xmm1, %xmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm0, %ymm1, %ymm1
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm1[0,1,2,3],zmm0[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm0
-; X32-NEXT: shrb $3, %cl
-; X32-NEXT: kmovd %ecx, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vpslld $24, %xmm1, %xmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm0, %ymm1, %ymm1
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm1[0,1,2,3],zmm0[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrb $4, %cl
-; X32-NEXT: kmovd %ecx, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vpbroadcastd %xmm1, %xmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm0, %ymm1, %ymm1
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm1[0,1,2,3],zmm0[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrb $5, %cl
-; X32-NEXT: andb $1, %cl
-; X32-NEXT: kmovd %ecx, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vpsllq $40, %xmm1, %xmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm0, %ymm1, %ymm1
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm1[0,1,2,3],zmm0[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrb $6, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastw %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrb $7, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpsllq $56, %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movb %ah, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastq %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: andb $2, %cl
-; X32-NEXT: shrb %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2,3,4,5,6]
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movb %ah, %cl
-; X32-NEXT: andb $15, %cl
-; X32-NEXT: movl %ecx, %edx
+; X32-NEXT: kmovd %edx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $61, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $3, %k0, %k1
+; X32-NEXT: shrb $3, %al
+; X32-NEXT: kmovd %eax, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $60, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $4, %k0, %k1
+; X32-NEXT: movl %ecx, %eax
+; X32-NEXT: shrb $4, %al
+; X32-NEXT: kmovd %eax, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $59, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $5, %k0, %k1
+; X32-NEXT: movl %ecx, %eax
+; X32-NEXT: shrb $5, %al
+; X32-NEXT: andb $1, %al
+; X32-NEXT: kmovd %eax, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $58, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $6, %k0, %k1
+; X32-NEXT: movl %ecx, %eax
+; X32-NEXT: shrb $6, %al
+; X32-NEXT: kmovd %eax, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $57, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $7, %k0, %k1
+; X32-NEXT: movl %ecx, %eax
+; X32-NEXT: shrb $7, %al
+; X32-NEXT: kmovd %eax, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $56, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $8, %k0, %k1
+; X32-NEXT: movb %ch, %al
+; X32-NEXT: kmovd %eax, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: andb $2, %al
+; X32-NEXT: shrb %al
+; X32-NEXT: kmovd %eax, %k2
+; X32-NEXT: movb %ch, %al
+; X32-NEXT: andb $15, %al
+; X32-NEXT: movl %eax, %edx
; X32-NEXT: shrb $2, %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastw %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: shrb $3, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2,3,4]
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrl $12, %ecx
-; X32-NEXT: andl $15, %ecx
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastd %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrl $13, %ecx
-; X32-NEXT: andb $1, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2]
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrl $14, %ecx
-; X32-NEXT: andl $3, %ecx
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastw %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrl $15, %ecx
-; X32-NEXT: andl $1, %ecx
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0]
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrl $16, %ecx
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl %ecx, %edx
-; X32-NEXT: andb $2, %dl
-; X32-NEXT: shrb %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpsllw $8, %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %edx, %k3
+; X32-NEXT: shrb $3, %al
+; X32-NEXT: kmovd %eax, %k4
+; X32-NEXT: movl %ecx, %eax
+; X32-NEXT: shrl $13, %eax
+; X32-NEXT: andb $1, %al
+; X32-NEXT: kmovd %eax, %k5
+; X32-NEXT: movl %ecx, %edx
+; X32-NEXT: shrl $16, %edx
+; X32-NEXT: movl %edx, %eax
+; X32-NEXT: andb $2, %al
+; X32-NEXT: shrb %al
+; X32-NEXT: kmovd %eax, %k6
+; X32-NEXT: movl %edx, %ebx
+; X32-NEXT: andb $15, %bl
+; X32-NEXT: movl %ebx, %eax
+; X32-NEXT: shrb $2, %al
+; X32-NEXT: kmovd %eax, %k7
+; X32-NEXT: movl 12(%ebp), %eax
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $55, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $9, %k0, %k1
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $54, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $10, %k0, %k1
+; X32-NEXT: kxorq %k3, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $53, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $11, %k0, %k1
+; X32-NEXT: kxorq %k4, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $52, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $12, %k0, %k1
+; X32-NEXT: movl %ecx, %esi
+; X32-NEXT: shrl $12, %esi
+; X32-NEXT: andl $15, %esi
+; X32-NEXT: kmovd %esi, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $51, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $13, %k0, %k1
+; X32-NEXT: kxorq %k5, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $50, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $14, %k0, %k1
+; X32-NEXT: movl %ecx, %esi
+; X32-NEXT: shrl $14, %esi
+; X32-NEXT: andl $3, %esi
+; X32-NEXT: kmovd %esi, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $49, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $15, %k0, %k1
+; X32-NEXT: movl %ecx, %esi
+; X32-NEXT: shrl $15, %esi
+; X32-NEXT: andl $1, %esi
+; X32-NEXT: kmovd %esi, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $48, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $16, %k0, %k1
+; X32-NEXT: kmovd %edx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $47, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $17, %k0, %k1
+; X32-NEXT: kxorq %k6, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $46, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $18, %k0, %k1
+; X32-NEXT: kxorq %k7, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $45, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $19, %k0, %k1
+; X32-NEXT: shrb $3, %bl
+; X32-NEXT: kmovd %ebx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $44, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $20, %k0, %k1
+; X32-NEXT: movl %edx, %ebx
+; X32-NEXT: shrb $4, %bl
+; X32-NEXT: kmovd %ebx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $43, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $21, %k0, %k1
+; X32-NEXT: movl %edx, %ebx
+; X32-NEXT: shrb $5, %bl
+; X32-NEXT: andb $1, %bl
+; X32-NEXT: kmovd %ebx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $42, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $22, %k0, %k1
+; X32-NEXT: movl %edx, %ebx
+; X32-NEXT: shrb $6, %bl
+; X32-NEXT: kmovd %ebx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $41, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $23, %k0, %k1
+; X32-NEXT: shrb $7, %dl
+; X32-NEXT: kmovd %edx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $40, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $24, %k0, %k1
; X32-NEXT: movl %ecx, %edx
+; X32-NEXT: shrl $24, %edx
+; X32-NEXT: kmovd %edx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $39, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $25, %k0, %k1
+; X32-NEXT: movl %edx, %ebx
+; X32-NEXT: andb $2, %bl
+; X32-NEXT: shrb %bl
+; X32-NEXT: kmovd %ebx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $38, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $26, %k0, %k1
; X32-NEXT: andb $15, %dl
; X32-NEXT: movl %edx, %ebx
; X32-NEXT: shrb $2, %bl
-; X32-NEXT: kmovd %ebx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastw %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %ebx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $37, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $27, %k0, %k1
; X32-NEXT: shrb $3, %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpslld $24, %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %edx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $36, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $28, %k0, %k1
; X32-NEXT: movl %ecx, %edx
-; X32-NEXT: shrb $4, %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastd %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: shrl $28, %edx
+; X32-NEXT: kmovd %edx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $35, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $29, %k0, %k1
; X32-NEXT: movl %ecx, %edx
-; X32-NEXT: shrb $5, %dl
+; X32-NEXT: shrl $29, %edx
; X32-NEXT: andb $1, %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpsllq $40, %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl %ecx, %edx
-; X32-NEXT: shrb $6, %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastw %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: shrb $7, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpsllq $56, %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrl $24, %ecx
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastq %xmm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl %ecx, %edx
-; X32-NEXT: andb $2, %dl
-; X32-NEXT: shrb %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2,3,4,5,6]
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: andb $15, %cl
+; X32-NEXT: kmovd %edx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $34, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $30, %k0, %k1
; X32-NEXT: movl %ecx, %edx
-; X32-NEXT: shrb $2, %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastw %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: shrb $3, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2,3,4]
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm5 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm5, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrl $28, %ecx
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastd %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm4 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255]
-; X32-NEXT: vpblendvb %ymm4, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrl $29, %ecx
-; X32-NEXT: andb $1, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2]
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm1
-; X32-NEXT: vpmovm2b %k0, %zmm0
-; X32-NEXT: vmovdqa {{.*#+}} ymm3 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255]
-; X32-NEXT: vpblendvb %ymm3, %ymm0, %ymm1, %ymm1
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm1[0,1,2,3],zmm0[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrl $30, %ecx
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastw %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm1
-; X32-NEXT: vpmovm2b %k0, %zmm0
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm0, %ymm1, %ymm1
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm1[0,1,2,3],zmm0[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: shrl $31, %eax
-; X32-NEXT: kmovd %eax, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0]
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0]
-; X32-NEXT: vpblendvb %ymm7, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl 12(%ebp), %eax
-; X32-NEXT: kmovd %eax, %k1
-; X32-NEXT: vpmovm2b %k0, %zmm0
-; X32-NEXT: vextracti64x4 $1, %zmm0, %ymm1
-; X32-NEXT: vpmovm2b %k1, %zmm7
-; X32-NEXT: vmovdqa {{.*#+}} ymm6 = [0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm6, %ymm1, %ymm7, %ymm1
-; X32-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: shrl $30, %edx
+; X32-NEXT: kmovd %edx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $33, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $31, %k0, %k1
+; X32-NEXT: shrl $31, %ecx
+; X32-NEXT: kmovd %ecx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $32, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $32, %k0, %k1
+; X32-NEXT: kmovd %eax, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $31, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $33, %k0, %k1
; X32-NEXT: movl %eax, %ecx
; X32-NEXT: andb $2, %cl
; X32-NEXT: shrb %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpsllw $8, %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %ecx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $30, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $34, %k0, %k1
; X32-NEXT: movl %eax, %ecx
; X32-NEXT: andb $15, %cl
; X32-NEXT: movl %ecx, %edx
; X32-NEXT: shrb $2, %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastw %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %edx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $29, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $35, %k0, %k1
; X32-NEXT: shrb $3, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpslld $24, %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %ecx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $28, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $36, %k0, %k1
; X32-NEXT: movl %eax, %ecx
; X32-NEXT: shrb $4, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastd %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %ecx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $27, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $37, %k0, %k1
; X32-NEXT: movl %eax, %ecx
; X32-NEXT: shrb $5, %cl
; X32-NEXT: andb $1, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpsllq $40, %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %ecx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $26, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $38, %k0, %k1
; X32-NEXT: movl %eax, %ecx
; X32-NEXT: shrb $6, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastw %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %ecx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $25, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $39, %k0, %k1
; X32-NEXT: movl %eax, %ecx
; X32-NEXT: shrb $7, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpsllq $56, %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %ecx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $24, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $40, %k0, %k1
; X32-NEXT: movb %ah, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastq %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %ecx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
; X32-NEXT: andb $2, %cl
; X32-NEXT: shrb %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2,3,4,5,6]
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %ecx, %k2
; X32-NEXT: movb %ah, %cl
; X32-NEXT: andb $15, %cl
; X32-NEXT: movl %ecx, %edx
; X32-NEXT: shrb $2, %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastw %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: shrb $3, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2,3,4]
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrl $12, %ecx
-; X32-NEXT: andl $15, %ecx
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastd %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrl $13, %ecx
-; X32-NEXT: andb $1, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2]
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrl $14, %ecx
-; X32-NEXT: andl $3, %ecx
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastw %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %edx, %k3
+; X32-NEXT: shrb $3, %cl
+; X32-NEXT: kmovd %ecx, %k4
; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrl $15, %ecx
-; X32-NEXT: andl $1, %ecx
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0]
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: shrl $13, %ecx
+; X32-NEXT: andb $1, %cl
+; X32-NEXT: kmovd %ecx, %k5
; X32-NEXT: movl %eax, %ecx
; X32-NEXT: shrl $16, %ecx
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
; X32-NEXT: movl %ecx, %edx
; X32-NEXT: andb $2, %dl
; X32-NEXT: shrb %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpsllw $8, %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %edx, %k6
; X32-NEXT: movl %ecx, %edx
; X32-NEXT: andb $15, %dl
; X32-NEXT: movl %edx, %ebx
; X32-NEXT: shrb $2, %bl
-; X32-NEXT: kmovd %ebx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastw %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %ebx, %k7
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $23, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $41, %k0, %k1
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $22, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $42, %k0, %k1
+; X32-NEXT: kxorq %k3, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $21, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $43, %k0, %k1
+; X32-NEXT: kxorq %k4, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $20, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $44, %k0, %k1
+; X32-NEXT: movl %eax, %esi
+; X32-NEXT: shrl $12, %esi
+; X32-NEXT: andl $15, %esi
+; X32-NEXT: kmovd %esi, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $19, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $45, %k0, %k1
+; X32-NEXT: kxorq %k5, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $18, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $46, %k0, %k1
+; X32-NEXT: movl %eax, %esi
+; X32-NEXT: shrl $14, %esi
+; X32-NEXT: andl $3, %esi
+; X32-NEXT: kmovd %esi, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $17, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $47, %k0, %k1
+; X32-NEXT: movl %eax, %esi
+; X32-NEXT: shrl $15, %esi
+; X32-NEXT: andl $1, %esi
+; X32-NEXT: kmovd %esi, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $16, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $48, %k0, %k1
+; X32-NEXT: kmovd %ecx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $15, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $49, %k0, %k1
+; X32-NEXT: kxorq %k6, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $14, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $50, %k0, %k1
+; X32-NEXT: kxorq %k7, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $13, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $51, %k0, %k1
; X32-NEXT: shrb $3, %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpslld $24, %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %edx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $12, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $52, %k0, %k1
; X32-NEXT: movl %ecx, %edx
; X32-NEXT: shrb $4, %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastd %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %edx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
; X32-NEXT: movl %ecx, %edx
; X32-NEXT: shrb $5, %dl
; X32-NEXT: andb $1, %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpsllq $40, %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %edx, %k2
; X32-NEXT: movl %ecx, %edx
; X32-NEXT: shrb $6, %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastw %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %edx, %k3
; X32-NEXT: shrb $7, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpsllq $56, %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %ecx, %k4
; X32-NEXT: movl %eax, %ecx
; X32-NEXT: shrl $24, %ecx
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastq %xmm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %ecx, %k5
; X32-NEXT: movl %ecx, %edx
; X32-NEXT: andb $2, %dl
; X32-NEXT: shrb %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2,3,4,5,6]
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
+; X32-NEXT: kmovd %edx, %k6
; X32-NEXT: andb $15, %cl
; X32-NEXT: movl %ecx, %edx
; X32-NEXT: shrb $2, %dl
-; X32-NEXT: kmovd %edx, %k0
-; X32-NEXT: vpmovb2m %zmm0, %k1
-; X32-NEXT: vpmovm2b %k0, %zmm0
-; X32-NEXT: vpbroadcastw %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k1, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm0
+; X32-NEXT: kmovd %edx, %k7
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $11, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $53, %k0, %k1
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $10, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $54, %k0, %k1
+; X32-NEXT: kxorq %k3, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $9, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $55, %k0, %k1
+; X32-NEXT: kxorq %k4, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $8, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $56, %k0, %k1
+; X32-NEXT: kxorq %k5, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $7, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $57, %k0, %k1
+; X32-NEXT: kxorq %k6, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $6, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $58, %k0, %k1
+; X32-NEXT: kxorq %k7, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $5, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $59, %k0, %k1
; X32-NEXT: shrb $3, %cl
-; X32-NEXT: kmovd %ecx, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vpslldq {{.*#+}} xmm1 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm1[0,1,2,3,4]
-; X32-NEXT: vinserti128 $1, %xmm1, %ymm0, %ymm1
-; X32-NEXT: vextracti64x4 $1, %zmm0, %ymm6
-; X32-NEXT: vpblendvb %ymm5, %ymm6, %ymm1, %ymm1
-; X32-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm0
-; X32-NEXT: vextracti64x4 $1, %zmm0, %ymm1
+; X32-NEXT: kmovd %ecx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $4, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $60, %k0, %k1
; X32-NEXT: movl %eax, %ecx
; X32-NEXT: shrl $28, %ecx
-; X32-NEXT: kmovd %ecx, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm5
-; X32-NEXT: vpbroadcastd %xmm5, %xmm5
-; X32-NEXT: vinserti128 $1, %xmm5, %ymm0, %ymm5
-; X32-NEXT: vpblendvb %ymm4, %ymm1, %ymm5, %ymm1
-; X32-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm0
-; X32-NEXT: vextracti64x4 $1, %zmm0, %ymm1
+; X32-NEXT: kmovd %ecx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $3, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $61, %k0, %k1
; X32-NEXT: movl %eax, %ecx
; X32-NEXT: shrl $29, %ecx
; X32-NEXT: andb $1, %cl
-; X32-NEXT: kmovd %ecx, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm4
-; X32-NEXT: vpslldq {{.*#+}} xmm4 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm4[0,1,2]
-; X32-NEXT: vinserti128 $1, %xmm4, %ymm0, %ymm4
-; X32-NEXT: vpblendvb %ymm3, %ymm1, %ymm4, %ymm1
-; X32-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm0
-; X32-NEXT: vextracti64x4 $1, %zmm0, %ymm1
+; X32-NEXT: kmovd %ecx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $2, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $62, %k0, %k1
; X32-NEXT: movl %eax, %ecx
; X32-NEXT: shrl $30, %ecx
-; X32-NEXT: kmovd %ecx, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm3
-; X32-NEXT: vpbroadcastw %xmm3, %xmm3
-; X32-NEXT: vinserti128 $1, %xmm3, %ymm0, %ymm3
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm3, %ymm1
-; X32-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %ecx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $1, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
; X32-NEXT: kshiftlq $1, %k0, %k0
; X32-NEXT: kshiftrq $1, %k0, %k0
; X32-NEXT: shrl $31, %eax
; X32-NEXT: kmovd %eax, %k1
; X32-NEXT: kshiftlq $63, %k1, %k1
; X32-NEXT: korq %k1, %k0, %k1
-; X32-NEXT: vmovdqa64 {{[0-9]+}}(%esp), %zmm0 # 64-byte Reload
-; X32-NEXT: vmovdqa64 {{[0-9]+}}(%esp), %zmm1 # 64-byte Reload
-; X32-NEXT: vptestmb %zmm1, %zmm0, %k0 {%k1}
-; X32-NEXT: kmovq %k0, {{[0-9]+}}(%esp)
-; X32-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X32-NEXT: vptestmb %zmm0, %zmm1, %k0 {%k1}
+; X32-NEXT: kmovq %k0, (%esp)
+; X32-NEXT: movl (%esp), %eax
; X32-NEXT: movl {{[0-9]+}}(%esp), %edx
-; X32-NEXT: leal -4(%ebp), %esp
+; X32-NEXT: leal -8(%ebp), %esp
+; X32-NEXT: popl %esi
; X32-NEXT: popl %ebx
; X32-NEXT: popl %ebp
; X32-NEXT: vzeroupper
; X32-NEXT: movl %esp, %ebp
; X32-NEXT: .cfi_def_cfa_register %ebp
; X32-NEXT: pushl %ebx
-; X32-NEXT: andl $-64, %esp
-; X32-NEXT: subl $256, %esp # imm = 0x100
+; X32-NEXT: pushl %esi
+; X32-NEXT: andl $-8, %esp
+; X32-NEXT: subl $8, %esp
+; X32-NEXT: .cfi_offset %esi, -16
; X32-NEXT: .cfi_offset %ebx, -12
-; X32-NEXT: vmovaps %zmm1, {{[0-9]+}}(%esp) # 64-byte Spill
-; X32-NEXT: vmovaps %zmm0, {{[0-9]+}}(%esp) # 64-byte Spill
-; X32-NEXT: movl 8(%ebp), %eax
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: andb $2, %cl
-; X32-NEXT: shrb %cl
+; X32-NEXT: movl 8(%ebp), %ecx
; X32-NEXT: kmovd %ecx, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm0
-; X32-NEXT: vpsllw $8, %xmm0, %xmm0
-; X32-NEXT: kmovd %eax, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: andb $15, %cl
-; X32-NEXT: movl %ecx, %edx
+; X32-NEXT: kshiftrq $1, %k0, %k1
+; X32-NEXT: movl %ecx, %eax
+; X32-NEXT: andb $2, %al
+; X32-NEXT: shrb %al
+; X32-NEXT: kmovd %eax, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $62, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $2, %k0, %k1
+; X32-NEXT: movl %ecx, %eax
+; X32-NEXT: andb $15, %al
+; X32-NEXT: movl %eax, %edx
; X32-NEXT: shrb $2, %dl
-; X32-NEXT: kmovd %edx, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vpbroadcastw %xmm1, %xmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm0, %ymm1, %ymm1
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm1[0,1,2,3],zmm0[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm0
-; X32-NEXT: shrb $3, %cl
-; X32-NEXT: kmovd %ecx, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vpslld $24, %xmm1, %xmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm0, %ymm1, %ymm1
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm1[0,1,2,3],zmm0[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrb $4, %cl
-; X32-NEXT: kmovd %ecx, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vpbroadcastd %xmm1, %xmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm0, %ymm1, %ymm1
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm1[0,1,2,3],zmm0[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrb $5, %cl
-; X32-NEXT: andb $1, %cl
-; X32-NEXT: kmovd %ecx, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vpsllq $40, %xmm1, %xmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm0, %ymm1, %ymm1
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm1[0,1,2,3],zmm0[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrb $6, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastw %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrb $7, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpsllq $56, %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movb %ah, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastq %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: andb $2, %cl
-; X32-NEXT: shrb %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2,3,4,5,6]
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movb %ah, %cl
-; X32-NEXT: andb $15, %cl
-; X32-NEXT: movl %ecx, %edx
+; X32-NEXT: kmovd %edx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $61, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $3, %k0, %k1
+; X32-NEXT: shrb $3, %al
+; X32-NEXT: kmovd %eax, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $60, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $4, %k0, %k1
+; X32-NEXT: movl %ecx, %eax
+; X32-NEXT: shrb $4, %al
+; X32-NEXT: kmovd %eax, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $59, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $5, %k0, %k1
+; X32-NEXT: movl %ecx, %eax
+; X32-NEXT: shrb $5, %al
+; X32-NEXT: andb $1, %al
+; X32-NEXT: kmovd %eax, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $58, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $6, %k0, %k1
+; X32-NEXT: movl %ecx, %eax
+; X32-NEXT: shrb $6, %al
+; X32-NEXT: kmovd %eax, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $57, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $7, %k0, %k1
+; X32-NEXT: movl %ecx, %eax
+; X32-NEXT: shrb $7, %al
+; X32-NEXT: kmovd %eax, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $56, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $8, %k0, %k1
+; X32-NEXT: movb %ch, %al
+; X32-NEXT: kmovd %eax, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: andb $2, %al
+; X32-NEXT: shrb %al
+; X32-NEXT: kmovd %eax, %k2
+; X32-NEXT: movb %ch, %al
+; X32-NEXT: andb $15, %al
+; X32-NEXT: movl %eax, %edx
; X32-NEXT: shrb $2, %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastw %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: shrb $3, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2,3,4]
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrl $12, %ecx
-; X32-NEXT: andl $15, %ecx
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastd %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrl $13, %ecx
-; X32-NEXT: andb $1, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2]
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrl $14, %ecx
-; X32-NEXT: andl $3, %ecx
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastw %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrl $15, %ecx
-; X32-NEXT: andl $1, %ecx
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0]
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrl $16, %ecx
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl %ecx, %edx
-; X32-NEXT: andb $2, %dl
-; X32-NEXT: shrb %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpsllw $8, %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %edx, %k3
+; X32-NEXT: shrb $3, %al
+; X32-NEXT: kmovd %eax, %k4
+; X32-NEXT: movl %ecx, %eax
+; X32-NEXT: shrl $13, %eax
+; X32-NEXT: andb $1, %al
+; X32-NEXT: kmovd %eax, %k5
+; X32-NEXT: movl %ecx, %edx
+; X32-NEXT: shrl $16, %edx
+; X32-NEXT: movl %edx, %eax
+; X32-NEXT: andb $2, %al
+; X32-NEXT: shrb %al
+; X32-NEXT: kmovd %eax, %k6
+; X32-NEXT: movl %edx, %ebx
+; X32-NEXT: andb $15, %bl
+; X32-NEXT: movl %ebx, %eax
+; X32-NEXT: shrb $2, %al
+; X32-NEXT: kmovd %eax, %k7
+; X32-NEXT: movl 12(%ebp), %eax
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $55, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $9, %k0, %k1
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $54, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $10, %k0, %k1
+; X32-NEXT: kxorq %k3, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $53, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $11, %k0, %k1
+; X32-NEXT: kxorq %k4, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $52, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $12, %k0, %k1
+; X32-NEXT: movl %ecx, %esi
+; X32-NEXT: shrl $12, %esi
+; X32-NEXT: andl $15, %esi
+; X32-NEXT: kmovd %esi, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $51, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $13, %k0, %k1
+; X32-NEXT: kxorq %k5, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $50, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $14, %k0, %k1
+; X32-NEXT: movl %ecx, %esi
+; X32-NEXT: shrl $14, %esi
+; X32-NEXT: andl $3, %esi
+; X32-NEXT: kmovd %esi, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $49, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $15, %k0, %k1
+; X32-NEXT: movl %ecx, %esi
+; X32-NEXT: shrl $15, %esi
+; X32-NEXT: andl $1, %esi
+; X32-NEXT: kmovd %esi, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $48, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $16, %k0, %k1
+; X32-NEXT: kmovd %edx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $47, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $17, %k0, %k1
+; X32-NEXT: kxorq %k6, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $46, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $18, %k0, %k1
+; X32-NEXT: kxorq %k7, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $45, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $19, %k0, %k1
+; X32-NEXT: shrb $3, %bl
+; X32-NEXT: kmovd %ebx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $44, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $20, %k0, %k1
+; X32-NEXT: movl %edx, %ebx
+; X32-NEXT: shrb $4, %bl
+; X32-NEXT: kmovd %ebx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $43, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $21, %k0, %k1
+; X32-NEXT: movl %edx, %ebx
+; X32-NEXT: shrb $5, %bl
+; X32-NEXT: andb $1, %bl
+; X32-NEXT: kmovd %ebx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $42, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $22, %k0, %k1
+; X32-NEXT: movl %edx, %ebx
+; X32-NEXT: shrb $6, %bl
+; X32-NEXT: kmovd %ebx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $41, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $23, %k0, %k1
+; X32-NEXT: shrb $7, %dl
+; X32-NEXT: kmovd %edx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $40, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $24, %k0, %k1
; X32-NEXT: movl %ecx, %edx
+; X32-NEXT: shrl $24, %edx
+; X32-NEXT: kmovd %edx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $39, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $25, %k0, %k1
+; X32-NEXT: movl %edx, %ebx
+; X32-NEXT: andb $2, %bl
+; X32-NEXT: shrb %bl
+; X32-NEXT: kmovd %ebx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $38, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $26, %k0, %k1
; X32-NEXT: andb $15, %dl
; X32-NEXT: movl %edx, %ebx
; X32-NEXT: shrb $2, %bl
-; X32-NEXT: kmovd %ebx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastw %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %ebx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $37, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $27, %k0, %k1
; X32-NEXT: shrb $3, %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpslld $24, %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %edx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $36, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $28, %k0, %k1
; X32-NEXT: movl %ecx, %edx
-; X32-NEXT: shrb $4, %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastd %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: shrl $28, %edx
+; X32-NEXT: kmovd %edx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $35, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $29, %k0, %k1
; X32-NEXT: movl %ecx, %edx
-; X32-NEXT: shrb $5, %dl
+; X32-NEXT: shrl $29, %edx
; X32-NEXT: andb $1, %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpsllq $40, %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl %ecx, %edx
-; X32-NEXT: shrb $6, %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastw %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: shrb $7, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpsllq $56, %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrl $24, %ecx
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastq %xmm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl %ecx, %edx
-; X32-NEXT: andb $2, %dl
-; X32-NEXT: shrb %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2,3,4,5,6]
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: andb $15, %cl
+; X32-NEXT: kmovd %edx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $34, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $30, %k0, %k1
; X32-NEXT: movl %ecx, %edx
-; X32-NEXT: shrb $2, %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastw %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: shrb $3, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2,3,4]
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm5 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm5, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrl $28, %ecx
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastd %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm4 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255]
-; X32-NEXT: vpblendvb %ymm4, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrl $29, %ecx
-; X32-NEXT: andb $1, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2]
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm1
-; X32-NEXT: vpmovm2b %k0, %zmm0
-; X32-NEXT: vmovdqa {{.*#+}} ymm3 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255]
-; X32-NEXT: vpblendvb %ymm3, %ymm0, %ymm1, %ymm1
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm1[0,1,2,3],zmm0[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrl $30, %ecx
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastw %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm1
-; X32-NEXT: vpmovm2b %k0, %zmm0
-; X32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255]
-; X32-NEXT: vpblendvb %ymm2, %ymm0, %ymm1, %ymm1
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm1[0,1,2,3],zmm0[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: shrl $31, %eax
-; X32-NEXT: kmovd %eax, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0]
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0]
-; X32-NEXT: vpblendvb %ymm7, %ymm1, %ymm0, %ymm0
-; X32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl 12(%ebp), %eax
-; X32-NEXT: kmovd %eax, %k1
-; X32-NEXT: vpmovm2b %k0, %zmm0
-; X32-NEXT: vextracti64x4 $1, %zmm0, %ymm1
-; X32-NEXT: vpmovm2b %k1, %zmm7
-; X32-NEXT: vmovdqa {{.*#+}} ymm6 = [0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm6, %ymm1, %ymm7, %ymm1
-; X32-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: shrl $30, %edx
+; X32-NEXT: kmovd %edx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $33, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $31, %k0, %k1
+; X32-NEXT: shrl $31, %ecx
+; X32-NEXT: kmovd %ecx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $32, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $32, %k0, %k1
+; X32-NEXT: kmovd %eax, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $31, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $33, %k0, %k1
; X32-NEXT: movl %eax, %ecx
; X32-NEXT: andb $2, %cl
; X32-NEXT: shrb %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpsllw $8, %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %ecx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $30, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $34, %k0, %k1
; X32-NEXT: movl %eax, %ecx
; X32-NEXT: andb $15, %cl
; X32-NEXT: movl %ecx, %edx
; X32-NEXT: shrb $2, %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastw %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %edx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $29, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $35, %k0, %k1
; X32-NEXT: shrb $3, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpslld $24, %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %ecx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $28, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $36, %k0, %k1
; X32-NEXT: movl %eax, %ecx
; X32-NEXT: shrb $4, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastd %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %ecx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $27, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $37, %k0, %k1
; X32-NEXT: movl %eax, %ecx
; X32-NEXT: shrb $5, %cl
; X32-NEXT: andb $1, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpsllq $40, %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %ecx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $26, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $38, %k0, %k1
; X32-NEXT: movl %eax, %ecx
; X32-NEXT: shrb $6, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastw %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %ecx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $25, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $39, %k0, %k1
; X32-NEXT: movl %eax, %ecx
; X32-NEXT: shrb $7, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpsllq $56, %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %ecx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $24, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $40, %k0, %k1
; X32-NEXT: movb %ah, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastq %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %ecx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
; X32-NEXT: andb $2, %cl
; X32-NEXT: shrb %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2,3,4,5,6]
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %ecx, %k2
; X32-NEXT: movb %ah, %cl
; X32-NEXT: andb $15, %cl
; X32-NEXT: movl %ecx, %edx
; X32-NEXT: shrb $2, %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastw %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %edx, %k3
; X32-NEXT: shrb $3, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2,3,4]
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrl $12, %ecx
-; X32-NEXT: andl $15, %ecx
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastd %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %ecx, %k4
; X32-NEXT: movl %eax, %ecx
; X32-NEXT: shrl $13, %ecx
; X32-NEXT: andb $1, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2]
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrl $14, %ecx
-; X32-NEXT: andl $3, %ecx
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastw %xmm0, %xmm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: movl %eax, %ecx
-; X32-NEXT: shrl $15, %ecx
-; X32-NEXT: andl $1, %ecx
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0]
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %ecx, %k5
; X32-NEXT: movl %eax, %ecx
; X32-NEXT: shrl $16, %ecx
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
; X32-NEXT: movl %ecx, %edx
; X32-NEXT: andb $2, %dl
; X32-NEXT: shrb %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpsllw $8, %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %edx, %k6
; X32-NEXT: movl %ecx, %edx
; X32-NEXT: andb $15, %dl
; X32-NEXT: movl %edx, %ebx
; X32-NEXT: shrb $2, %bl
-; X32-NEXT: kmovd %ebx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastw %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %ebx, %k7
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $23, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $41, %k0, %k1
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $22, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $42, %k0, %k1
+; X32-NEXT: kxorq %k3, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $21, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $43, %k0, %k1
+; X32-NEXT: kxorq %k4, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $20, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $44, %k0, %k1
+; X32-NEXT: movl %eax, %esi
+; X32-NEXT: shrl $12, %esi
+; X32-NEXT: andl $15, %esi
+; X32-NEXT: kmovd %esi, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $19, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $45, %k0, %k1
+; X32-NEXT: kxorq %k5, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $18, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $46, %k0, %k1
+; X32-NEXT: movl %eax, %esi
+; X32-NEXT: shrl $14, %esi
+; X32-NEXT: andl $3, %esi
+; X32-NEXT: kmovd %esi, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $17, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $47, %k0, %k1
+; X32-NEXT: movl %eax, %esi
+; X32-NEXT: shrl $15, %esi
+; X32-NEXT: andl $1, %esi
+; X32-NEXT: kmovd %esi, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $16, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $48, %k0, %k1
+; X32-NEXT: kmovd %ecx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $15, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $49, %k0, %k1
+; X32-NEXT: kxorq %k6, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $14, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $50, %k0, %k1
+; X32-NEXT: kxorq %k7, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $13, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $51, %k0, %k1
; X32-NEXT: shrb $3, %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpslld $24, %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %edx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $12, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $52, %k0, %k1
; X32-NEXT: movl %ecx, %edx
; X32-NEXT: shrb $4, %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastd %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %edx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
; X32-NEXT: movl %ecx, %edx
; X32-NEXT: shrb $5, %dl
; X32-NEXT: andb $1, %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpsllq $40, %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %edx, %k2
; X32-NEXT: movl %ecx, %edx
; X32-NEXT: shrb $6, %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastw %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %edx, %k3
; X32-NEXT: shrb $7, %cl
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpsllq $56, %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %ecx, %k4
; X32-NEXT: movl %eax, %ecx
; X32-NEXT: shrl $24, %ecx
-; X32-NEXT: kmovd %ecx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpbroadcastq %xmm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %ecx, %k5
; X32-NEXT: movl %ecx, %edx
; X32-NEXT: andb $2, %dl
; X32-NEXT: shrb %dl
-; X32-NEXT: kmovd %edx, %k1
-; X32-NEXT: vpmovm2b %k1, %zmm0
-; X32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2,3,4,5,6]
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
+; X32-NEXT: kmovd %edx, %k6
; X32-NEXT: andb $15, %cl
; X32-NEXT: movl %ecx, %edx
; X32-NEXT: shrb $2, %dl
-; X32-NEXT: kmovd %edx, %k0
-; X32-NEXT: vpmovb2m %zmm0, %k1
-; X32-NEXT: vpmovm2b %k0, %zmm0
-; X32-NEXT: vpbroadcastw %xmm0, %xmm0
-; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; X32-NEXT: vpmovm2b %k1, %zmm1
-; X32-NEXT: vextracti64x4 $1, %zmm1, %ymm6
-; X32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255]
-; X32-NEXT: vpblendvb %ymm7, %ymm6, %ymm0, %ymm0
-; X32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm0
+; X32-NEXT: kmovd %edx, %k7
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $11, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $53, %k0, %k1
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $10, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $54, %k0, %k1
+; X32-NEXT: kxorq %k3, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $9, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $55, %k0, %k1
+; X32-NEXT: kxorq %k4, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $8, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $56, %k0, %k1
+; X32-NEXT: kxorq %k5, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $7, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $57, %k0, %k1
+; X32-NEXT: kxorq %k6, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $6, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $58, %k0, %k1
+; X32-NEXT: kxorq %k7, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $5, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $59, %k0, %k1
; X32-NEXT: shrb $3, %cl
-; X32-NEXT: kmovd %ecx, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm1
-; X32-NEXT: vpslldq {{.*#+}} xmm1 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm1[0,1,2,3,4]
-; X32-NEXT: vinserti128 $1, %xmm1, %ymm0, %ymm1
-; X32-NEXT: vextracti64x4 $1, %zmm0, %ymm6
-; X32-NEXT: vpblendvb %ymm5, %ymm6, %ymm1, %ymm1
-; X32-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm0
-; X32-NEXT: vextracti64x4 $1, %zmm0, %ymm1
+; X32-NEXT: kmovd %ecx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $4, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $60, %k0, %k1
; X32-NEXT: movl %eax, %ecx
; X32-NEXT: shrl $28, %ecx
-; X32-NEXT: kmovd %ecx, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm5
-; X32-NEXT: vpbroadcastd %xmm5, %xmm5
-; X32-NEXT: vinserti128 $1, %xmm5, %ymm0, %ymm5
-; X32-NEXT: vpblendvb %ymm4, %ymm1, %ymm5, %ymm1
-; X32-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm0
-; X32-NEXT: vextracti64x4 $1, %zmm0, %ymm1
+; X32-NEXT: kmovd %ecx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $3, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $61, %k0, %k1
; X32-NEXT: movl %eax, %ecx
; X32-NEXT: shrl $29, %ecx
; X32-NEXT: andb $1, %cl
-; X32-NEXT: kmovd %ecx, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm4
-; X32-NEXT: vpslldq {{.*#+}} xmm4 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm4[0,1,2]
-; X32-NEXT: vinserti128 $1, %xmm4, %ymm0, %ymm4
-; X32-NEXT: vpblendvb %ymm3, %ymm1, %ymm4, %ymm1
-; X32-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm0
-; X32-NEXT: vextracti64x4 $1, %zmm0, %ymm1
+; X32-NEXT: kmovd %ecx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $2, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
+; X32-NEXT: kshiftrq $62, %k0, %k1
; X32-NEXT: movl %eax, %ecx
; X32-NEXT: shrl $30, %ecx
-; X32-NEXT: kmovd %ecx, %k0
-; X32-NEXT: vpmovm2b %k0, %zmm3
-; X32-NEXT: vpbroadcastw %xmm3, %xmm3
-; X32-NEXT: vinserti128 $1, %xmm3, %ymm0, %ymm3
-; X32-NEXT: vpblendvb %ymm2, %ymm1, %ymm3, %ymm1
-; X32-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
-; X32-NEXT: vpmovb2m %zmm0, %k0
+; X32-NEXT: kmovd %ecx, %k2
+; X32-NEXT: kxorq %k2, %k1, %k1
+; X32-NEXT: kshiftlq $63, %k1, %k1
+; X32-NEXT: kshiftrq $1, %k1, %k1
+; X32-NEXT: kxorq %k0, %k1, %k0
; X32-NEXT: kshiftlq $1, %k0, %k0
; X32-NEXT: kshiftrq $1, %k0, %k0
; X32-NEXT: shrl $31, %eax
; X32-NEXT: kmovd %eax, %k1
; X32-NEXT: kshiftlq $63, %k1, %k1
; X32-NEXT: korq %k1, %k0, %k1
-; X32-NEXT: vmovdqa64 {{[0-9]+}}(%esp), %zmm0 # 64-byte Reload
-; X32-NEXT: vmovdqa64 {{[0-9]+}}(%esp), %zmm1 # 64-byte Reload
-; X32-NEXT: vptestnmb %zmm1, %zmm0, %k0 {%k1}
-; X32-NEXT: kmovq %k0, {{[0-9]+}}(%esp)
-; X32-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X32-NEXT: vptestnmb %zmm0, %zmm1, %k0 {%k1}
+; X32-NEXT: kmovq %k0, (%esp)
+; X32-NEXT: movl (%esp), %eax
; X32-NEXT: movl {{[0-9]+}}(%esp), %edx
-; X32-NEXT: leal -4(%ebp), %esp
+; X32-NEXT: leal -8(%ebp), %esp
+; X32-NEXT: popl %esi
; X32-NEXT: popl %ebx
; X32-NEXT: popl %ebp
; X32-NEXT: vzeroupper
; AVX512F-32-NEXT: .cfi_def_cfa_offset 8
; AVX512F-32-NEXT: pushl %esi
; AVX512F-32-NEXT: .cfi_def_cfa_offset 12
-; AVX512F-32-NEXT: subl $60, %esp
-; AVX512F-32-NEXT: .cfi_def_cfa_offset 72
+; AVX512F-32-NEXT: subl $68, %esp
+; AVX512F-32-NEXT: .cfi_def_cfa_offset 80
; AVX512F-32-NEXT: .cfi_offset %esi, -12
; AVX512F-32-NEXT: .cfi_offset %ebx, -8
-; AVX512F-32-NEXT: vmovdqa64 %zmm1, %zmm6
-; AVX512F-32-NEXT: vmovdqa64 %zmm0, %zmm5
-; AVX512F-32-NEXT: movl {{[0-9]+}}(%esp), %ecx
-; AVX512F-32-NEXT: movl %ecx, %eax
-; AVX512F-32-NEXT: shrb $5, %al
-; AVX512F-32-NEXT: andb $1, %al
-; AVX512F-32-NEXT: movl %ecx, %ebx
-; AVX512F-32-NEXT: andb $15, %bl
-; AVX512F-32-NEXT: movl %ecx, %edx
-; AVX512F-32-NEXT: andb $2, %dl
-; AVX512F-32-NEXT: shrb %dl
-; AVX512F-32-NEXT: kmovd %edx, %k0
+; AVX512F-32-NEXT: movl {{[0-9]+}}(%esp), %ebx
+; AVX512F-32-NEXT: movl %ebx, %eax
+; AVX512F-32-NEXT: shrl $16, %eax
; AVX512F-32-NEXT: movl %ebx, %edx
-; AVX512F-32-NEXT: shrb $2, %bl
-; AVX512F-32-NEXT: kmovd %ebx, %k1
-; AVX512F-32-NEXT: movl %ecx, %ebx
-; AVX512F-32-NEXT: shrb $4, %bl
-; AVX512F-32-NEXT: shrb $3, %dl
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm2
-; AVX512F-32-NEXT: vpsllw $8, %xmm2, %xmm2
-; AVX512F-32-NEXT: kmovd %ecx, %k0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm3
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm0, %ymm3, %ymm2, %ymm2
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm2 = zmm2[0,1,2,3],zmm3[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm2, %k0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm2
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm3
-; AVX512F-32-NEXT: vpbroadcastw %xmm3, %xmm3
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm0, %ymm2, %ymm3, %ymm3
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm2 = zmm3[0,1,2,3],zmm2[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm2, %k0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm2
-; AVX512F-32-NEXT: kmovd %edx, %k0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm3
-; AVX512F-32-NEXT: vpslld $24, %xmm3, %xmm3
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm0, %ymm2, %ymm3, %ymm3
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm2 = zmm3[0,1,2,3],zmm2[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm2, %k0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm2
-; AVX512F-32-NEXT: kmovd %ebx, %k0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm3
-; AVX512F-32-NEXT: vpbroadcastd %xmm3, %xmm3
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm0, %ymm2, %ymm3, %ymm3
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm2 = zmm3[0,1,2,3],zmm2[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm2, %k0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm2
-; AVX512F-32-NEXT: kmovd %eax, %k0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm3
-; AVX512F-32-NEXT: vpsllq $40, %xmm3, %xmm3
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm0, %ymm2, %ymm3, %ymm3
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm2 = zmm3[0,1,2,3],zmm2[4,5,6,7]
-; AVX512F-32-NEXT: movl %ecx, %eax
-; AVX512F-32-NEXT: shrb $6, %al
-; AVX512F-32-NEXT: vpmovb2m %zmm2, %k0
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm2
-; AVX512F-32-NEXT: vpbroadcastw %xmm2, %xmm2
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm3
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm0, %ymm3, %ymm2, %ymm2
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm2 = zmm2[0,1,2,3],zmm3[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm2, %k0
-; AVX512F-32-NEXT: movl %ecx, %eax
-; AVX512F-32-NEXT: shrb $7, %al
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm2
-; AVX512F-32-NEXT: vpsllq $56, %xmm2, %xmm2
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm3
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm0, %ymm3, %ymm2, %ymm2
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm2 = zmm2[0,1,2,3],zmm3[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm2, %k0
-; AVX512F-32-NEXT: movb %ch, %al
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm2
-; AVX512F-32-NEXT: vpbroadcastq %xmm2, %xmm2
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm3
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm0, %ymm3, %ymm2, %ymm2
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm2 = zmm2[0,1,2,3],zmm3[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm2, %k0
-; AVX512F-32-NEXT: andb $2, %al
-; AVX512F-32-NEXT: shrb %al
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm2
-; AVX512F-32-NEXT: vpslldq {{.*#+}} xmm2 = zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm2[0,1,2,3,4,5,6]
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm3
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm0, %ymm3, %ymm2, %ymm2
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm2 = zmm2[0,1,2,3],zmm3[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm2, %k0
-; AVX512F-32-NEXT: movb %ch, %dl
; AVX512F-32-NEXT: andb $15, %dl
-; AVX512F-32-NEXT: movl %edx, %eax
+; AVX512F-32-NEXT: movl %ebx, %ecx
+; AVX512F-32-NEXT: andb $2, %cl
+; AVX512F-32-NEXT: shrb %cl
+; AVX512F-32-NEXT: kmovd %ecx, %k1
+; AVX512F-32-NEXT: movl %edx, %ecx
; AVX512F-32-NEXT: shrb $2, %dl
-; AVX512F-32-NEXT: kmovd %edx, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm2
-; AVX512F-32-NEXT: vpbroadcastw %xmm2, %xmm2
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm3
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm0, %ymm3, %ymm2, %ymm2
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm2 = zmm2[0,1,2,3],zmm3[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm2, %k0
-; AVX512F-32-NEXT: shrb $3, %al
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm2
-; AVX512F-32-NEXT: vpslldq {{.*#+}} xmm2 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm2[0,1,2,3,4]
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm3
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm0, %ymm3, %ymm2, %ymm2
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm2 = zmm2[0,1,2,3],zmm3[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm2, %k0
-; AVX512F-32-NEXT: movl %ecx, %eax
-; AVX512F-32-NEXT: shrl $12, %eax
-; AVX512F-32-NEXT: andl $15, %eax
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm2
-; AVX512F-32-NEXT: vpbroadcastd %xmm2, %xmm2
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm3
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm0, %ymm3, %ymm2, %ymm2
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm2 = zmm2[0,1,2,3],zmm3[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm2, %k0
-; AVX512F-32-NEXT: movl %ecx, %eax
-; AVX512F-32-NEXT: shrl $13, %eax
-; AVX512F-32-NEXT: andb $1, %al
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm2
-; AVX512F-32-NEXT: vpslldq {{.*#+}} xmm2 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm2[0,1,2]
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm3
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm0, %ymm3, %ymm2, %ymm2
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm2 = zmm2[0,1,2,3],zmm3[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm2, %k0
-; AVX512F-32-NEXT: movl %ecx, %eax
-; AVX512F-32-NEXT: shrl $14, %eax
-; AVX512F-32-NEXT: andl $3, %eax
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm2
-; AVX512F-32-NEXT: vpbroadcastw %xmm2, %xmm2
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm3
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm0, %ymm3, %ymm2, %ymm2
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm2 = zmm2[0,1,2,3],zmm3[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm2, %k0
-; AVX512F-32-NEXT: movl %ecx, %eax
-; AVX512F-32-NEXT: shrl $15, %eax
-; AVX512F-32-NEXT: andl $1, %eax
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm2
-; AVX512F-32-NEXT: vpslldq {{.*#+}} xmm2 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm2[0]
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm3
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm0, %ymm3, %ymm2, %ymm2
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm2 = zmm2[0,1,2,3],zmm3[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm2, %k0
-; AVX512F-32-NEXT: movl %ecx, %eax
-; AVX512F-32-NEXT: shrl $16, %eax
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm2
-; AVX512F-32-NEXT: vinserti128 $1, %xmm2, %ymm0, %ymm2
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm3
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm0, %ymm3, %ymm2, %ymm2
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm2 = zmm2[0,1,2,3],zmm3[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm2, %k0
+; AVX512F-32-NEXT: kmovd %edx, %k2
+; AVX512F-32-NEXT: movb %bh, %dl
+; AVX512F-32-NEXT: andb $15, %dl
+; AVX512F-32-NEXT: shrb $3, %cl
+; AVX512F-32-NEXT: kmovd %ecx, %k0
+; AVX512F-32-NEXT: movl %ebx, %ecx
+; AVX512F-32-NEXT: shrb $4, %cl
+; AVX512F-32-NEXT: kmovd %ecx, %k3
+; AVX512F-32-NEXT: movl %ebx, %ecx
+; AVX512F-32-NEXT: shrb $5, %cl
+; AVX512F-32-NEXT: andb $1, %cl
+; AVX512F-32-NEXT: kmovd %ecx, %k4
+; AVX512F-32-NEXT: movl %ebx, %ecx
+; AVX512F-32-NEXT: shrb $6, %cl
+; AVX512F-32-NEXT: kmovd %ecx, %k6
+; AVX512F-32-NEXT: movl %ebx, %ecx
+; AVX512F-32-NEXT: shrb $7, %cl
+; AVX512F-32-NEXT: kmovd %ebx, %k5
+; AVX512F-32-NEXT: kshiftrq $1, %k5, %k7
+; AVX512F-32-NEXT: kxorq %k1, %k7, %k1
+; AVX512F-32-NEXT: kshiftlq $63, %k1, %k1
+; AVX512F-32-NEXT: kshiftrq $62, %k1, %k1
+; AVX512F-32-NEXT: kxorq %k5, %k1, %k7
+; AVX512F-32-NEXT: kshiftrq $2, %k7, %k1
+; AVX512F-32-NEXT: kxorq %k2, %k1, %k2
+; AVX512F-32-NEXT: kmovd %ecx, %k5
+; AVX512F-32-NEXT: movb %bh, %cl
+; AVX512F-32-NEXT: kmovd %ecx, %k1
+; AVX512F-32-NEXT: movl %ebx, %esi
+; AVX512F-32-NEXT: andb $2, %cl
+; AVX512F-32-NEXT: shrb %cl
+; AVX512F-32-NEXT: kshiftlq $63, %k2, %k2
+; AVX512F-32-NEXT: kshiftrq $61, %k2, %k2
+; AVX512F-32-NEXT: kxorq %k7, %k2, %k7
+; AVX512F-32-NEXT: kshiftrq $3, %k7, %k2
+; AVX512F-32-NEXT: kxorq %k0, %k2, %k0
+; AVX512F-32-NEXT: kmovd %ecx, %k2
+; AVX512F-32-NEXT: movl %edx, %ecx
+; AVX512F-32-NEXT: shrb $2, %dl
+; AVX512F-32-NEXT: kshiftlq $63, %k0, %k0
+; AVX512F-32-NEXT: kshiftrq $60, %k0, %k0
+; AVX512F-32-NEXT: kxorq %k7, %k0, %k0
+; AVX512F-32-NEXT: kshiftrq $4, %k0, %k7
+; AVX512F-32-NEXT: kxorq %k3, %k7, %k7
+; AVX512F-32-NEXT: kmovd %edx, %k3
; AVX512F-32-NEXT: movl %eax, %edx
-; AVX512F-32-NEXT: andb $2, %dl
-; AVX512F-32-NEXT: shrb %dl
-; AVX512F-32-NEXT: kmovd %edx, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm2
-; AVX512F-32-NEXT: vpsllw $8, %xmm2, %xmm2
-; AVX512F-32-NEXT: vinserti128 $1, %xmm2, %ymm0, %ymm2
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm3
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm0, %ymm3, %ymm2, %ymm2
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm2 = zmm2[0,1,2,3],zmm3[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm2, %k0
+; AVX512F-32-NEXT: andb $15, %dl
+; AVX512F-32-NEXT: shrb $3, %cl
+; AVX512F-32-NEXT: kshiftlq $63, %k7, %k7
+; AVX512F-32-NEXT: kshiftrq $59, %k7, %k7
+; AVX512F-32-NEXT: kxorq %k0, %k7, %k7
+; AVX512F-32-NEXT: kshiftrq $5, %k7, %k0
+; AVX512F-32-NEXT: kxorq %k4, %k0, %k4
+; AVX512F-32-NEXT: kmovd %ecx, %k0
+; AVX512F-32-NEXT: movl %esi, %ecx
+; AVX512F-32-NEXT: shrl $13, %ecx
+; AVX512F-32-NEXT: andb $1, %cl
+; AVX512F-32-NEXT: kshiftlq $63, %k4, %k4
+; AVX512F-32-NEXT: kshiftrq $58, %k4, %k4
+; AVX512F-32-NEXT: kxorq %k7, %k4, %k7
+; AVX512F-32-NEXT: kshiftrq $6, %k7, %k4
+; AVX512F-32-NEXT: kxorq %k6, %k4, %k6
+; AVX512F-32-NEXT: kmovd %ecx, %k4
; AVX512F-32-NEXT: movl %eax, %ebx
-; AVX512F-32-NEXT: andb $15, %bl
-; AVX512F-32-NEXT: movl %ebx, %edx
-; AVX512F-32-NEXT: shrb $2, %bl
-; AVX512F-32-NEXT: kmovd %ebx, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm2
-; AVX512F-32-NEXT: vpbroadcastw %xmm2, %xmm2
-; AVX512F-32-NEXT: vinserti128 $1, %xmm2, %ymm0, %ymm2
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm3
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm0, %ymm3, %ymm2, %ymm2
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm2 = zmm2[0,1,2,3],zmm3[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm2, %k0
-; AVX512F-32-NEXT: shrb $3, %dl
-; AVX512F-32-NEXT: kmovd %edx, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm2
-; AVX512F-32-NEXT: vpslld $24, %xmm2, %xmm2
-; AVX512F-32-NEXT: vinserti128 $1, %xmm2, %ymm0, %ymm2
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm3
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm0, %ymm3, %ymm2, %ymm2
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm2 = zmm2[0,1,2,3],zmm3[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm2, %k0
-; AVX512F-32-NEXT: movl %eax, %edx
-; AVX512F-32-NEXT: shrb $4, %dl
-; AVX512F-32-NEXT: kmovd %edx, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm2
-; AVX512F-32-NEXT: vpbroadcastd %xmm2, %xmm2
-; AVX512F-32-NEXT: vinserti128 $1, %xmm2, %ymm0, %ymm2
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm3
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm0, %ymm3, %ymm2, %ymm2
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm2 = zmm2[0,1,2,3],zmm3[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm2, %k0
-; AVX512F-32-NEXT: movl %eax, %edx
-; AVX512F-32-NEXT: shrb $5, %dl
-; AVX512F-32-NEXT: andb $1, %dl
-; AVX512F-32-NEXT: kmovd %edx, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm2
-; AVX512F-32-NEXT: vpsllq $40, %xmm2, %xmm2
-; AVX512F-32-NEXT: vinserti128 $1, %xmm2, %ymm0, %ymm2
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm3
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm0, %ymm3, %ymm2, %ymm2
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm2 = zmm2[0,1,2,3],zmm3[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm2, %k0
+; AVX512F-32-NEXT: andb $2, %bl
+; AVX512F-32-NEXT: shrb %bl
+; AVX512F-32-NEXT: kshiftlq $63, %k6, %k6
+; AVX512F-32-NEXT: kshiftrq $57, %k6, %k6
+; AVX512F-32-NEXT: kxorq %k7, %k6, %k6
+; AVX512F-32-NEXT: kshiftrq $7, %k6, %k7
+; AVX512F-32-NEXT: kxorq %k5, %k7, %k7
+; AVX512F-32-NEXT: kmovd %ebx, %k5
+; AVX512F-32-NEXT: movl %edx, %ecx
+; AVX512F-32-NEXT: shrb $2, %dl
+; AVX512F-32-NEXT: kshiftlq $63, %k7, %k7
+; AVX512F-32-NEXT: kshiftrq $56, %k7, %k7
+; AVX512F-32-NEXT: kxorq %k6, %k7, %k7
+; AVX512F-32-NEXT: kshiftrq $8, %k7, %k6
+; AVX512F-32-NEXT: kxorq %k1, %k6, %k1
+; AVX512F-32-NEXT: kmovd %edx, %k6
+; AVX512F-32-NEXT: movl {{[0-9]+}}(%esp), %ebx
+; AVX512F-32-NEXT: shrb $3, %cl
+; AVX512F-32-NEXT: kshiftlq $63, %k1, %k1
+; AVX512F-32-NEXT: kshiftrq $55, %k1, %k1
+; AVX512F-32-NEXT: kxorq %k7, %k1, %k7
+; AVX512F-32-NEXT: kshiftrq $9, %k7, %k1
+; AVX512F-32-NEXT: kxorq %k2, %k1, %k2
+; AVX512F-32-NEXT: kmovd %ecx, %k1
+; AVX512F-32-NEXT: movl %eax, %ecx
+; AVX512F-32-NEXT: shrb $4, %cl
+; AVX512F-32-NEXT: kshiftlq $63, %k2, %k2
+; AVX512F-32-NEXT: kshiftrq $54, %k2, %k2
+; AVX512F-32-NEXT: kxorq %k7, %k2, %k7
+; AVX512F-32-NEXT: kshiftrq $10, %k7, %k2
+; AVX512F-32-NEXT: kxorq %k3, %k2, %k3
+; AVX512F-32-NEXT: kmovd %ecx, %k2
+; AVX512F-32-NEXT: movl %eax, %ecx
+; AVX512F-32-NEXT: shrb $5, %cl
+; AVX512F-32-NEXT: andb $1, %cl
+; AVX512F-32-NEXT: movl %esi, %edx
+; AVX512F-32-NEXT: shrl $12, %edx
+; AVX512F-32-NEXT: andl $15, %edx
+; AVX512F-32-NEXT: kshiftlq $63, %k3, %k3
+; AVX512F-32-NEXT: kshiftrq $53, %k3, %k3
+; AVX512F-32-NEXT: kxorq %k7, %k3, %k3
+; AVX512F-32-NEXT: kshiftrq $11, %k3, %k7
+; AVX512F-32-NEXT: kxorq %k0, %k7, %k0
+; AVX512F-32-NEXT: kshiftlq $63, %k0, %k0
+; AVX512F-32-NEXT: kshiftrq $52, %k0, %k0
+; AVX512F-32-NEXT: kxorq %k3, %k0, %k3
+; AVX512F-32-NEXT: kshiftrq $12, %k3, %k0
+; AVX512F-32-NEXT: kmovd %edx, %k7
+; AVX512F-32-NEXT: kxorq %k7, %k0, %k7
+; AVX512F-32-NEXT: kmovd %ecx, %k0
; AVX512F-32-NEXT: movl %eax, %edx
; AVX512F-32-NEXT: shrb $6, %dl
-; AVX512F-32-NEXT: kmovd %edx, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm2
-; AVX512F-32-NEXT: vpbroadcastw %xmm2, %xmm2
-; AVX512F-32-NEXT: vinserti128 $1, %xmm2, %ymm0, %ymm2
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm3
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm0, %ymm3, %ymm2, %ymm2
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm2 = zmm2[0,1,2,3],zmm3[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm2, %k0
+; AVX512F-32-NEXT: movl %esi, %ecx
+; AVX512F-32-NEXT: shrl $14, %ecx
+; AVX512F-32-NEXT: andl $3, %ecx
+; AVX512F-32-NEXT: kshiftlq $63, %k7, %k7
+; AVX512F-32-NEXT: kshiftrq $51, %k7, %k7
+; AVX512F-32-NEXT: kxorq %k3, %k7, %k3
+; AVX512F-32-NEXT: kshiftrq $13, %k3, %k7
+; AVX512F-32-NEXT: kxorq %k4, %k7, %k4
+; AVX512F-32-NEXT: kmovd %ecx, %k7
+; AVX512F-32-NEXT: movl %esi, %ecx
+; AVX512F-32-NEXT: shrl $15, %ecx
+; AVX512F-32-NEXT: andl $1, %ecx
+; AVX512F-32-NEXT: kshiftlq $63, %k4, %k4
+; AVX512F-32-NEXT: kshiftrq $50, %k4, %k4
+; AVX512F-32-NEXT: kxorq %k3, %k4, %k3
+; AVX512F-32-NEXT: kshiftrq $14, %k3, %k4
+; AVX512F-32-NEXT: kxorq %k7, %k4, %k4
+; AVX512F-32-NEXT: kshiftlq $63, %k4, %k4
+; AVX512F-32-NEXT: kshiftrq $49, %k4, %k4
+; AVX512F-32-NEXT: kxorq %k3, %k4, %k3
+; AVX512F-32-NEXT: kshiftrq $15, %k3, %k4
+; AVX512F-32-NEXT: kmovd %ecx, %k7
+; AVX512F-32-NEXT: kxorq %k7, %k4, %k4
+; AVX512F-32-NEXT: kshiftlq $63, %k4, %k4
+; AVX512F-32-NEXT: kshiftrq $48, %k4, %k4
+; AVX512F-32-NEXT: kxorq %k3, %k4, %k3
+; AVX512F-32-NEXT: kshiftrq $16, %k3, %k4
+; AVX512F-32-NEXT: kmovd %eax, %k7
+; AVX512F-32-NEXT: kxorq %k7, %k4, %k4
+; AVX512F-32-NEXT: kmovd %edx, %k7
+; AVX512F-32-NEXT: movl %esi, %edx
+; AVX512F-32-NEXT: shrl $24, %edx
; AVX512F-32-NEXT: # kill: def %al killed %al killed %eax def %eax
; AVX512F-32-NEXT: shrb $7, %al
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm2
-; AVX512F-32-NEXT: vpsllq $56, %xmm2, %xmm2
-; AVX512F-32-NEXT: vinserti128 $1, %xmm2, %ymm0, %ymm2
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm3
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm0, %ymm3, %ymm2, %ymm2
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm2 = zmm2[0,1,2,3],zmm3[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm2, %k0
-; AVX512F-32-NEXT: movl %ecx, %eax
-; AVX512F-32-NEXT: shrl $24, %eax
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm2
-; AVX512F-32-NEXT: vpbroadcastq %xmm2, %ymm2
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm3
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm0, %ymm3, %ymm2, %ymm2
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm2 = zmm2[0,1,2,3],zmm3[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm2, %k0
-; AVX512F-32-NEXT: movl %eax, %edx
-; AVX512F-32-NEXT: andb $2, %dl
-; AVX512F-32-NEXT: shrb %dl
-; AVX512F-32-NEXT: kmovd %edx, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm2
-; AVX512F-32-NEXT: vpslldq {{.*#+}} xmm2 = zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm2[0,1,2,3,4,5,6]
-; AVX512F-32-NEXT: vinserti128 $1, %xmm2, %ymm0, %ymm2
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm3
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm0, %ymm3, %ymm2, %ymm2
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm2 = zmm2[0,1,2,3],zmm3[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm2, %k0
-; AVX512F-32-NEXT: movl %eax, %edx
-; AVX512F-32-NEXT: andb $15, %dl
+; AVX512F-32-NEXT: kshiftlq $63, %k4, %k4
+; AVX512F-32-NEXT: kshiftrq $47, %k4, %k4
+; AVX512F-32-NEXT: kxorq %k3, %k4, %k3
+; AVX512F-32-NEXT: kshiftrq $17, %k3, %k4
+; AVX512F-32-NEXT: kxorq %k5, %k4, %k4
+; AVX512F-32-NEXT: kmovd %eax, %k5
; AVX512F-32-NEXT: movl %edx, %eax
-; AVX512F-32-NEXT: shrb $2, %dl
-; AVX512F-32-NEXT: kmovd %edx, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm2
-; AVX512F-32-NEXT: vpbroadcastw %xmm2, %xmm2
-; AVX512F-32-NEXT: vinserti128 $1, %xmm2, %ymm0, %ymm2
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm3
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm0, %ymm3, %ymm2, %ymm2
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm2 = zmm2[0,1,2,3],zmm3[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm2, %k0
-; AVX512F-32-NEXT: shrb $3, %al
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm2
-; AVX512F-32-NEXT: vpslldq {{.*#+}} xmm2 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm2[0,1,2,3,4]
-; AVX512F-32-NEXT: vinserti128 $1, %xmm2, %ymm0, %ymm2
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm4
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm3 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm3, %ymm4, %ymm2, %ymm2
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm2 = zmm2[0,1,2,3],zmm4[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm2, %k0
-; AVX512F-32-NEXT: movl %ecx, %eax
-; AVX512F-32-NEXT: shrl $28, %eax
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm2
-; AVX512F-32-NEXT: vpbroadcastd %xmm2, %xmm2
-; AVX512F-32-NEXT: vinserti128 $1, %xmm2, %ymm0, %ymm2
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm4
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm0, %ymm4, %ymm2, %ymm2
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm2 = zmm2[0,1,2,3],zmm4[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm2, %k0
-; AVX512F-32-NEXT: movl %ecx, %eax
-; AVX512F-32-NEXT: movl %ecx, %esi
-; AVX512F-32-NEXT: shrl $29, %eax
-; AVX512F-32-NEXT: andb $1, %al
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm2
-; AVX512F-32-NEXT: vpslldq {{.*#+}} xmm2 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm2[0,1,2]
-; AVX512F-32-NEXT: vinserti128 $1, %xmm2, %ymm0, %ymm2
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm0
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm1 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm1, %ymm0, %ymm2, %ymm2
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm2[0,1,2,3],zmm0[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
-; AVX512F-32-NEXT: movl %esi, %eax
-; AVX512F-32-NEXT: shrl $30, %eax
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm0
-; AVX512F-32-NEXT: vpbroadcastw %xmm0, %xmm0
-; AVX512F-32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm1
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm0
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255]
-; AVX512F-32-NEXT: vpblendvb %ymm2, %ymm0, %ymm1, %ymm1
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm1[0,1,2,3],zmm0[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
-; AVX512F-32-NEXT: movl %esi, %eax
-; AVX512F-32-NEXT: shrl $31, %eax
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm0
-; AVX512F-32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0]
-; AVX512F-32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm1
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0]
-; AVX512F-32-NEXT: vpblendvb %ymm7, %ymm1, %ymm0, %ymm0
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
-; AVX512F-32-NEXT: movl {{[0-9]+}}(%esp), %ecx
-; AVX512F-32-NEXT: kmovd %ecx, %k1
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm0
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm0, %ymm1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm7
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm4 = [0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm4, %ymm1, %ymm7, %ymm1
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
-; AVX512F-32-NEXT: movl %ecx, %eax
-; AVX512F-32-NEXT: andb $2, %al
-; AVX512F-32-NEXT: shrb %al
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm0
-; AVX512F-32-NEXT: vpsllw $8, %xmm0, %xmm0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm1
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
-; AVX512F-32-NEXT: movl %ecx, %edx
+; AVX512F-32-NEXT: kshiftlq $63, %k4, %k4
+; AVX512F-32-NEXT: kshiftrq $46, %k4, %k4
+; AVX512F-32-NEXT: kxorq %k3, %k4, %k4
+; AVX512F-32-NEXT: kshiftrq $18, %k4, %k3
+; AVX512F-32-NEXT: kxorq %k6, %k3, %k6
+; AVX512F-32-NEXT: kmovd %edx, %k3
+; AVX512F-32-NEXT: # kill: def %dl killed %dl killed %edx def %edx
; AVX512F-32-NEXT: andb $15, %dl
-; AVX512F-32-NEXT: movl %edx, %eax
-; AVX512F-32-NEXT: shrb $2, %dl
-; AVX512F-32-NEXT: kmovd %edx, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm0
-; AVX512F-32-NEXT: vpbroadcastw %xmm0, %xmm0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm1
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
-; AVX512F-32-NEXT: shrb $3, %al
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm0
-; AVX512F-32-NEXT: vpslld $24, %xmm0, %xmm0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm1
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
-; AVX512F-32-NEXT: movl %ecx, %eax
-; AVX512F-32-NEXT: shrb $4, %al
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm0
-; AVX512F-32-NEXT: vpbroadcastd %xmm0, %xmm0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm1
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
-; AVX512F-32-NEXT: movl %ecx, %eax
-; AVX512F-32-NEXT: shrb $5, %al
-; AVX512F-32-NEXT: andb $1, %al
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm0
-; AVX512F-32-NEXT: vpsllq $40, %xmm0, %xmm0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm1
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
-; AVX512F-32-NEXT: movl %ecx, %eax
-; AVX512F-32-NEXT: shrb $6, %al
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm0
-; AVX512F-32-NEXT: vpbroadcastw %xmm0, %xmm0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm1
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
-; AVX512F-32-NEXT: movl %ecx, %eax
-; AVX512F-32-NEXT: shrb $7, %al
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm0
-; AVX512F-32-NEXT: vpsllq $56, %xmm0, %xmm0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm1
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
-; AVX512F-32-NEXT: movb %ch, %al
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm0
-; AVX512F-32-NEXT: vpbroadcastq %xmm0, %xmm0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm1
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
; AVX512F-32-NEXT: andb $2, %al
; AVX512F-32-NEXT: shrb %al
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm0
-; AVX512F-32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2,3,4,5,6]
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm1
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
-; AVX512F-32-NEXT: movb %ch, %dl
-; AVX512F-32-NEXT: andb $15, %dl
-; AVX512F-32-NEXT: movl %edx, %eax
+; AVX512F-32-NEXT: kshiftlq $63, %k6, %k6
+; AVX512F-32-NEXT: kshiftrq $45, %k6, %k6
+; AVX512F-32-NEXT: kxorq %k4, %k6, %k6
+; AVX512F-32-NEXT: kshiftrq $19, %k6, %k4
+; AVX512F-32-NEXT: kxorq %k1, %k4, %k1
+; AVX512F-32-NEXT: kmovd %eax, %k4
+; AVX512F-32-NEXT: movl %edx, %ecx
; AVX512F-32-NEXT: shrb $2, %dl
-; AVX512F-32-NEXT: kmovd %edx, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm0
-; AVX512F-32-NEXT: vpbroadcastw %xmm0, %xmm0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm1
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
-; AVX512F-32-NEXT: shrb $3, %al
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm0
-; AVX512F-32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2,3,4]
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm1
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
-; AVX512F-32-NEXT: movl %ecx, %eax
-; AVX512F-32-NEXT: shrl $12, %eax
-; AVX512F-32-NEXT: andl $15, %eax
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm0
-; AVX512F-32-NEXT: vpbroadcastd %xmm0, %xmm0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm1
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
-; AVX512F-32-NEXT: movl %ecx, %eax
-; AVX512F-32-NEXT: shrl $13, %eax
-; AVX512F-32-NEXT: andb $1, %al
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm0
-; AVX512F-32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2]
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm1
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
-; AVX512F-32-NEXT: movl %ecx, %eax
-; AVX512F-32-NEXT: shrl $14, %eax
-; AVX512F-32-NEXT: andl $3, %eax
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm0
-; AVX512F-32-NEXT: vpbroadcastw %xmm0, %xmm0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm1
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
-; AVX512F-32-NEXT: movl %ecx, %eax
-; AVX512F-32-NEXT: shrl $15, %eax
-; AVX512F-32-NEXT: andl $1, %eax
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm0
-; AVX512F-32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0]
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm1
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
-; AVX512F-32-NEXT: movl %ecx, %ebx
-; AVX512F-32-NEXT: shrl $16, %ebx
-; AVX512F-32-NEXT: kmovd %ebx, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm0
-; AVX512F-32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm1
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
+; AVX512F-32-NEXT: kshiftlq $63, %k1, %k1
+; AVX512F-32-NEXT: kshiftrq $44, %k1, %k1
+; AVX512F-32-NEXT: kxorq %k6, %k1, %k1
+; AVX512F-32-NEXT: kshiftrq $20, %k1, %k6
+; AVX512F-32-NEXT: kxorq %k2, %k6, %k6
+; AVX512F-32-NEXT: kmovd %edx, %k2
+; AVX512F-32-NEXT: movl %ebx, %eax
+; AVX512F-32-NEXT: andb $15, %al
+; AVX512F-32-NEXT: shrb $3, %cl
+; AVX512F-32-NEXT: kshiftlq $63, %k6, %k6
+; AVX512F-32-NEXT: kshiftrq $43, %k6, %k6
+; AVX512F-32-NEXT: kxorq %k1, %k6, %k1
+; AVX512F-32-NEXT: kshiftrq $21, %k1, %k6
+; AVX512F-32-NEXT: kxorq %k0, %k6, %k6
+; AVX512F-32-NEXT: kmovd %ecx, %k0
+; AVX512F-32-NEXT: movl %esi, %ecx
+; AVX512F-32-NEXT: shrl $29, %ecx
+; AVX512F-32-NEXT: andb $1, %cl
+; AVX512F-32-NEXT: kshiftlq $63, %k6, %k6
+; AVX512F-32-NEXT: kshiftrq $42, %k6, %k6
+; AVX512F-32-NEXT: kxorq %k1, %k6, %k6
+; AVX512F-32-NEXT: kshiftrq $22, %k6, %k1
+; AVX512F-32-NEXT: kxorq %k7, %k1, %k7
+; AVX512F-32-NEXT: kmovd %ecx, %k1
; AVX512F-32-NEXT: movl %ebx, %edx
; AVX512F-32-NEXT: andb $2, %dl
; AVX512F-32-NEXT: shrb %dl
-; AVX512F-32-NEXT: kmovd %edx, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm0
-; AVX512F-32-NEXT: vpsllw $8, %xmm0, %xmm0
-; AVX512F-32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm1
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; AVX512F-32-NEXT: movl %ebx, %eax
+; AVX512F-32-NEXT: kshiftlq $63, %k7, %k7
+; AVX512F-32-NEXT: kshiftrq $41, %k7, %k7
+; AVX512F-32-NEXT: kxorq %k6, %k7, %k6
+; AVX512F-32-NEXT: kshiftrq $23, %k6, %k7
+; AVX512F-32-NEXT: kxorq %k5, %k7, %k7
+; AVX512F-32-NEXT: kmovd %edx, %k5
+; AVX512F-32-NEXT: movl %eax, %ecx
+; AVX512F-32-NEXT: shrb $2, %al
+; AVX512F-32-NEXT: kshiftlq $63, %k7, %k7
+; AVX512F-32-NEXT: kshiftrq $40, %k7, %k7
+; AVX512F-32-NEXT: kxorq %k6, %k7, %k7
+; AVX512F-32-NEXT: kshiftrq $24, %k7, %k6
+; AVX512F-32-NEXT: kxorq %k3, %k6, %k3
+; AVX512F-32-NEXT: kmovd %eax, %k6
+; AVX512F-32-NEXT: movb %bh, %al
; AVX512F-32-NEXT: andb $15, %al
-; AVX512F-32-NEXT: movl %eax, %edx
+; AVX512F-32-NEXT: shrb $3, %cl
+; AVX512F-32-NEXT: kshiftlq $63, %k3, %k3
+; AVX512F-32-NEXT: kshiftrq $39, %k3, %k3
+; AVX512F-32-NEXT: kxorq %k7, %k3, %k7
+; AVX512F-32-NEXT: kshiftrq $25, %k7, %k3
+; AVX512F-32-NEXT: kxorq %k4, %k3, %k4
+; AVX512F-32-NEXT: kmovd %ecx, %k3
+; AVX512F-32-NEXT: movl %ebx, %ecx
+; AVX512F-32-NEXT: shrb $4, %cl
+; AVX512F-32-NEXT: kshiftlq $63, %k4, %k4
+; AVX512F-32-NEXT: kshiftrq $38, %k4, %k4
+; AVX512F-32-NEXT: kxorq %k7, %k4, %k7
+; AVX512F-32-NEXT: kshiftrq $26, %k7, %k4
+; AVX512F-32-NEXT: kxorq %k2, %k4, %k2
+; AVX512F-32-NEXT: kmovd %ecx, %k4
+; AVX512F-32-NEXT: movl %ebx, %ecx
+; AVX512F-32-NEXT: shrb $5, %cl
+; AVX512F-32-NEXT: andb $1, %cl
+; AVX512F-32-NEXT: movl %esi, %edx
+; AVX512F-32-NEXT: shrl $28, %edx
+; AVX512F-32-NEXT: kshiftlq $63, %k2, %k2
+; AVX512F-32-NEXT: kshiftrq $37, %k2, %k2
+; AVX512F-32-NEXT: kxorq %k7, %k2, %k2
+; AVX512F-32-NEXT: kshiftrq $27, %k2, %k7
+; AVX512F-32-NEXT: kxorq %k0, %k7, %k0
+; AVX512F-32-NEXT: kshiftlq $63, %k0, %k0
+; AVX512F-32-NEXT: kshiftrq $36, %k0, %k0
+; AVX512F-32-NEXT: kxorq %k2, %k0, %k2
+; AVX512F-32-NEXT: kshiftrq $28, %k2, %k0
+; AVX512F-32-NEXT: kmovd %edx, %k7
+; AVX512F-32-NEXT: kxorq %k7, %k0, %k7
+; AVX512F-32-NEXT: kmovd %ecx, %k0
+; AVX512F-32-NEXT: movl %ebx, %edx
+; AVX512F-32-NEXT: shrb $6, %dl
+; AVX512F-32-NEXT: movl %esi, %ecx
+; AVX512F-32-NEXT: shrl $30, %ecx
+; AVX512F-32-NEXT: kshiftlq $63, %k7, %k7
+; AVX512F-32-NEXT: kshiftrq $35, %k7, %k7
+; AVX512F-32-NEXT: kxorq %k2, %k7, %k2
+; AVX512F-32-NEXT: kshiftrq $29, %k2, %k7
+; AVX512F-32-NEXT: kxorq %k1, %k7, %k1
+; AVX512F-32-NEXT: kmovd %ecx, %k7
+; AVX512F-32-NEXT: movl %esi, %ecx
+; AVX512F-32-NEXT: shrl $31, %ecx
+; AVX512F-32-NEXT: kshiftlq $63, %k1, %k1
+; AVX512F-32-NEXT: kshiftrq $34, %k1, %k1
+; AVX512F-32-NEXT: kxorq %k2, %k1, %k1
+; AVX512F-32-NEXT: kshiftrq $30, %k1, %k2
+; AVX512F-32-NEXT: kxorq %k7, %k2, %k2
+; AVX512F-32-NEXT: kshiftlq $63, %k2, %k2
+; AVX512F-32-NEXT: kshiftrq $33, %k2, %k2
+; AVX512F-32-NEXT: kxorq %k1, %k2, %k1
+; AVX512F-32-NEXT: kshiftrq $31, %k1, %k2
+; AVX512F-32-NEXT: kmovd %ecx, %k7
+; AVX512F-32-NEXT: kxorq %k7, %k2, %k2
+; AVX512F-32-NEXT: kshiftlq $63, %k2, %k2
+; AVX512F-32-NEXT: kshiftrq $32, %k2, %k2
+; AVX512F-32-NEXT: kxorq %k1, %k2, %k1
+; AVX512F-32-NEXT: kshiftrq $32, %k1, %k2
+; AVX512F-32-NEXT: kmovd %ebx, %k7
+; AVX512F-32-NEXT: kxorq %k7, %k2, %k2
+; AVX512F-32-NEXT: kmovd %edx, %k7
+; AVX512F-32-NEXT: movl %ebx, %ecx
+; AVX512F-32-NEXT: shrb $7, %cl
+; AVX512F-32-NEXT: kshiftlq $63, %k2, %k2
+; AVX512F-32-NEXT: kshiftrq $31, %k2, %k2
+; AVX512F-32-NEXT: kxorq %k1, %k2, %k1
+; AVX512F-32-NEXT: kshiftrq $33, %k1, %k2
+; AVX512F-32-NEXT: kxorq %k5, %k2, %k2
+; AVX512F-32-NEXT: kshiftlq $63, %k2, %k2
+; AVX512F-32-NEXT: kshiftrq $30, %k2, %k2
+; AVX512F-32-NEXT: kxorq %k1, %k2, %k2
+; AVX512F-32-NEXT: kshiftrq $34, %k2, %k1
+; AVX512F-32-NEXT: kxorq %k6, %k1, %k5
+; AVX512F-32-NEXT: kmovd %ecx, %k6
+; AVX512F-32-NEXT: movb %bh, %cl
+; AVX512F-32-NEXT: kmovd %ecx, %k1
+; AVX512F-32-NEXT: andb $2, %cl
+; AVX512F-32-NEXT: shrb %cl
+; AVX512F-32-NEXT: kshiftlq $63, %k5, %k5
+; AVX512F-32-NEXT: kshiftrq $29, %k5, %k5
+; AVX512F-32-NEXT: kxorq %k2, %k5, %k5
+; AVX512F-32-NEXT: kshiftrq $35, %k5, %k2
+; AVX512F-32-NEXT: kxorq %k3, %k2, %k3
+; AVX512F-32-NEXT: kmovd %ecx, %k2
+; AVX512F-32-NEXT: movl %eax, %ecx
; AVX512F-32-NEXT: shrb $2, %al
-; AVX512F-32-NEXT: kmovd %eax, %k0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k1
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm0
-; AVX512F-32-NEXT: vpbroadcastw %xmm0, %xmm0
-; AVX512F-32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm1
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
-; AVX512F-32-NEXT: shrb $3, %dl
-; AVX512F-32-NEXT: kmovd %edx, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm0
-; AVX512F-32-NEXT: vpslld $24, %xmm0, %xmm0
-; AVX512F-32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm1
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
-; AVX512F-32-NEXT: movl %ebx, %eax
-; AVX512F-32-NEXT: shrb $4, %al
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm0
-; AVX512F-32-NEXT: vpbroadcastd %xmm0, %xmm0
-; AVX512F-32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm1
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
-; AVX512F-32-NEXT: movl %ebx, %eax
-; AVX512F-32-NEXT: shrb $5, %al
-; AVX512F-32-NEXT: andb $1, %al
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm0
-; AVX512F-32-NEXT: vpsllq $40, %xmm0, %xmm0
-; AVX512F-32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm1
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
+; AVX512F-32-NEXT: kshiftlq $63, %k3, %k3
+; AVX512F-32-NEXT: kshiftrq $28, %k3, %k3
+; AVX512F-32-NEXT: kxorq %k5, %k3, %k5
+; AVX512F-32-NEXT: kshiftrq $36, %k5, %k3
+; AVX512F-32-NEXT: kxorq %k4, %k3, %k4
+; AVX512F-32-NEXT: kmovd %eax, %k3
; AVX512F-32-NEXT: movl %ebx, %eax
-; AVX512F-32-NEXT: shrb $6, %al
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm0
-; AVX512F-32-NEXT: vpbroadcastw %xmm0, %xmm0
-; AVX512F-32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm1
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
-; AVX512F-32-NEXT: # kill: def %bl killed %bl killed %ebx def %ebx
-; AVX512F-32-NEXT: shrb $7, %bl
-; AVX512F-32-NEXT: kmovd %ebx, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm0
-; AVX512F-32-NEXT: vpsllq $56, %xmm0, %xmm0
-; AVX512F-32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm1
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
-; AVX512F-32-NEXT: movl %ecx, %eax
-; AVX512F-32-NEXT: shrl $24, %eax
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm0
-; AVX512F-32-NEXT: vpbroadcastq %xmm0, %ymm0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm1
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
+; AVX512F-32-NEXT: shrl $16, %eax
+; AVX512F-32-NEXT: shrb $3, %cl
+; AVX512F-32-NEXT: kshiftlq $63, %k4, %k4
+; AVX512F-32-NEXT: kshiftrq $27, %k4, %k4
+; AVX512F-32-NEXT: kxorq %k5, %k4, %k5
+; AVX512F-32-NEXT: kshiftrq $37, %k5, %k4
+; AVX512F-32-NEXT: kxorq %k0, %k4, %k0
+; AVX512F-32-NEXT: kmovd %ecx, %k4
+; AVX512F-32-NEXT: movl %ebx, %ecx
+; AVX512F-32-NEXT: shrl $13, %ecx
+; AVX512F-32-NEXT: andb $1, %cl
+; AVX512F-32-NEXT: kshiftlq $63, %k0, %k0
+; AVX512F-32-NEXT: kshiftrq $26, %k0, %k0
+; AVX512F-32-NEXT: kxorq %k5, %k0, %k0
+; AVX512F-32-NEXT: kshiftrq $38, %k0, %k5
+; AVX512F-32-NEXT: kxorq %k7, %k5, %k7
+; AVX512F-32-NEXT: kmovd %ecx, %k5
; AVX512F-32-NEXT: movl %eax, %edx
; AVX512F-32-NEXT: andb $2, %dl
; AVX512F-32-NEXT: shrb %dl
+; AVX512F-32-NEXT: kshiftlq $63, %k7, %k7
+; AVX512F-32-NEXT: kshiftrq $25, %k7, %k7
+; AVX512F-32-NEXT: kxorq %k0, %k7, %k7
+; AVX512F-32-NEXT: kshiftrq $39, %k7, %k0
+; AVX512F-32-NEXT: kxorq %k6, %k0, %k6
+; AVX512F-32-NEXT: kmovd %edx, %k0
+; AVX512F-32-NEXT: kmovq %k0, {{[0-9]+}}(%esp) # 8-byte Spill
+; AVX512F-32-NEXT: movl %eax, %ecx
+; AVX512F-32-NEXT: andb $15, %cl
+; AVX512F-32-NEXT: movl %ecx, %edx
+; AVX512F-32-NEXT: shrb $2, %cl
+; AVX512F-32-NEXT: kshiftlq $63, %k6, %k6
+; AVX512F-32-NEXT: kshiftrq $24, %k6, %k6
+; AVX512F-32-NEXT: kxorq %k7, %k6, %k6
+; AVX512F-32-NEXT: kshiftrq $40, %k6, %k7
+; AVX512F-32-NEXT: kxorq %k1, %k7, %k7
+; AVX512F-32-NEXT: kmovd %ecx, %k1
+; AVX512F-32-NEXT: movl %ebx, %ecx
+; AVX512F-32-NEXT: shrl $12, %ecx
+; AVX512F-32-NEXT: andl $15, %ecx
+; AVX512F-32-NEXT: kshiftlq $63, %k7, %k7
+; AVX512F-32-NEXT: kshiftrq $23, %k7, %k7
+; AVX512F-32-NEXT: kxorq %k6, %k7, %k6
+; AVX512F-32-NEXT: kshiftrq $41, %k6, %k7
+; AVX512F-32-NEXT: kxorq %k2, %k7, %k2
+; AVX512F-32-NEXT: kmovd %ecx, %k0
+; AVX512F-32-NEXT: movl %ebx, %ecx
+; AVX512F-32-NEXT: shrl $14, %ecx
+; AVX512F-32-NEXT: andl $3, %ecx
+; AVX512F-32-NEXT: kshiftlq $63, %k2, %k2
+; AVX512F-32-NEXT: kshiftrq $22, %k2, %k2
+; AVX512F-32-NEXT: kxorq %k6, %k2, %k2
+; AVX512F-32-NEXT: kshiftrq $42, %k2, %k6
+; AVX512F-32-NEXT: kxorq %k3, %k6, %k3
+; AVX512F-32-NEXT: kmovd %ecx, %k7
+; AVX512F-32-NEXT: movl %ebx, %ecx
+; AVX512F-32-NEXT: shrl $15, %ecx
+; AVX512F-32-NEXT: andl $1, %ecx
+; AVX512F-32-NEXT: kshiftlq $63, %k3, %k3
+; AVX512F-32-NEXT: kshiftrq $21, %k3, %k3
+; AVX512F-32-NEXT: kxorq %k2, %k3, %k2
+; AVX512F-32-NEXT: kshiftrq $43, %k2, %k3
+; AVX512F-32-NEXT: kxorq %k4, %k3, %k3
+; AVX512F-32-NEXT: kmovd %ecx, %k6
+; AVX512F-32-NEXT: shrb $3, %dl
+; AVX512F-32-NEXT: kshiftlq $63, %k3, %k3
+; AVX512F-32-NEXT: kshiftrq $20, %k3, %k3
+; AVX512F-32-NEXT: kxorq %k2, %k3, %k3
+; AVX512F-32-NEXT: kshiftrq $44, %k3, %k2
+; AVX512F-32-NEXT: kxorq %k0, %k2, %k0
+; AVX512F-32-NEXT: kmovd %edx, %k2
+; AVX512F-32-NEXT: movl %eax, %ecx
+; AVX512F-32-NEXT: shrb $4, %cl
+; AVX512F-32-NEXT: kshiftlq $63, %k0, %k0
+; AVX512F-32-NEXT: kshiftrq $19, %k0, %k0
+; AVX512F-32-NEXT: kxorq %k3, %k0, %k0
+; AVX512F-32-NEXT: kshiftrq $45, %k0, %k3
+; AVX512F-32-NEXT: kxorq %k5, %k3, %k4
+; AVX512F-32-NEXT: kmovd %ecx, %k3
+; AVX512F-32-NEXT: movl %eax, %ecx
+; AVX512F-32-NEXT: shrb $5, %cl
+; AVX512F-32-NEXT: andb $1, %cl
+; AVX512F-32-NEXT: kshiftlq $63, %k4, %k4
+; AVX512F-32-NEXT: kshiftrq $18, %k4, %k4
+; AVX512F-32-NEXT: kxorq %k0, %k4, %k0
+; AVX512F-32-NEXT: kshiftrq $46, %k0, %k4
+; AVX512F-32-NEXT: kxorq %k7, %k4, %k5
+; AVX512F-32-NEXT: kmovd %ecx, %k4
+; AVX512F-32-NEXT: movl %eax, %ecx
+; AVX512F-32-NEXT: shrb $6, %cl
+; AVX512F-32-NEXT: kshiftlq $63, %k5, %k5
+; AVX512F-32-NEXT: kshiftrq $17, %k5, %k5
+; AVX512F-32-NEXT: kxorq %k0, %k5, %k0
+; AVX512F-32-NEXT: kshiftrq $47, %k0, %k5
+; AVX512F-32-NEXT: kxorq %k6, %k5, %k5
+; AVX512F-32-NEXT: kshiftlq $63, %k5, %k5
+; AVX512F-32-NEXT: kshiftrq $16, %k5, %k5
+; AVX512F-32-NEXT: kxorq %k0, %k5, %k0
+; AVX512F-32-NEXT: kshiftrq $48, %k0, %k5
+; AVX512F-32-NEXT: kmovd %eax, %k6
+; AVX512F-32-NEXT: kxorq %k6, %k5, %k6
+; AVX512F-32-NEXT: kmovd %ecx, %k5
+; AVX512F-32-NEXT: movl %ebx, %edx
+; AVX512F-32-NEXT: shrl $24, %edx
+; AVX512F-32-NEXT: # kill: def %al killed %al killed %eax def %eax
+; AVX512F-32-NEXT: shrb $7, %al
+; AVX512F-32-NEXT: kshiftlq $63, %k6, %k6
+; AVX512F-32-NEXT: kshiftrq $15, %k6, %k6
+; AVX512F-32-NEXT: kxorq %k0, %k6, %k6
+; AVX512F-32-NEXT: kshiftrq $49, %k6, %k0
+; AVX512F-32-NEXT: kmovq {{[0-9]+}}(%esp), %k7 # 8-byte Reload
+; AVX512F-32-NEXT: kxorq %k7, %k0, %k7
+; AVX512F-32-NEXT: kmovd %eax, %k0
+; AVX512F-32-NEXT: movl %edx, %eax
+; AVX512F-32-NEXT: kshiftlq $63, %k7, %k7
+; AVX512F-32-NEXT: kshiftrq $14, %k7, %k7
+; AVX512F-32-NEXT: kxorq %k6, %k7, %k6
+; AVX512F-32-NEXT: kshiftrq $50, %k6, %k7
+; AVX512F-32-NEXT: kxorq %k1, %k7, %k7
; AVX512F-32-NEXT: kmovd %edx, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm0
-; AVX512F-32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2,3,4,5,6]
-; AVX512F-32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm1
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; AVX512F-32-NEXT: movl %eax, %edx
+; AVX512F-32-NEXT: # kill: def %dl killed %dl killed %edx def %edx
; AVX512F-32-NEXT: andb $15, %dl
+; AVX512F-32-NEXT: andb $2, %al
+; AVX512F-32-NEXT: shrb %al
+; AVX512F-32-NEXT: kshiftlq $63, %k7, %k7
+; AVX512F-32-NEXT: kshiftrq $13, %k7, %k7
+; AVX512F-32-NEXT: kxorq %k6, %k7, %k6
+; AVX512F-32-NEXT: kshiftrq $51, %k6, %k7
+; AVX512F-32-NEXT: kxorq %k2, %k7, %k7
+; AVX512F-32-NEXT: kmovd %eax, %k2
; AVX512F-32-NEXT: movl %edx, %eax
; AVX512F-32-NEXT: shrb $2, %dl
-; AVX512F-32-NEXT: kmovd %edx, %k0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k1
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm0
-; AVX512F-32-NEXT: vpbroadcastw %xmm0, %xmm0
-; AVX512F-32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm1
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
+; AVX512F-32-NEXT: kshiftlq $63, %k7, %k7
+; AVX512F-32-NEXT: kshiftrq $12, %k7, %k7
+; AVX512F-32-NEXT: kxorq %k6, %k7, %k6
+; AVX512F-32-NEXT: kshiftrq $52, %k6, %k7
+; AVX512F-32-NEXT: kxorq %k3, %k7, %k7
+; AVX512F-32-NEXT: kmovd %edx, %k3
; AVX512F-32-NEXT: shrb $3, %al
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm0
-; AVX512F-32-NEXT: kmovd %eax, %k0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm1
-; AVX512F-32-NEXT: vpslldq {{.*#+}} xmm1 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm1[0,1,2,3,4]
-; AVX512F-32-NEXT: vinserti128 $1, %xmm1, %ymm0, %ymm1
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm0, %ymm4
-; AVX512F-32-NEXT: vpblendvb %ymm3, %ymm4, %ymm1, %ymm1
-; AVX512F-32-NEXT: movl %ecx, %eax
+; AVX512F-32-NEXT: kshiftlq $63, %k7, %k7
+; AVX512F-32-NEXT: kshiftrq $11, %k7, %k7
+; AVX512F-32-NEXT: kxorq %k6, %k7, %k6
+; AVX512F-32-NEXT: kshiftrq $53, %k6, %k7
+; AVX512F-32-NEXT: kxorq %k4, %k7, %k7
+; AVX512F-32-NEXT: kmovd %eax, %k4
+; AVX512F-32-NEXT: movl %ebx, %eax
; AVX512F-32-NEXT: shrl $29, %eax
; AVX512F-32-NEXT: andb $1, %al
-; AVX512F-32-NEXT: kmovd %eax, %k0
-; AVX512F-32-NEXT: movl %ecx, %eax
+; AVX512F-32-NEXT: kshiftlq $63, %k7, %k7
+; AVX512F-32-NEXT: kshiftrq $10, %k7, %k7
+; AVX512F-32-NEXT: kxorq %k6, %k7, %k6
+; AVX512F-32-NEXT: kshiftrq $54, %k6, %k7
+; AVX512F-32-NEXT: kxorq %k5, %k7, %k7
+; AVX512F-32-NEXT: kmovd %eax, %k5
+; AVX512F-32-NEXT: kshiftlq $63, %k7, %k7
+; AVX512F-32-NEXT: kshiftrq $9, %k7, %k7
+; AVX512F-32-NEXT: kxorq %k6, %k7, %k6
+; AVX512F-32-NEXT: kshiftrq $55, %k6, %k7
+; AVX512F-32-NEXT: kxorq %k0, %k7, %k0
+; AVX512F-32-NEXT: kshiftlq $63, %k0, %k0
+; AVX512F-32-NEXT: kshiftrq $8, %k0, %k0
+; AVX512F-32-NEXT: kxorq %k6, %k0, %k0
+; AVX512F-32-NEXT: kshiftrq $56, %k0, %k6
+; AVX512F-32-NEXT: kxorq %k1, %k6, %k1
+; AVX512F-32-NEXT: kshiftlq $63, %k1, %k1
+; AVX512F-32-NEXT: kshiftrq $7, %k1, %k1
+; AVX512F-32-NEXT: kxorq %k0, %k1, %k0
+; AVX512F-32-NEXT: kshiftrq $57, %k0, %k1
+; AVX512F-32-NEXT: kxorq %k2, %k1, %k1
+; AVX512F-32-NEXT: kshiftlq $63, %k1, %k1
+; AVX512F-32-NEXT: kshiftrq $6, %k1, %k1
+; AVX512F-32-NEXT: kxorq %k0, %k1, %k0
+; AVX512F-32-NEXT: kshiftrq $58, %k0, %k1
+; AVX512F-32-NEXT: kxorq %k3, %k1, %k1
+; AVX512F-32-NEXT: movl %ebx, %eax
; AVX512F-32-NEXT: shrl $28, %eax
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm0
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm0, %ymm1
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm3
-; AVX512F-32-NEXT: vpbroadcastd %xmm3, %xmm3
-; AVX512F-32-NEXT: vinserti128 $1, %xmm3, %ymm0, %ymm3
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm4 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm4, %ymm1, %ymm3, %ymm1
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm0
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm0, %ymm1
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm3
-; AVX512F-32-NEXT: vpslldq {{.*#+}} xmm3 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm3[0,1,2]
-; AVX512F-32-NEXT: vinserti128 $1, %xmm3, %ymm0, %ymm3
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm4 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm4, %ymm1, %ymm3, %ymm1
-; AVX512F-32-NEXT: movl %ecx, %eax
-; AVX512F-32-NEXT: shrl $30, %eax
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm0
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm0, %ymm1
-; AVX512F-32-NEXT: kmovd %eax, %k0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm3
-; AVX512F-32-NEXT: vpbroadcastw %xmm3, %xmm3
-; AVX512F-32-NEXT: vinserti128 $1, %xmm3, %ymm0, %ymm3
-; AVX512F-32-NEXT: vpblendvb %ymm2, %ymm1, %ymm3, %ymm1
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
-; AVX512F-32-NEXT: movl %ecx, %eax
+; AVX512F-32-NEXT: kshiftlq $63, %k1, %k1
+; AVX512F-32-NEXT: kshiftrq $5, %k1, %k1
+; AVX512F-32-NEXT: kxorq %k0, %k1, %k0
+; AVX512F-32-NEXT: kshiftrq $59, %k0, %k1
+; AVX512F-32-NEXT: kxorq %k4, %k1, %k1
+; AVX512F-32-NEXT: kshiftlq $63, %k1, %k1
+; AVX512F-32-NEXT: kshiftrq $4, %k1, %k1
+; AVX512F-32-NEXT: kxorq %k0, %k1, %k0
+; AVX512F-32-NEXT: kshiftrq $60, %k0, %k1
+; AVX512F-32-NEXT: kmovd %eax, %k2
+; AVX512F-32-NEXT: kxorq %k2, %k1, %k1
+; AVX512F-32-NEXT: movl %ebx, %eax
; AVX512F-32-NEXT: shrl $31, %eax
+; AVX512F-32-NEXT: movl %ebx, %ecx
+; AVX512F-32-NEXT: shrl $30, %ecx
+; AVX512F-32-NEXT: kshiftlq $63, %k1, %k1
+; AVX512F-32-NEXT: kshiftrq $3, %k1, %k1
+; AVX512F-32-NEXT: kxorq %k0, %k1, %k0
+; AVX512F-32-NEXT: kshiftrq $61, %k0, %k1
+; AVX512F-32-NEXT: kxorq %k5, %k1, %k1
+; AVX512F-32-NEXT: kshiftlq $63, %k1, %k1
+; AVX512F-32-NEXT: kshiftrq $2, %k1, %k1
+; AVX512F-32-NEXT: kxorq %k0, %k1, %k0
+; AVX512F-32-NEXT: kshiftrq $62, %k0, %k1
+; AVX512F-32-NEXT: kmovd %ecx, %k2
+; AVX512F-32-NEXT: kxorq %k2, %k1, %k1
+; AVX512F-32-NEXT: kshiftlq $63, %k1, %k1
+; AVX512F-32-NEXT: kshiftrq $1, %k1, %k1
+; AVX512F-32-NEXT: kxorq %k0, %k1, %k0
; AVX512F-32-NEXT: kshiftlq $1, %k0, %k0
; AVX512F-32-NEXT: kshiftrq $1, %k0, %k0
; AVX512F-32-NEXT: kmovd %eax, %k1
; AVX512F-32-NEXT: kshiftlq $63, %k1, %k1
; AVX512F-32-NEXT: korq %k1, %k0, %k1
-; AVX512F-32-NEXT: vpcmpeqb %zmm6, %zmm5, %k0 {%k1}
-; AVX512F-32-NEXT: vpcmpgtb %zmm5, %zmm6, %k2 {%k1}
-; AVX512F-32-NEXT: vpcmpleb %zmm6, %zmm5, %k3 {%k1}
-; AVX512F-32-NEXT: vpcmpneqb %zmm6, %zmm5, %k4 {%k1}
-; AVX512F-32-NEXT: vpcmpleb %zmm5, %zmm6, %k5 {%k1}
-; AVX512F-32-NEXT: vpcmpgtb %zmm6, %zmm5, %k1 {%k1}
+; AVX512F-32-NEXT: vpcmpeqb %zmm1, %zmm0, %k0 {%k1}
; AVX512F-32-NEXT: kmovq %k0, (%esp)
; AVX512F-32-NEXT: movl (%esp), %eax
; AVX512F-32-NEXT: movl {{[0-9]+}}(%esp), %edx
-; AVX512F-32-NEXT: kmovq %k2, {{[0-9]+}}(%esp)
+; AVX512F-32-NEXT: vpcmpgtb %zmm0, %zmm1, %k0 {%k1}
+; AVX512F-32-NEXT: kmovq %k0, {{[0-9]+}}(%esp)
; AVX512F-32-NEXT: addl {{[0-9]+}}(%esp), %eax
; AVX512F-32-NEXT: adcl {{[0-9]+}}(%esp), %edx
-; AVX512F-32-NEXT: kmovq %k3, {{[0-9]+}}(%esp)
+; AVX512F-32-NEXT: vpcmpleb %zmm1, %zmm0, %k0 {%k1}
+; AVX512F-32-NEXT: kmovq %k0, {{[0-9]+}}(%esp)
; AVX512F-32-NEXT: addl {{[0-9]+}}(%esp), %eax
; AVX512F-32-NEXT: adcl {{[0-9]+}}(%esp), %edx
; AVX512F-32-NEXT: kxorq %k0, %k0, %k0
; AVX512F-32-NEXT: kmovq %k0, {{[0-9]+}}(%esp)
; AVX512F-32-NEXT: orl {{[0-9]+}}(%esp), %edx
; AVX512F-32-NEXT: orl {{[0-9]+}}(%esp), %eax
-; AVX512F-32-NEXT: kmovq %k4, {{[0-9]+}}(%esp)
+; AVX512F-32-NEXT: vpcmpneqb %zmm1, %zmm0, %k0 {%k1}
+; AVX512F-32-NEXT: kmovq %k0, {{[0-9]+}}(%esp)
; AVX512F-32-NEXT: addl {{[0-9]+}}(%esp), %eax
; AVX512F-32-NEXT: adcl {{[0-9]+}}(%esp), %edx
-; AVX512F-32-NEXT: kmovq %k5, {{[0-9]+}}(%esp)
+; AVX512F-32-NEXT: vpcmpleb %zmm0, %zmm1, %k0 {%k1}
+; AVX512F-32-NEXT: kmovq %k0, {{[0-9]+}}(%esp)
; AVX512F-32-NEXT: addl {{[0-9]+}}(%esp), %eax
; AVX512F-32-NEXT: adcl {{[0-9]+}}(%esp), %edx
-; AVX512F-32-NEXT: kmovq %k1, {{[0-9]+}}(%esp)
+; AVX512F-32-NEXT: vpcmpgtb %zmm1, %zmm0, %k0 {%k1}
+; AVX512F-32-NEXT: kmovq %k0, {{[0-9]+}}(%esp)
; AVX512F-32-NEXT: addl {{[0-9]+}}(%esp), %eax
; AVX512F-32-NEXT: adcl {{[0-9]+}}(%esp), %edx
; AVX512F-32-NEXT: addl %esi, %eax
-; AVX512F-32-NEXT: adcl %ecx, %edx
-; AVX512F-32-NEXT: addl $60, %esp
+; AVX512F-32-NEXT: adcl %ebx, %edx
+; AVX512F-32-NEXT: addl $68, %esp
; AVX512F-32-NEXT: popl %esi
; AVX512F-32-NEXT: popl %ebx
; AVX512F-32-NEXT: vzeroupper
; AVX512F-32-NEXT: .cfi_def_cfa_offset 8
; AVX512F-32-NEXT: pushl %esi
; AVX512F-32-NEXT: .cfi_def_cfa_offset 12
-; AVX512F-32-NEXT: subl $60, %esp
-; AVX512F-32-NEXT: .cfi_def_cfa_offset 72
+; AVX512F-32-NEXT: subl $68, %esp
+; AVX512F-32-NEXT: .cfi_def_cfa_offset 80
; AVX512F-32-NEXT: .cfi_offset %esi, -12
; AVX512F-32-NEXT: .cfi_offset %ebx, -8
-; AVX512F-32-NEXT: vmovdqa64 %zmm1, %zmm6
-; AVX512F-32-NEXT: vmovdqa64 %zmm0, %zmm5
-; AVX512F-32-NEXT: movl {{[0-9]+}}(%esp), %ecx
-; AVX512F-32-NEXT: movl %ecx, %eax
-; AVX512F-32-NEXT: shrb $5, %al
-; AVX512F-32-NEXT: andb $1, %al
-; AVX512F-32-NEXT: movl %ecx, %ebx
-; AVX512F-32-NEXT: andb $15, %bl
-; AVX512F-32-NEXT: movl %ecx, %edx
-; AVX512F-32-NEXT: andb $2, %dl
-; AVX512F-32-NEXT: shrb %dl
-; AVX512F-32-NEXT: kmovd %edx, %k0
+; AVX512F-32-NEXT: movl {{[0-9]+}}(%esp), %ebx
+; AVX512F-32-NEXT: movl %ebx, %eax
+; AVX512F-32-NEXT: shrl $16, %eax
; AVX512F-32-NEXT: movl %ebx, %edx
-; AVX512F-32-NEXT: shrb $2, %bl
-; AVX512F-32-NEXT: kmovd %ebx, %k1
-; AVX512F-32-NEXT: movl %ecx, %ebx
-; AVX512F-32-NEXT: shrb $4, %bl
-; AVX512F-32-NEXT: shrb $3, %dl
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm2
-; AVX512F-32-NEXT: vpsllw $8, %xmm2, %xmm2
-; AVX512F-32-NEXT: kmovd %ecx, %k0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm3
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm0, %ymm3, %ymm2, %ymm2
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm2 = zmm2[0,1,2,3],zmm3[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm2, %k0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm2
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm3
-; AVX512F-32-NEXT: vpbroadcastw %xmm3, %xmm3
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm0, %ymm2, %ymm3, %ymm3
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm2 = zmm3[0,1,2,3],zmm2[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm2, %k0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm2
-; AVX512F-32-NEXT: kmovd %edx, %k0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm3
-; AVX512F-32-NEXT: vpslld $24, %xmm3, %xmm3
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm0, %ymm2, %ymm3, %ymm3
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm2 = zmm3[0,1,2,3],zmm2[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm2, %k0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm2
-; AVX512F-32-NEXT: kmovd %ebx, %k0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm3
-; AVX512F-32-NEXT: vpbroadcastd %xmm3, %xmm3
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm0, %ymm2, %ymm3, %ymm3
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm2 = zmm3[0,1,2,3],zmm2[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm2, %k0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm2
-; AVX512F-32-NEXT: kmovd %eax, %k0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm3
-; AVX512F-32-NEXT: vpsllq $40, %xmm3, %xmm3
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm0, %ymm2, %ymm3, %ymm3
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm2 = zmm3[0,1,2,3],zmm2[4,5,6,7]
-; AVX512F-32-NEXT: movl %ecx, %eax
-; AVX512F-32-NEXT: shrb $6, %al
-; AVX512F-32-NEXT: vpmovb2m %zmm2, %k0
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm2
-; AVX512F-32-NEXT: vpbroadcastw %xmm2, %xmm2
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm3
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm0, %ymm3, %ymm2, %ymm2
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm2 = zmm2[0,1,2,3],zmm3[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm2, %k0
-; AVX512F-32-NEXT: movl %ecx, %eax
-; AVX512F-32-NEXT: shrb $7, %al
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm2
-; AVX512F-32-NEXT: vpsllq $56, %xmm2, %xmm2
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm3
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm0, %ymm3, %ymm2, %ymm2
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm2 = zmm2[0,1,2,3],zmm3[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm2, %k0
-; AVX512F-32-NEXT: movb %ch, %al
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm2
-; AVX512F-32-NEXT: vpbroadcastq %xmm2, %xmm2
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm3
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm0, %ymm3, %ymm2, %ymm2
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm2 = zmm2[0,1,2,3],zmm3[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm2, %k0
-; AVX512F-32-NEXT: andb $2, %al
-; AVX512F-32-NEXT: shrb %al
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm2
-; AVX512F-32-NEXT: vpslldq {{.*#+}} xmm2 = zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm2[0,1,2,3,4,5,6]
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm3
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm0, %ymm3, %ymm2, %ymm2
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm2 = zmm2[0,1,2,3],zmm3[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm2, %k0
-; AVX512F-32-NEXT: movb %ch, %dl
; AVX512F-32-NEXT: andb $15, %dl
-; AVX512F-32-NEXT: movl %edx, %eax
+; AVX512F-32-NEXT: movl %ebx, %ecx
+; AVX512F-32-NEXT: andb $2, %cl
+; AVX512F-32-NEXT: shrb %cl
+; AVX512F-32-NEXT: kmovd %ecx, %k1
+; AVX512F-32-NEXT: movl %edx, %ecx
; AVX512F-32-NEXT: shrb $2, %dl
-; AVX512F-32-NEXT: kmovd %edx, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm2
-; AVX512F-32-NEXT: vpbroadcastw %xmm2, %xmm2
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm3
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm0, %ymm3, %ymm2, %ymm2
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm2 = zmm2[0,1,2,3],zmm3[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm2, %k0
-; AVX512F-32-NEXT: shrb $3, %al
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm2
-; AVX512F-32-NEXT: vpslldq {{.*#+}} xmm2 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm2[0,1,2,3,4]
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm3
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm0, %ymm3, %ymm2, %ymm2
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm2 = zmm2[0,1,2,3],zmm3[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm2, %k0
-; AVX512F-32-NEXT: movl %ecx, %eax
-; AVX512F-32-NEXT: shrl $12, %eax
-; AVX512F-32-NEXT: andl $15, %eax
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm2
-; AVX512F-32-NEXT: vpbroadcastd %xmm2, %xmm2
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm3
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm0, %ymm3, %ymm2, %ymm2
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm2 = zmm2[0,1,2,3],zmm3[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm2, %k0
-; AVX512F-32-NEXT: movl %ecx, %eax
-; AVX512F-32-NEXT: shrl $13, %eax
-; AVX512F-32-NEXT: andb $1, %al
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm2
-; AVX512F-32-NEXT: vpslldq {{.*#+}} xmm2 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm2[0,1,2]
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm3
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm0, %ymm3, %ymm2, %ymm2
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm2 = zmm2[0,1,2,3],zmm3[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm2, %k0
-; AVX512F-32-NEXT: movl %ecx, %eax
-; AVX512F-32-NEXT: shrl $14, %eax
-; AVX512F-32-NEXT: andl $3, %eax
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm2
-; AVX512F-32-NEXT: vpbroadcastw %xmm2, %xmm2
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm3
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm0, %ymm3, %ymm2, %ymm2
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm2 = zmm2[0,1,2,3],zmm3[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm2, %k0
-; AVX512F-32-NEXT: movl %ecx, %eax
-; AVX512F-32-NEXT: shrl $15, %eax
-; AVX512F-32-NEXT: andl $1, %eax
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm2
-; AVX512F-32-NEXT: vpslldq {{.*#+}} xmm2 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm2[0]
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm3
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm0, %ymm3, %ymm2, %ymm2
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm2 = zmm2[0,1,2,3],zmm3[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm2, %k0
-; AVX512F-32-NEXT: movl %ecx, %eax
-; AVX512F-32-NEXT: shrl $16, %eax
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm2
-; AVX512F-32-NEXT: vinserti128 $1, %xmm2, %ymm0, %ymm2
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm3
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm0, %ymm3, %ymm2, %ymm2
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm2 = zmm2[0,1,2,3],zmm3[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm2, %k0
+; AVX512F-32-NEXT: kmovd %edx, %k2
+; AVX512F-32-NEXT: movb %bh, %dl
+; AVX512F-32-NEXT: andb $15, %dl
+; AVX512F-32-NEXT: shrb $3, %cl
+; AVX512F-32-NEXT: kmovd %ecx, %k0
+; AVX512F-32-NEXT: movl %ebx, %ecx
+; AVX512F-32-NEXT: shrb $4, %cl
+; AVX512F-32-NEXT: kmovd %ecx, %k3
+; AVX512F-32-NEXT: movl %ebx, %ecx
+; AVX512F-32-NEXT: shrb $5, %cl
+; AVX512F-32-NEXT: andb $1, %cl
+; AVX512F-32-NEXT: kmovd %ecx, %k4
+; AVX512F-32-NEXT: movl %ebx, %ecx
+; AVX512F-32-NEXT: shrb $6, %cl
+; AVX512F-32-NEXT: kmovd %ecx, %k6
+; AVX512F-32-NEXT: movl %ebx, %ecx
+; AVX512F-32-NEXT: shrb $7, %cl
+; AVX512F-32-NEXT: kmovd %ebx, %k5
+; AVX512F-32-NEXT: kshiftrq $1, %k5, %k7
+; AVX512F-32-NEXT: kxorq %k1, %k7, %k1
+; AVX512F-32-NEXT: kshiftlq $63, %k1, %k1
+; AVX512F-32-NEXT: kshiftrq $62, %k1, %k1
+; AVX512F-32-NEXT: kxorq %k5, %k1, %k7
+; AVX512F-32-NEXT: kshiftrq $2, %k7, %k1
+; AVX512F-32-NEXT: kxorq %k2, %k1, %k2
+; AVX512F-32-NEXT: kmovd %ecx, %k5
+; AVX512F-32-NEXT: movb %bh, %cl
+; AVX512F-32-NEXT: kmovd %ecx, %k1
+; AVX512F-32-NEXT: movl %ebx, %esi
+; AVX512F-32-NEXT: andb $2, %cl
+; AVX512F-32-NEXT: shrb %cl
+; AVX512F-32-NEXT: kshiftlq $63, %k2, %k2
+; AVX512F-32-NEXT: kshiftrq $61, %k2, %k2
+; AVX512F-32-NEXT: kxorq %k7, %k2, %k7
+; AVX512F-32-NEXT: kshiftrq $3, %k7, %k2
+; AVX512F-32-NEXT: kxorq %k0, %k2, %k0
+; AVX512F-32-NEXT: kmovd %ecx, %k2
+; AVX512F-32-NEXT: movl %edx, %ecx
+; AVX512F-32-NEXT: shrb $2, %dl
+; AVX512F-32-NEXT: kshiftlq $63, %k0, %k0
+; AVX512F-32-NEXT: kshiftrq $60, %k0, %k0
+; AVX512F-32-NEXT: kxorq %k7, %k0, %k0
+; AVX512F-32-NEXT: kshiftrq $4, %k0, %k7
+; AVX512F-32-NEXT: kxorq %k3, %k7, %k7
+; AVX512F-32-NEXT: kmovd %edx, %k3
; AVX512F-32-NEXT: movl %eax, %edx
-; AVX512F-32-NEXT: andb $2, %dl
-; AVX512F-32-NEXT: shrb %dl
-; AVX512F-32-NEXT: kmovd %edx, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm2
-; AVX512F-32-NEXT: vpsllw $8, %xmm2, %xmm2
-; AVX512F-32-NEXT: vinserti128 $1, %xmm2, %ymm0, %ymm2
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm3
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm0, %ymm3, %ymm2, %ymm2
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm2 = zmm2[0,1,2,3],zmm3[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm2, %k0
+; AVX512F-32-NEXT: andb $15, %dl
+; AVX512F-32-NEXT: shrb $3, %cl
+; AVX512F-32-NEXT: kshiftlq $63, %k7, %k7
+; AVX512F-32-NEXT: kshiftrq $59, %k7, %k7
+; AVX512F-32-NEXT: kxorq %k0, %k7, %k7
+; AVX512F-32-NEXT: kshiftrq $5, %k7, %k0
+; AVX512F-32-NEXT: kxorq %k4, %k0, %k4
+; AVX512F-32-NEXT: kmovd %ecx, %k0
+; AVX512F-32-NEXT: movl %esi, %ecx
+; AVX512F-32-NEXT: shrl $13, %ecx
+; AVX512F-32-NEXT: andb $1, %cl
+; AVX512F-32-NEXT: kshiftlq $63, %k4, %k4
+; AVX512F-32-NEXT: kshiftrq $58, %k4, %k4
+; AVX512F-32-NEXT: kxorq %k7, %k4, %k7
+; AVX512F-32-NEXT: kshiftrq $6, %k7, %k4
+; AVX512F-32-NEXT: kxorq %k6, %k4, %k6
+; AVX512F-32-NEXT: kmovd %ecx, %k4
; AVX512F-32-NEXT: movl %eax, %ebx
-; AVX512F-32-NEXT: andb $15, %bl
-; AVX512F-32-NEXT: movl %ebx, %edx
-; AVX512F-32-NEXT: shrb $2, %bl
-; AVX512F-32-NEXT: kmovd %ebx, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm2
-; AVX512F-32-NEXT: vpbroadcastw %xmm2, %xmm2
-; AVX512F-32-NEXT: vinserti128 $1, %xmm2, %ymm0, %ymm2
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm3
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm0, %ymm3, %ymm2, %ymm2
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm2 = zmm2[0,1,2,3],zmm3[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm2, %k0
-; AVX512F-32-NEXT: shrb $3, %dl
-; AVX512F-32-NEXT: kmovd %edx, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm2
-; AVX512F-32-NEXT: vpslld $24, %xmm2, %xmm2
-; AVX512F-32-NEXT: vinserti128 $1, %xmm2, %ymm0, %ymm2
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm3
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm0, %ymm3, %ymm2, %ymm2
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm2 = zmm2[0,1,2,3],zmm3[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm2, %k0
-; AVX512F-32-NEXT: movl %eax, %edx
-; AVX512F-32-NEXT: shrb $4, %dl
-; AVX512F-32-NEXT: kmovd %edx, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm2
-; AVX512F-32-NEXT: vpbroadcastd %xmm2, %xmm2
-; AVX512F-32-NEXT: vinserti128 $1, %xmm2, %ymm0, %ymm2
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm3
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm0, %ymm3, %ymm2, %ymm2
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm2 = zmm2[0,1,2,3],zmm3[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm2, %k0
-; AVX512F-32-NEXT: movl %eax, %edx
-; AVX512F-32-NEXT: shrb $5, %dl
-; AVX512F-32-NEXT: andb $1, %dl
-; AVX512F-32-NEXT: kmovd %edx, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm2
-; AVX512F-32-NEXT: vpsllq $40, %xmm2, %xmm2
-; AVX512F-32-NEXT: vinserti128 $1, %xmm2, %ymm0, %ymm2
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm3
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm0, %ymm3, %ymm2, %ymm2
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm2 = zmm2[0,1,2,3],zmm3[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm2, %k0
+; AVX512F-32-NEXT: andb $2, %bl
+; AVX512F-32-NEXT: shrb %bl
+; AVX512F-32-NEXT: kshiftlq $63, %k6, %k6
+; AVX512F-32-NEXT: kshiftrq $57, %k6, %k6
+; AVX512F-32-NEXT: kxorq %k7, %k6, %k6
+; AVX512F-32-NEXT: kshiftrq $7, %k6, %k7
+; AVX512F-32-NEXT: kxorq %k5, %k7, %k7
+; AVX512F-32-NEXT: kmovd %ebx, %k5
+; AVX512F-32-NEXT: movl %edx, %ecx
+; AVX512F-32-NEXT: shrb $2, %dl
+; AVX512F-32-NEXT: kshiftlq $63, %k7, %k7
+; AVX512F-32-NEXT: kshiftrq $56, %k7, %k7
+; AVX512F-32-NEXT: kxorq %k6, %k7, %k7
+; AVX512F-32-NEXT: kshiftrq $8, %k7, %k6
+; AVX512F-32-NEXT: kxorq %k1, %k6, %k1
+; AVX512F-32-NEXT: kmovd %edx, %k6
+; AVX512F-32-NEXT: movl {{[0-9]+}}(%esp), %ebx
+; AVX512F-32-NEXT: shrb $3, %cl
+; AVX512F-32-NEXT: kshiftlq $63, %k1, %k1
+; AVX512F-32-NEXT: kshiftrq $55, %k1, %k1
+; AVX512F-32-NEXT: kxorq %k7, %k1, %k7
+; AVX512F-32-NEXT: kshiftrq $9, %k7, %k1
+; AVX512F-32-NEXT: kxorq %k2, %k1, %k2
+; AVX512F-32-NEXT: kmovd %ecx, %k1
+; AVX512F-32-NEXT: movl %eax, %ecx
+; AVX512F-32-NEXT: shrb $4, %cl
+; AVX512F-32-NEXT: kshiftlq $63, %k2, %k2
+; AVX512F-32-NEXT: kshiftrq $54, %k2, %k2
+; AVX512F-32-NEXT: kxorq %k7, %k2, %k7
+; AVX512F-32-NEXT: kshiftrq $10, %k7, %k2
+; AVX512F-32-NEXT: kxorq %k3, %k2, %k3
+; AVX512F-32-NEXT: kmovd %ecx, %k2
+; AVX512F-32-NEXT: movl %eax, %ecx
+; AVX512F-32-NEXT: shrb $5, %cl
+; AVX512F-32-NEXT: andb $1, %cl
+; AVX512F-32-NEXT: movl %esi, %edx
+; AVX512F-32-NEXT: shrl $12, %edx
+; AVX512F-32-NEXT: andl $15, %edx
+; AVX512F-32-NEXT: kshiftlq $63, %k3, %k3
+; AVX512F-32-NEXT: kshiftrq $53, %k3, %k3
+; AVX512F-32-NEXT: kxorq %k7, %k3, %k3
+; AVX512F-32-NEXT: kshiftrq $11, %k3, %k7
+; AVX512F-32-NEXT: kxorq %k0, %k7, %k0
+; AVX512F-32-NEXT: kshiftlq $63, %k0, %k0
+; AVX512F-32-NEXT: kshiftrq $52, %k0, %k0
+; AVX512F-32-NEXT: kxorq %k3, %k0, %k3
+; AVX512F-32-NEXT: kshiftrq $12, %k3, %k0
+; AVX512F-32-NEXT: kmovd %edx, %k7
+; AVX512F-32-NEXT: kxorq %k7, %k0, %k7
+; AVX512F-32-NEXT: kmovd %ecx, %k0
; AVX512F-32-NEXT: movl %eax, %edx
; AVX512F-32-NEXT: shrb $6, %dl
-; AVX512F-32-NEXT: kmovd %edx, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm2
-; AVX512F-32-NEXT: vpbroadcastw %xmm2, %xmm2
-; AVX512F-32-NEXT: vinserti128 $1, %xmm2, %ymm0, %ymm2
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm3
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm0, %ymm3, %ymm2, %ymm2
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm2 = zmm2[0,1,2,3],zmm3[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm2, %k0
+; AVX512F-32-NEXT: movl %esi, %ecx
+; AVX512F-32-NEXT: shrl $14, %ecx
+; AVX512F-32-NEXT: andl $3, %ecx
+; AVX512F-32-NEXT: kshiftlq $63, %k7, %k7
+; AVX512F-32-NEXT: kshiftrq $51, %k7, %k7
+; AVX512F-32-NEXT: kxorq %k3, %k7, %k3
+; AVX512F-32-NEXT: kshiftrq $13, %k3, %k7
+; AVX512F-32-NEXT: kxorq %k4, %k7, %k4
+; AVX512F-32-NEXT: kmovd %ecx, %k7
+; AVX512F-32-NEXT: movl %esi, %ecx
+; AVX512F-32-NEXT: shrl $15, %ecx
+; AVX512F-32-NEXT: andl $1, %ecx
+; AVX512F-32-NEXT: kshiftlq $63, %k4, %k4
+; AVX512F-32-NEXT: kshiftrq $50, %k4, %k4
+; AVX512F-32-NEXT: kxorq %k3, %k4, %k3
+; AVX512F-32-NEXT: kshiftrq $14, %k3, %k4
+; AVX512F-32-NEXT: kxorq %k7, %k4, %k4
+; AVX512F-32-NEXT: kshiftlq $63, %k4, %k4
+; AVX512F-32-NEXT: kshiftrq $49, %k4, %k4
+; AVX512F-32-NEXT: kxorq %k3, %k4, %k3
+; AVX512F-32-NEXT: kshiftrq $15, %k3, %k4
+; AVX512F-32-NEXT: kmovd %ecx, %k7
+; AVX512F-32-NEXT: kxorq %k7, %k4, %k4
+; AVX512F-32-NEXT: kshiftlq $63, %k4, %k4
+; AVX512F-32-NEXT: kshiftrq $48, %k4, %k4
+; AVX512F-32-NEXT: kxorq %k3, %k4, %k3
+; AVX512F-32-NEXT: kshiftrq $16, %k3, %k4
+; AVX512F-32-NEXT: kmovd %eax, %k7
+; AVX512F-32-NEXT: kxorq %k7, %k4, %k4
+; AVX512F-32-NEXT: kmovd %edx, %k7
+; AVX512F-32-NEXT: movl %esi, %edx
+; AVX512F-32-NEXT: shrl $24, %edx
; AVX512F-32-NEXT: # kill: def %al killed %al killed %eax def %eax
; AVX512F-32-NEXT: shrb $7, %al
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm2
-; AVX512F-32-NEXT: vpsllq $56, %xmm2, %xmm2
-; AVX512F-32-NEXT: vinserti128 $1, %xmm2, %ymm0, %ymm2
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm3
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm0, %ymm3, %ymm2, %ymm2
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm2 = zmm2[0,1,2,3],zmm3[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm2, %k0
-; AVX512F-32-NEXT: movl %ecx, %eax
-; AVX512F-32-NEXT: shrl $24, %eax
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm2
-; AVX512F-32-NEXT: vpbroadcastq %xmm2, %ymm2
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm3
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm0, %ymm3, %ymm2, %ymm2
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm2 = zmm2[0,1,2,3],zmm3[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm2, %k0
-; AVX512F-32-NEXT: movl %eax, %edx
-; AVX512F-32-NEXT: andb $2, %dl
-; AVX512F-32-NEXT: shrb %dl
-; AVX512F-32-NEXT: kmovd %edx, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm2
-; AVX512F-32-NEXT: vpslldq {{.*#+}} xmm2 = zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm2[0,1,2,3,4,5,6]
-; AVX512F-32-NEXT: vinserti128 $1, %xmm2, %ymm0, %ymm2
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm3
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm0, %ymm3, %ymm2, %ymm2
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm2 = zmm2[0,1,2,3],zmm3[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm2, %k0
-; AVX512F-32-NEXT: movl %eax, %edx
-; AVX512F-32-NEXT: andb $15, %dl
+; AVX512F-32-NEXT: kshiftlq $63, %k4, %k4
+; AVX512F-32-NEXT: kshiftrq $47, %k4, %k4
+; AVX512F-32-NEXT: kxorq %k3, %k4, %k3
+; AVX512F-32-NEXT: kshiftrq $17, %k3, %k4
+; AVX512F-32-NEXT: kxorq %k5, %k4, %k4
+; AVX512F-32-NEXT: kmovd %eax, %k5
; AVX512F-32-NEXT: movl %edx, %eax
-; AVX512F-32-NEXT: shrb $2, %dl
-; AVX512F-32-NEXT: kmovd %edx, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm2
-; AVX512F-32-NEXT: vpbroadcastw %xmm2, %xmm2
-; AVX512F-32-NEXT: vinserti128 $1, %xmm2, %ymm0, %ymm2
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm3
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm0, %ymm3, %ymm2, %ymm2
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm2 = zmm2[0,1,2,3],zmm3[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm2, %k0
-; AVX512F-32-NEXT: shrb $3, %al
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm2
-; AVX512F-32-NEXT: vpslldq {{.*#+}} xmm2 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm2[0,1,2,3,4]
-; AVX512F-32-NEXT: vinserti128 $1, %xmm2, %ymm0, %ymm2
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm4
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm3 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm3, %ymm4, %ymm2, %ymm2
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm2 = zmm2[0,1,2,3],zmm4[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm2, %k0
-; AVX512F-32-NEXT: movl %ecx, %eax
-; AVX512F-32-NEXT: shrl $28, %eax
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm2
-; AVX512F-32-NEXT: vpbroadcastd %xmm2, %xmm2
-; AVX512F-32-NEXT: vinserti128 $1, %xmm2, %ymm0, %ymm2
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm4
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm0 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm0, %ymm4, %ymm2, %ymm2
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm2 = zmm2[0,1,2,3],zmm4[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm2, %k0
-; AVX512F-32-NEXT: movl %ecx, %eax
-; AVX512F-32-NEXT: movl %ecx, %esi
-; AVX512F-32-NEXT: shrl $29, %eax
-; AVX512F-32-NEXT: andb $1, %al
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm2
-; AVX512F-32-NEXT: vpslldq {{.*#+}} xmm2 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm2[0,1,2]
-; AVX512F-32-NEXT: vinserti128 $1, %xmm2, %ymm0, %ymm2
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm0
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm1 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm1, %ymm0, %ymm2, %ymm2
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm2[0,1,2,3],zmm0[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
-; AVX512F-32-NEXT: movl %esi, %eax
-; AVX512F-32-NEXT: shrl $30, %eax
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm0
-; AVX512F-32-NEXT: vpbroadcastw %xmm0, %xmm0
-; AVX512F-32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm1
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm0
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255]
-; AVX512F-32-NEXT: vpblendvb %ymm2, %ymm0, %ymm1, %ymm1
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm1[0,1,2,3],zmm0[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
-; AVX512F-32-NEXT: movl %esi, %eax
-; AVX512F-32-NEXT: shrl $31, %eax
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm0
-; AVX512F-32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0]
-; AVX512F-32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm1
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0]
-; AVX512F-32-NEXT: vpblendvb %ymm7, %ymm1, %ymm0, %ymm0
-; AVX512F-32-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,2,3],zmm1[4,5,6,7]
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
-; AVX512F-32-NEXT: movl {{[0-9]+}}(%esp), %ecx
-; AVX512F-32-NEXT: kmovd %ecx, %k1
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm0
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm0, %ymm1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm7
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm4 = [0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm4, %ymm1, %ymm7, %ymm1
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
-; AVX512F-32-NEXT: movl %ecx, %eax
-; AVX512F-32-NEXT: andb $2, %al
-; AVX512F-32-NEXT: shrb %al
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm0
-; AVX512F-32-NEXT: vpsllw $8, %xmm0, %xmm0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm1
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
-; AVX512F-32-NEXT: movl %ecx, %edx
+; AVX512F-32-NEXT: kshiftlq $63, %k4, %k4
+; AVX512F-32-NEXT: kshiftrq $46, %k4, %k4
+; AVX512F-32-NEXT: kxorq %k3, %k4, %k4
+; AVX512F-32-NEXT: kshiftrq $18, %k4, %k3
+; AVX512F-32-NEXT: kxorq %k6, %k3, %k6
+; AVX512F-32-NEXT: kmovd %edx, %k3
+; AVX512F-32-NEXT: # kill: def %dl killed %dl killed %edx def %edx
; AVX512F-32-NEXT: andb $15, %dl
-; AVX512F-32-NEXT: movl %edx, %eax
-; AVX512F-32-NEXT: shrb $2, %dl
-; AVX512F-32-NEXT: kmovd %edx, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm0
-; AVX512F-32-NEXT: vpbroadcastw %xmm0, %xmm0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm1
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
-; AVX512F-32-NEXT: shrb $3, %al
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm0
-; AVX512F-32-NEXT: vpslld $24, %xmm0, %xmm0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm1
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
-; AVX512F-32-NEXT: movl %ecx, %eax
-; AVX512F-32-NEXT: shrb $4, %al
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm0
-; AVX512F-32-NEXT: vpbroadcastd %xmm0, %xmm0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm1
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
-; AVX512F-32-NEXT: movl %ecx, %eax
-; AVX512F-32-NEXT: shrb $5, %al
-; AVX512F-32-NEXT: andb $1, %al
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm0
-; AVX512F-32-NEXT: vpsllq $40, %xmm0, %xmm0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm1
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
-; AVX512F-32-NEXT: movl %ecx, %eax
-; AVX512F-32-NEXT: shrb $6, %al
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm0
-; AVX512F-32-NEXT: vpbroadcastw %xmm0, %xmm0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm1
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
-; AVX512F-32-NEXT: movl %ecx, %eax
-; AVX512F-32-NEXT: shrb $7, %al
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm0
-; AVX512F-32-NEXT: vpsllq $56, %xmm0, %xmm0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm1
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
-; AVX512F-32-NEXT: movb %ch, %al
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm0
-; AVX512F-32-NEXT: vpbroadcastq %xmm0, %xmm0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm1
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
; AVX512F-32-NEXT: andb $2, %al
; AVX512F-32-NEXT: shrb %al
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm0
-; AVX512F-32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2,3,4,5,6]
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm1
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
-; AVX512F-32-NEXT: movb %ch, %dl
-; AVX512F-32-NEXT: andb $15, %dl
-; AVX512F-32-NEXT: movl %edx, %eax
+; AVX512F-32-NEXT: kshiftlq $63, %k6, %k6
+; AVX512F-32-NEXT: kshiftrq $45, %k6, %k6
+; AVX512F-32-NEXT: kxorq %k4, %k6, %k6
+; AVX512F-32-NEXT: kshiftrq $19, %k6, %k4
+; AVX512F-32-NEXT: kxorq %k1, %k4, %k1
+; AVX512F-32-NEXT: kmovd %eax, %k4
+; AVX512F-32-NEXT: movl %edx, %ecx
; AVX512F-32-NEXT: shrb $2, %dl
-; AVX512F-32-NEXT: kmovd %edx, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm0
-; AVX512F-32-NEXT: vpbroadcastw %xmm0, %xmm0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm1
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
-; AVX512F-32-NEXT: shrb $3, %al
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm0
-; AVX512F-32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2,3,4]
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm1
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
-; AVX512F-32-NEXT: movl %ecx, %eax
-; AVX512F-32-NEXT: shrl $12, %eax
-; AVX512F-32-NEXT: andl $15, %eax
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm0
-; AVX512F-32-NEXT: vpbroadcastd %xmm0, %xmm0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm1
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
-; AVX512F-32-NEXT: movl %ecx, %eax
-; AVX512F-32-NEXT: shrl $13, %eax
-; AVX512F-32-NEXT: andb $1, %al
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm0
-; AVX512F-32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2]
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm1
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
-; AVX512F-32-NEXT: movl %ecx, %eax
-; AVX512F-32-NEXT: shrl $14, %eax
-; AVX512F-32-NEXT: andl $3, %eax
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm0
-; AVX512F-32-NEXT: vpbroadcastw %xmm0, %xmm0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm1
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
-; AVX512F-32-NEXT: movl %ecx, %eax
-; AVX512F-32-NEXT: shrl $15, %eax
-; AVX512F-32-NEXT: andl $1, %eax
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm0
-; AVX512F-32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0]
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm1
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
-; AVX512F-32-NEXT: movl %ecx, %ebx
-; AVX512F-32-NEXT: shrl $16, %ebx
-; AVX512F-32-NEXT: kmovd %ebx, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm0
-; AVX512F-32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm1
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
+; AVX512F-32-NEXT: kshiftlq $63, %k1, %k1
+; AVX512F-32-NEXT: kshiftrq $44, %k1, %k1
+; AVX512F-32-NEXT: kxorq %k6, %k1, %k1
+; AVX512F-32-NEXT: kshiftrq $20, %k1, %k6
+; AVX512F-32-NEXT: kxorq %k2, %k6, %k6
+; AVX512F-32-NEXT: kmovd %edx, %k2
+; AVX512F-32-NEXT: movl %ebx, %eax
+; AVX512F-32-NEXT: andb $15, %al
+; AVX512F-32-NEXT: shrb $3, %cl
+; AVX512F-32-NEXT: kshiftlq $63, %k6, %k6
+; AVX512F-32-NEXT: kshiftrq $43, %k6, %k6
+; AVX512F-32-NEXT: kxorq %k1, %k6, %k1
+; AVX512F-32-NEXT: kshiftrq $21, %k1, %k6
+; AVX512F-32-NEXT: kxorq %k0, %k6, %k6
+; AVX512F-32-NEXT: kmovd %ecx, %k0
+; AVX512F-32-NEXT: movl %esi, %ecx
+; AVX512F-32-NEXT: shrl $29, %ecx
+; AVX512F-32-NEXT: andb $1, %cl
+; AVX512F-32-NEXT: kshiftlq $63, %k6, %k6
+; AVX512F-32-NEXT: kshiftrq $42, %k6, %k6
+; AVX512F-32-NEXT: kxorq %k1, %k6, %k6
+; AVX512F-32-NEXT: kshiftrq $22, %k6, %k1
+; AVX512F-32-NEXT: kxorq %k7, %k1, %k7
+; AVX512F-32-NEXT: kmovd %ecx, %k1
; AVX512F-32-NEXT: movl %ebx, %edx
; AVX512F-32-NEXT: andb $2, %dl
; AVX512F-32-NEXT: shrb %dl
-; AVX512F-32-NEXT: kmovd %edx, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm0
-; AVX512F-32-NEXT: vpsllw $8, %xmm0, %xmm0
-; AVX512F-32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm1
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; AVX512F-32-NEXT: movl %ebx, %eax
+; AVX512F-32-NEXT: kshiftlq $63, %k7, %k7
+; AVX512F-32-NEXT: kshiftrq $41, %k7, %k7
+; AVX512F-32-NEXT: kxorq %k6, %k7, %k6
+; AVX512F-32-NEXT: kshiftrq $23, %k6, %k7
+; AVX512F-32-NEXT: kxorq %k5, %k7, %k7
+; AVX512F-32-NEXT: kmovd %edx, %k5
+; AVX512F-32-NEXT: movl %eax, %ecx
+; AVX512F-32-NEXT: shrb $2, %al
+; AVX512F-32-NEXT: kshiftlq $63, %k7, %k7
+; AVX512F-32-NEXT: kshiftrq $40, %k7, %k7
+; AVX512F-32-NEXT: kxorq %k6, %k7, %k7
+; AVX512F-32-NEXT: kshiftrq $24, %k7, %k6
+; AVX512F-32-NEXT: kxorq %k3, %k6, %k3
+; AVX512F-32-NEXT: kmovd %eax, %k6
+; AVX512F-32-NEXT: movb %bh, %al
; AVX512F-32-NEXT: andb $15, %al
-; AVX512F-32-NEXT: movl %eax, %edx
+; AVX512F-32-NEXT: shrb $3, %cl
+; AVX512F-32-NEXT: kshiftlq $63, %k3, %k3
+; AVX512F-32-NEXT: kshiftrq $39, %k3, %k3
+; AVX512F-32-NEXT: kxorq %k7, %k3, %k7
+; AVX512F-32-NEXT: kshiftrq $25, %k7, %k3
+; AVX512F-32-NEXT: kxorq %k4, %k3, %k4
+; AVX512F-32-NEXT: kmovd %ecx, %k3
+; AVX512F-32-NEXT: movl %ebx, %ecx
+; AVX512F-32-NEXT: shrb $4, %cl
+; AVX512F-32-NEXT: kshiftlq $63, %k4, %k4
+; AVX512F-32-NEXT: kshiftrq $38, %k4, %k4
+; AVX512F-32-NEXT: kxorq %k7, %k4, %k7
+; AVX512F-32-NEXT: kshiftrq $26, %k7, %k4
+; AVX512F-32-NEXT: kxorq %k2, %k4, %k2
+; AVX512F-32-NEXT: kmovd %ecx, %k4
+; AVX512F-32-NEXT: movl %ebx, %ecx
+; AVX512F-32-NEXT: shrb $5, %cl
+; AVX512F-32-NEXT: andb $1, %cl
+; AVX512F-32-NEXT: movl %esi, %edx
+; AVX512F-32-NEXT: shrl $28, %edx
+; AVX512F-32-NEXT: kshiftlq $63, %k2, %k2
+; AVX512F-32-NEXT: kshiftrq $37, %k2, %k2
+; AVX512F-32-NEXT: kxorq %k7, %k2, %k2
+; AVX512F-32-NEXT: kshiftrq $27, %k2, %k7
+; AVX512F-32-NEXT: kxorq %k0, %k7, %k0
+; AVX512F-32-NEXT: kshiftlq $63, %k0, %k0
+; AVX512F-32-NEXT: kshiftrq $36, %k0, %k0
+; AVX512F-32-NEXT: kxorq %k2, %k0, %k2
+; AVX512F-32-NEXT: kshiftrq $28, %k2, %k0
+; AVX512F-32-NEXT: kmovd %edx, %k7
+; AVX512F-32-NEXT: kxorq %k7, %k0, %k7
+; AVX512F-32-NEXT: kmovd %ecx, %k0
+; AVX512F-32-NEXT: movl %ebx, %edx
+; AVX512F-32-NEXT: shrb $6, %dl
+; AVX512F-32-NEXT: movl %esi, %ecx
+; AVX512F-32-NEXT: shrl $30, %ecx
+; AVX512F-32-NEXT: kshiftlq $63, %k7, %k7
+; AVX512F-32-NEXT: kshiftrq $35, %k7, %k7
+; AVX512F-32-NEXT: kxorq %k2, %k7, %k2
+; AVX512F-32-NEXT: kshiftrq $29, %k2, %k7
+; AVX512F-32-NEXT: kxorq %k1, %k7, %k1
+; AVX512F-32-NEXT: kmovd %ecx, %k7
+; AVX512F-32-NEXT: movl %esi, %ecx
+; AVX512F-32-NEXT: shrl $31, %ecx
+; AVX512F-32-NEXT: kshiftlq $63, %k1, %k1
+; AVX512F-32-NEXT: kshiftrq $34, %k1, %k1
+; AVX512F-32-NEXT: kxorq %k2, %k1, %k1
+; AVX512F-32-NEXT: kshiftrq $30, %k1, %k2
+; AVX512F-32-NEXT: kxorq %k7, %k2, %k2
+; AVX512F-32-NEXT: kshiftlq $63, %k2, %k2
+; AVX512F-32-NEXT: kshiftrq $33, %k2, %k2
+; AVX512F-32-NEXT: kxorq %k1, %k2, %k1
+; AVX512F-32-NEXT: kshiftrq $31, %k1, %k2
+; AVX512F-32-NEXT: kmovd %ecx, %k7
+; AVX512F-32-NEXT: kxorq %k7, %k2, %k2
+; AVX512F-32-NEXT: kshiftlq $63, %k2, %k2
+; AVX512F-32-NEXT: kshiftrq $32, %k2, %k2
+; AVX512F-32-NEXT: kxorq %k1, %k2, %k1
+; AVX512F-32-NEXT: kshiftrq $32, %k1, %k2
+; AVX512F-32-NEXT: kmovd %ebx, %k7
+; AVX512F-32-NEXT: kxorq %k7, %k2, %k2
+; AVX512F-32-NEXT: kmovd %edx, %k7
+; AVX512F-32-NEXT: movl %ebx, %ecx
+; AVX512F-32-NEXT: shrb $7, %cl
+; AVX512F-32-NEXT: kshiftlq $63, %k2, %k2
+; AVX512F-32-NEXT: kshiftrq $31, %k2, %k2
+; AVX512F-32-NEXT: kxorq %k1, %k2, %k1
+; AVX512F-32-NEXT: kshiftrq $33, %k1, %k2
+; AVX512F-32-NEXT: kxorq %k5, %k2, %k2
+; AVX512F-32-NEXT: kshiftlq $63, %k2, %k2
+; AVX512F-32-NEXT: kshiftrq $30, %k2, %k2
+; AVX512F-32-NEXT: kxorq %k1, %k2, %k2
+; AVX512F-32-NEXT: kshiftrq $34, %k2, %k1
+; AVX512F-32-NEXT: kxorq %k6, %k1, %k5
+; AVX512F-32-NEXT: kmovd %ecx, %k6
+; AVX512F-32-NEXT: movb %bh, %cl
+; AVX512F-32-NEXT: kmovd %ecx, %k1
+; AVX512F-32-NEXT: andb $2, %cl
+; AVX512F-32-NEXT: shrb %cl
+; AVX512F-32-NEXT: kshiftlq $63, %k5, %k5
+; AVX512F-32-NEXT: kshiftrq $29, %k5, %k5
+; AVX512F-32-NEXT: kxorq %k2, %k5, %k5
+; AVX512F-32-NEXT: kshiftrq $35, %k5, %k2
+; AVX512F-32-NEXT: kxorq %k3, %k2, %k3
+; AVX512F-32-NEXT: kmovd %ecx, %k2
+; AVX512F-32-NEXT: movl %eax, %ecx
; AVX512F-32-NEXT: shrb $2, %al
-; AVX512F-32-NEXT: kmovd %eax, %k0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k1
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm0
-; AVX512F-32-NEXT: vpbroadcastw %xmm0, %xmm0
-; AVX512F-32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm1
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
-; AVX512F-32-NEXT: shrb $3, %dl
-; AVX512F-32-NEXT: kmovd %edx, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm0
-; AVX512F-32-NEXT: vpslld $24, %xmm0, %xmm0
-; AVX512F-32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm1
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
-; AVX512F-32-NEXT: movl %ebx, %eax
-; AVX512F-32-NEXT: shrb $4, %al
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm0
-; AVX512F-32-NEXT: vpbroadcastd %xmm0, %xmm0
-; AVX512F-32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm1
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
+; AVX512F-32-NEXT: kshiftlq $63, %k3, %k3
+; AVX512F-32-NEXT: kshiftrq $28, %k3, %k3
+; AVX512F-32-NEXT: kxorq %k5, %k3, %k5
+; AVX512F-32-NEXT: kshiftrq $36, %k5, %k3
+; AVX512F-32-NEXT: kxorq %k4, %k3, %k4
+; AVX512F-32-NEXT: kmovd %eax, %k3
; AVX512F-32-NEXT: movl %ebx, %eax
-; AVX512F-32-NEXT: shrb $5, %al
-; AVX512F-32-NEXT: andb $1, %al
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm0
-; AVX512F-32-NEXT: vpsllq $40, %xmm0, %xmm0
-; AVX512F-32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm1
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
-; AVX512F-32-NEXT: movl %ebx, %eax
-; AVX512F-32-NEXT: shrb $6, %al
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm0
-; AVX512F-32-NEXT: vpbroadcastw %xmm0, %xmm0
-; AVX512F-32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm1
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
-; AVX512F-32-NEXT: # kill: def %bl killed %bl killed %ebx def %ebx
-; AVX512F-32-NEXT: shrb $7, %bl
-; AVX512F-32-NEXT: kmovd %ebx, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm0
-; AVX512F-32-NEXT: vpsllq $56, %xmm0, %xmm0
-; AVX512F-32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm1
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
-; AVX512F-32-NEXT: movl %ecx, %eax
-; AVX512F-32-NEXT: shrl $24, %eax
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm0
-; AVX512F-32-NEXT: vpbroadcastq %xmm0, %ymm0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm1
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
+; AVX512F-32-NEXT: shrl $16, %eax
+; AVX512F-32-NEXT: shrb $3, %cl
+; AVX512F-32-NEXT: kshiftlq $63, %k4, %k4
+; AVX512F-32-NEXT: kshiftrq $27, %k4, %k4
+; AVX512F-32-NEXT: kxorq %k5, %k4, %k5
+; AVX512F-32-NEXT: kshiftrq $37, %k5, %k4
+; AVX512F-32-NEXT: kxorq %k0, %k4, %k0
+; AVX512F-32-NEXT: kmovd %ecx, %k4
+; AVX512F-32-NEXT: movl %ebx, %ecx
+; AVX512F-32-NEXT: shrl $13, %ecx
+; AVX512F-32-NEXT: andb $1, %cl
+; AVX512F-32-NEXT: kshiftlq $63, %k0, %k0
+; AVX512F-32-NEXT: kshiftrq $26, %k0, %k0
+; AVX512F-32-NEXT: kxorq %k5, %k0, %k0
+; AVX512F-32-NEXT: kshiftrq $38, %k0, %k5
+; AVX512F-32-NEXT: kxorq %k7, %k5, %k7
+; AVX512F-32-NEXT: kmovd %ecx, %k5
; AVX512F-32-NEXT: movl %eax, %edx
; AVX512F-32-NEXT: andb $2, %dl
; AVX512F-32-NEXT: shrb %dl
+; AVX512F-32-NEXT: kshiftlq $63, %k7, %k7
+; AVX512F-32-NEXT: kshiftrq $25, %k7, %k7
+; AVX512F-32-NEXT: kxorq %k0, %k7, %k7
+; AVX512F-32-NEXT: kshiftrq $39, %k7, %k0
+; AVX512F-32-NEXT: kxorq %k6, %k0, %k6
+; AVX512F-32-NEXT: kmovd %edx, %k0
+; AVX512F-32-NEXT: kmovq %k0, {{[0-9]+}}(%esp) # 8-byte Spill
+; AVX512F-32-NEXT: movl %eax, %ecx
+; AVX512F-32-NEXT: andb $15, %cl
+; AVX512F-32-NEXT: movl %ecx, %edx
+; AVX512F-32-NEXT: shrb $2, %cl
+; AVX512F-32-NEXT: kshiftlq $63, %k6, %k6
+; AVX512F-32-NEXT: kshiftrq $24, %k6, %k6
+; AVX512F-32-NEXT: kxorq %k7, %k6, %k6
+; AVX512F-32-NEXT: kshiftrq $40, %k6, %k7
+; AVX512F-32-NEXT: kxorq %k1, %k7, %k7
+; AVX512F-32-NEXT: kmovd %ecx, %k1
+; AVX512F-32-NEXT: movl %ebx, %ecx
+; AVX512F-32-NEXT: shrl $12, %ecx
+; AVX512F-32-NEXT: andl $15, %ecx
+; AVX512F-32-NEXT: kshiftlq $63, %k7, %k7
+; AVX512F-32-NEXT: kshiftrq $23, %k7, %k7
+; AVX512F-32-NEXT: kxorq %k6, %k7, %k6
+; AVX512F-32-NEXT: kshiftrq $41, %k6, %k7
+; AVX512F-32-NEXT: kxorq %k2, %k7, %k2
+; AVX512F-32-NEXT: kmovd %ecx, %k0
+; AVX512F-32-NEXT: movl %ebx, %ecx
+; AVX512F-32-NEXT: shrl $14, %ecx
+; AVX512F-32-NEXT: andl $3, %ecx
+; AVX512F-32-NEXT: kshiftlq $63, %k2, %k2
+; AVX512F-32-NEXT: kshiftrq $22, %k2, %k2
+; AVX512F-32-NEXT: kxorq %k6, %k2, %k2
+; AVX512F-32-NEXT: kshiftrq $42, %k2, %k6
+; AVX512F-32-NEXT: kxorq %k3, %k6, %k3
+; AVX512F-32-NEXT: kmovd %ecx, %k7
+; AVX512F-32-NEXT: movl %ebx, %ecx
+; AVX512F-32-NEXT: shrl $15, %ecx
+; AVX512F-32-NEXT: andl $1, %ecx
+; AVX512F-32-NEXT: kshiftlq $63, %k3, %k3
+; AVX512F-32-NEXT: kshiftrq $21, %k3, %k3
+; AVX512F-32-NEXT: kxorq %k2, %k3, %k2
+; AVX512F-32-NEXT: kshiftrq $43, %k2, %k3
+; AVX512F-32-NEXT: kxorq %k4, %k3, %k3
+; AVX512F-32-NEXT: kmovd %ecx, %k6
+; AVX512F-32-NEXT: shrb $3, %dl
+; AVX512F-32-NEXT: kshiftlq $63, %k3, %k3
+; AVX512F-32-NEXT: kshiftrq $20, %k3, %k3
+; AVX512F-32-NEXT: kxorq %k2, %k3, %k3
+; AVX512F-32-NEXT: kshiftrq $44, %k3, %k2
+; AVX512F-32-NEXT: kxorq %k0, %k2, %k0
+; AVX512F-32-NEXT: kmovd %edx, %k2
+; AVX512F-32-NEXT: movl %eax, %ecx
+; AVX512F-32-NEXT: shrb $4, %cl
+; AVX512F-32-NEXT: kshiftlq $63, %k0, %k0
+; AVX512F-32-NEXT: kshiftrq $19, %k0, %k0
+; AVX512F-32-NEXT: kxorq %k3, %k0, %k0
+; AVX512F-32-NEXT: kshiftrq $45, %k0, %k3
+; AVX512F-32-NEXT: kxorq %k5, %k3, %k4
+; AVX512F-32-NEXT: kmovd %ecx, %k3
+; AVX512F-32-NEXT: movl %eax, %ecx
+; AVX512F-32-NEXT: shrb $5, %cl
+; AVX512F-32-NEXT: andb $1, %cl
+; AVX512F-32-NEXT: kshiftlq $63, %k4, %k4
+; AVX512F-32-NEXT: kshiftrq $18, %k4, %k4
+; AVX512F-32-NEXT: kxorq %k0, %k4, %k0
+; AVX512F-32-NEXT: kshiftrq $46, %k0, %k4
+; AVX512F-32-NEXT: kxorq %k7, %k4, %k5
+; AVX512F-32-NEXT: kmovd %ecx, %k4
+; AVX512F-32-NEXT: movl %eax, %ecx
+; AVX512F-32-NEXT: shrb $6, %cl
+; AVX512F-32-NEXT: kshiftlq $63, %k5, %k5
+; AVX512F-32-NEXT: kshiftrq $17, %k5, %k5
+; AVX512F-32-NEXT: kxorq %k0, %k5, %k0
+; AVX512F-32-NEXT: kshiftrq $47, %k0, %k5
+; AVX512F-32-NEXT: kxorq %k6, %k5, %k5
+; AVX512F-32-NEXT: kshiftlq $63, %k5, %k5
+; AVX512F-32-NEXT: kshiftrq $16, %k5, %k5
+; AVX512F-32-NEXT: kxorq %k0, %k5, %k0
+; AVX512F-32-NEXT: kshiftrq $48, %k0, %k5
+; AVX512F-32-NEXT: kmovd %eax, %k6
+; AVX512F-32-NEXT: kxorq %k6, %k5, %k6
+; AVX512F-32-NEXT: kmovd %ecx, %k5
+; AVX512F-32-NEXT: movl %ebx, %edx
+; AVX512F-32-NEXT: shrl $24, %edx
+; AVX512F-32-NEXT: # kill: def %al killed %al killed %eax def %eax
+; AVX512F-32-NEXT: shrb $7, %al
+; AVX512F-32-NEXT: kshiftlq $63, %k6, %k6
+; AVX512F-32-NEXT: kshiftrq $15, %k6, %k6
+; AVX512F-32-NEXT: kxorq %k0, %k6, %k6
+; AVX512F-32-NEXT: kshiftrq $49, %k6, %k0
+; AVX512F-32-NEXT: kmovq {{[0-9]+}}(%esp), %k7 # 8-byte Reload
+; AVX512F-32-NEXT: kxorq %k7, %k0, %k7
+; AVX512F-32-NEXT: kmovd %eax, %k0
+; AVX512F-32-NEXT: movl %edx, %eax
+; AVX512F-32-NEXT: kshiftlq $63, %k7, %k7
+; AVX512F-32-NEXT: kshiftrq $14, %k7, %k7
+; AVX512F-32-NEXT: kxorq %k6, %k7, %k6
+; AVX512F-32-NEXT: kshiftrq $50, %k6, %k7
+; AVX512F-32-NEXT: kxorq %k1, %k7, %k7
; AVX512F-32-NEXT: kmovd %edx, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm0
-; AVX512F-32-NEXT: vpslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2,3,4,5,6]
-; AVX512F-32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm1
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; AVX512F-32-NEXT: movl %eax, %edx
+; AVX512F-32-NEXT: # kill: def %dl killed %dl killed %edx def %edx
; AVX512F-32-NEXT: andb $15, %dl
+; AVX512F-32-NEXT: andb $2, %al
+; AVX512F-32-NEXT: shrb %al
+; AVX512F-32-NEXT: kshiftlq $63, %k7, %k7
+; AVX512F-32-NEXT: kshiftrq $13, %k7, %k7
+; AVX512F-32-NEXT: kxorq %k6, %k7, %k6
+; AVX512F-32-NEXT: kshiftrq $51, %k6, %k7
+; AVX512F-32-NEXT: kxorq %k2, %k7, %k7
+; AVX512F-32-NEXT: kmovd %eax, %k2
; AVX512F-32-NEXT: movl %edx, %eax
; AVX512F-32-NEXT: shrb $2, %dl
-; AVX512F-32-NEXT: kmovd %edx, %k0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k1
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm0
-; AVX512F-32-NEXT: vpbroadcastw %xmm0, %xmm0
-; AVX512F-32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm1
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm1, %ymm4
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm7 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm7, %ymm4, %ymm0, %ymm0
+; AVX512F-32-NEXT: kshiftlq $63, %k7, %k7
+; AVX512F-32-NEXT: kshiftrq $12, %k7, %k7
+; AVX512F-32-NEXT: kxorq %k6, %k7, %k6
+; AVX512F-32-NEXT: kshiftrq $52, %k6, %k7
+; AVX512F-32-NEXT: kxorq %k3, %k7, %k7
+; AVX512F-32-NEXT: kmovd %edx, %k3
; AVX512F-32-NEXT: shrb $3, %al
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm0
-; AVX512F-32-NEXT: kmovd %eax, %k0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm1
-; AVX512F-32-NEXT: vpslldq {{.*#+}} xmm1 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm1[0,1,2,3,4]
-; AVX512F-32-NEXT: vinserti128 $1, %xmm1, %ymm0, %ymm1
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm0, %ymm4
-; AVX512F-32-NEXT: vpblendvb %ymm3, %ymm4, %ymm1, %ymm1
-; AVX512F-32-NEXT: movl %ecx, %eax
+; AVX512F-32-NEXT: kshiftlq $63, %k7, %k7
+; AVX512F-32-NEXT: kshiftrq $11, %k7, %k7
+; AVX512F-32-NEXT: kxorq %k6, %k7, %k6
+; AVX512F-32-NEXT: kshiftrq $53, %k6, %k7
+; AVX512F-32-NEXT: kxorq %k4, %k7, %k7
+; AVX512F-32-NEXT: kmovd %eax, %k4
+; AVX512F-32-NEXT: movl %ebx, %eax
; AVX512F-32-NEXT: shrl $29, %eax
; AVX512F-32-NEXT: andb $1, %al
-; AVX512F-32-NEXT: kmovd %eax, %k0
-; AVX512F-32-NEXT: movl %ecx, %eax
+; AVX512F-32-NEXT: kshiftlq $63, %k7, %k7
+; AVX512F-32-NEXT: kshiftrq $10, %k7, %k7
+; AVX512F-32-NEXT: kxorq %k6, %k7, %k6
+; AVX512F-32-NEXT: kshiftrq $54, %k6, %k7
+; AVX512F-32-NEXT: kxorq %k5, %k7, %k7
+; AVX512F-32-NEXT: kmovd %eax, %k5
+; AVX512F-32-NEXT: kshiftlq $63, %k7, %k7
+; AVX512F-32-NEXT: kshiftrq $9, %k7, %k7
+; AVX512F-32-NEXT: kxorq %k6, %k7, %k6
+; AVX512F-32-NEXT: kshiftrq $55, %k6, %k7
+; AVX512F-32-NEXT: kxorq %k0, %k7, %k0
+; AVX512F-32-NEXT: kshiftlq $63, %k0, %k0
+; AVX512F-32-NEXT: kshiftrq $8, %k0, %k0
+; AVX512F-32-NEXT: kxorq %k6, %k0, %k0
+; AVX512F-32-NEXT: kshiftrq $56, %k0, %k6
+; AVX512F-32-NEXT: kxorq %k1, %k6, %k1
+; AVX512F-32-NEXT: kshiftlq $63, %k1, %k1
+; AVX512F-32-NEXT: kshiftrq $7, %k1, %k1
+; AVX512F-32-NEXT: kxorq %k0, %k1, %k0
+; AVX512F-32-NEXT: kshiftrq $57, %k0, %k1
+; AVX512F-32-NEXT: kxorq %k2, %k1, %k1
+; AVX512F-32-NEXT: kshiftlq $63, %k1, %k1
+; AVX512F-32-NEXT: kshiftrq $6, %k1, %k1
+; AVX512F-32-NEXT: kxorq %k0, %k1, %k0
+; AVX512F-32-NEXT: kshiftrq $58, %k0, %k1
+; AVX512F-32-NEXT: kxorq %k3, %k1, %k1
+; AVX512F-32-NEXT: movl %ebx, %eax
; AVX512F-32-NEXT: shrl $28, %eax
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm0
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm0, %ymm1
-; AVX512F-32-NEXT: kmovd %eax, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm3
-; AVX512F-32-NEXT: vpbroadcastd %xmm3, %xmm3
-; AVX512F-32-NEXT: vinserti128 $1, %xmm3, %ymm0, %ymm3
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm4 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm4, %ymm1, %ymm3, %ymm1
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k1
-; AVX512F-32-NEXT: vpmovm2b %k1, %zmm0
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm0, %ymm1
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm3
-; AVX512F-32-NEXT: vpslldq {{.*#+}} xmm3 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm3[0,1,2]
-; AVX512F-32-NEXT: vinserti128 $1, %xmm3, %ymm0, %ymm3
-; AVX512F-32-NEXT: vmovdqa {{.*#+}} ymm4 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,255]
-; AVX512F-32-NEXT: vpblendvb %ymm4, %ymm1, %ymm3, %ymm1
-; AVX512F-32-NEXT: movl %ecx, %eax
-; AVX512F-32-NEXT: shrl $30, %eax
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm0
-; AVX512F-32-NEXT: vextracti64x4 $1, %zmm0, %ymm1
-; AVX512F-32-NEXT: kmovd %eax, %k0
-; AVX512F-32-NEXT: vpmovm2b %k0, %zmm3
-; AVX512F-32-NEXT: vpbroadcastw %xmm3, %xmm3
-; AVX512F-32-NEXT: vinserti128 $1, %xmm3, %ymm0, %ymm3
-; AVX512F-32-NEXT: vpblendvb %ymm2, %ymm1, %ymm3, %ymm1
-; AVX512F-32-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
-; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0
-; AVX512F-32-NEXT: movl %ecx, %eax
+; AVX512F-32-NEXT: kshiftlq $63, %k1, %k1
+; AVX512F-32-NEXT: kshiftrq $5, %k1, %k1
+; AVX512F-32-NEXT: kxorq %k0, %k1, %k0
+; AVX512F-32-NEXT: kshiftrq $59, %k0, %k1
+; AVX512F-32-NEXT: kxorq %k4, %k1, %k1
+; AVX512F-32-NEXT: kshiftlq $63, %k1, %k1
+; AVX512F-32-NEXT: kshiftrq $4, %k1, %k1
+; AVX512F-32-NEXT: kxorq %k0, %k1, %k0
+; AVX512F-32-NEXT: kshiftrq $60, %k0, %k1
+; AVX512F-32-NEXT: kmovd %eax, %k2
+; AVX512F-32-NEXT: kxorq %k2, %k1, %k1
+; AVX512F-32-NEXT: movl %ebx, %eax
; AVX512F-32-NEXT: shrl $31, %eax
+; AVX512F-32-NEXT: movl %ebx, %ecx
+; AVX512F-32-NEXT: shrl $30, %ecx
+; AVX512F-32-NEXT: kshiftlq $63, %k1, %k1
+; AVX512F-32-NEXT: kshiftrq $3, %k1, %k1
+; AVX512F-32-NEXT: kxorq %k0, %k1, %k0
+; AVX512F-32-NEXT: kshiftrq $61, %k0, %k1
+; AVX512F-32-NEXT: kxorq %k5, %k1, %k1
+; AVX512F-32-NEXT: kshiftlq $63, %k1, %k1
+; AVX512F-32-NEXT: kshiftrq $2, %k1, %k1
+; AVX512F-32-NEXT: kxorq %k0, %k1, %k0
+; AVX512F-32-NEXT: kshiftrq $62, %k0, %k1
+; AVX512F-32-NEXT: kmovd %ecx, %k2
+; AVX512F-32-NEXT: kxorq %k2, %k1, %k1
+; AVX512F-32-NEXT: kshiftlq $63, %k1, %k1
+; AVX512F-32-NEXT: kshiftrq $1, %k1, %k1
+; AVX512F-32-NEXT: kxorq %k0, %k1, %k0
; AVX512F-32-NEXT: kshiftlq $1, %k0, %k0
; AVX512F-32-NEXT: kshiftrq $1, %k0, %k0
; AVX512F-32-NEXT: kmovd %eax, %k1
; AVX512F-32-NEXT: kshiftlq $63, %k1, %k1
; AVX512F-32-NEXT: korq %k1, %k0, %k1
-; AVX512F-32-NEXT: vpcmpeqb %zmm6, %zmm5, %k0 {%k1}
-; AVX512F-32-NEXT: vpcmpltub %zmm6, %zmm5, %k2 {%k1}
-; AVX512F-32-NEXT: vpcmpleub %zmm6, %zmm5, %k3 {%k1}
-; AVX512F-32-NEXT: vpcmpneqb %zmm6, %zmm5, %k4 {%k1}
-; AVX512F-32-NEXT: vpcmpnltub %zmm6, %zmm5, %k5 {%k1}
-; AVX512F-32-NEXT: vpcmpnleub %zmm6, %zmm5, %k1 {%k1}
+; AVX512F-32-NEXT: vpcmpeqb %zmm1, %zmm0, %k0 {%k1}
; AVX512F-32-NEXT: kmovq %k0, (%esp)
; AVX512F-32-NEXT: movl (%esp), %eax
; AVX512F-32-NEXT: movl {{[0-9]+}}(%esp), %edx
-; AVX512F-32-NEXT: kmovq %k2, {{[0-9]+}}(%esp)
+; AVX512F-32-NEXT: vpcmpltub %zmm1, %zmm0, %k0 {%k1}
+; AVX512F-32-NEXT: kmovq %k0, {{[0-9]+}}(%esp)
; AVX512F-32-NEXT: addl {{[0-9]+}}(%esp), %eax
; AVX512F-32-NEXT: adcl {{[0-9]+}}(%esp), %edx
-; AVX512F-32-NEXT: kmovq %k3, {{[0-9]+}}(%esp)
+; AVX512F-32-NEXT: vpcmpleub %zmm1, %zmm0, %k0 {%k1}
+; AVX512F-32-NEXT: kmovq %k0, {{[0-9]+}}(%esp)
; AVX512F-32-NEXT: addl {{[0-9]+}}(%esp), %eax
; AVX512F-32-NEXT: adcl {{[0-9]+}}(%esp), %edx
; AVX512F-32-NEXT: kxorq %k0, %k0, %k0
; AVX512F-32-NEXT: kmovq %k0, {{[0-9]+}}(%esp)
; AVX512F-32-NEXT: orl {{[0-9]+}}(%esp), %edx
; AVX512F-32-NEXT: orl {{[0-9]+}}(%esp), %eax
-; AVX512F-32-NEXT: kmovq %k4, {{[0-9]+}}(%esp)
+; AVX512F-32-NEXT: vpcmpneqb %zmm1, %zmm0, %k0 {%k1}
+; AVX512F-32-NEXT: kmovq %k0, {{[0-9]+}}(%esp)
; AVX512F-32-NEXT: addl {{[0-9]+}}(%esp), %eax
; AVX512F-32-NEXT: adcl {{[0-9]+}}(%esp), %edx
-; AVX512F-32-NEXT: kmovq %k5, {{[0-9]+}}(%esp)
+; AVX512F-32-NEXT: vpcmpnltub %zmm1, %zmm0, %k0 {%k1}
+; AVX512F-32-NEXT: kmovq %k0, {{[0-9]+}}(%esp)
; AVX512F-32-NEXT: addl {{[0-9]+}}(%esp), %eax
; AVX512F-32-NEXT: adcl {{[0-9]+}}(%esp), %edx
-; AVX512F-32-NEXT: kmovq %k1, {{[0-9]+}}(%esp)
+; AVX512F-32-NEXT: vpcmpnleub %zmm1, %zmm0, %k0 {%k1}
+; AVX512F-32-NEXT: kmovq %k0, {{[0-9]+}}(%esp)
; AVX512F-32-NEXT: addl {{[0-9]+}}(%esp), %eax
; AVX512F-32-NEXT: adcl {{[0-9]+}}(%esp), %edx
; AVX512F-32-NEXT: addl %esi, %eax
-; AVX512F-32-NEXT: adcl %ecx, %edx
-; AVX512F-32-NEXT: addl $60, %esp
+; AVX512F-32-NEXT: adcl %ebx, %edx
+; AVX512F-32-NEXT: addl $68, %esp
; AVX512F-32-NEXT: popl %esi
; AVX512F-32-NEXT: popl %ebx
; AVX512F-32-NEXT: vzeroupper
; NoVLX: # %bb.0: # %entry
; NoVLX-NEXT: vpcmpeqd %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <4 x i32>
; NoVLX: # %bb.0: # %entry
; NoVLX-NEXT: vpcmpeqd (%rdi), %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <4 x i32>
; NoVLX-NEXT: vpinsrb $12, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <4 x i32>
; NoVLX-NEXT: vpinsrb $12, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <4 x i32>
; NoVLX-NEXT: vpbroadcastd (%rdi), %xmm1
; NoVLX-NEXT: vpcmpeqd %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <4 x i32>
; NoVLX-NEXT: vpinsrb $12, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm0, %xmm1, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <4 x i32>
; NoVLX: # %bb.0: # %entry
; NoVLX-NEXT: vpcmpeqd %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <4 x i32>
; NoVLX: # %bb.0: # %entry
; NoVLX-NEXT: vpcmpeqd (%rdi), %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <4 x i32>
; NoVLX-NEXT: vpinsrb $12, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <4 x i32>
; NoVLX-NEXT: vpinsrb $12, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <4 x i32>
; NoVLX-NEXT: vpbroadcastd (%rdi), %xmm1
; NoVLX-NEXT: vpcmpeqd %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <4 x i32>
; NoVLX-NEXT: vpinsrb $12, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm0, %xmm1, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <4 x i32>
; NoVLX: # %bb.0: # %entry
; NoVLX-NEXT: vpcmpeqq %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <2 x i64>
; NoVLX: # %bb.0: # %entry
; NoVLX-NEXT: vpcmpeqq (%rdi), %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <2 x i64>
; NoVLX-NEXT: vpinsrb $8, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <2 x i64>
; NoVLX-NEXT: vpinsrb $8, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <2 x i64>
; NoVLX-NEXT: vpbroadcastq (%rdi), %xmm1
; NoVLX-NEXT: vpcmpeqq %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <2 x i64>
; NoVLX-NEXT: vpinsrb $8, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm0, %xmm1, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <2 x i64>
; NoVLX: # %bb.0: # %entry
; NoVLX-NEXT: vpcmpeqq %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <2 x i64>
; NoVLX: # %bb.0: # %entry
; NoVLX-NEXT: vpcmpeqq (%rdi), %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <2 x i64>
; NoVLX-NEXT: vpinsrb $8, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <2 x i64>
; NoVLX-NEXT: vpinsrb $8, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <2 x i64>
; NoVLX-NEXT: vpbroadcastq (%rdi), %xmm1
; NoVLX-NEXT: vpcmpeqq %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <2 x i64>
; NoVLX-NEXT: vpinsrb $8, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm0, %xmm1, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <2 x i64>
; NoVLX-NEXT: vpcmpeqq %ymm1, %ymm0, %ymm0
; NoVLX-NEXT: vpmovqd %zmm0, %ymm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vpcmpeqq (%rdi), %ymm0, %ymm0
; NoVLX-NEXT: vpmovqd %zmm0, %ymm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vpinsrb $12, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vpinsrb $12, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vpcmpeqq %ymm1, %ymm0, %ymm0
; NoVLX-NEXT: vpmovqd %zmm0, %ymm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vpinsrb $12, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm0, %xmm1, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vpcmpeqq %ymm1, %ymm0, %ymm0
; NoVLX-NEXT: vpmovqd %zmm0, %ymm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vpcmpeqq (%rdi), %ymm0, %ymm0
; NoVLX-NEXT: vpmovqd %zmm0, %ymm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vpinsrb $12, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vpinsrb $12, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vpcmpeqq %ymm1, %ymm0, %ymm0
; NoVLX-NEXT: vpmovqd %zmm0, %ymm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vpinsrb $12, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm0, %xmm1, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX: # %bb.0: # %entry
; NoVLX-NEXT: vpcmpgtd %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <4 x i32>
; NoVLX: # %bb.0: # %entry
; NoVLX-NEXT: vpcmpgtd (%rdi), %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <4 x i32>
; NoVLX-NEXT: vpinsrb $12, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <4 x i32>
; NoVLX-NEXT: vpinsrb $12, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <4 x i32>
; NoVLX-NEXT: vpbroadcastd (%rdi), %xmm1
; NoVLX-NEXT: vpcmpgtd %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <4 x i32>
; NoVLX-NEXT: vpinsrb $12, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm0, %xmm1, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <4 x i32>
; NoVLX: # %bb.0: # %entry
; NoVLX-NEXT: vpcmpgtd %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <4 x i32>
; NoVLX: # %bb.0: # %entry
; NoVLX-NEXT: vpcmpgtd (%rdi), %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <4 x i32>
; NoVLX-NEXT: vpinsrb $12, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <4 x i32>
; NoVLX-NEXT: vpinsrb $12, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <4 x i32>
; NoVLX-NEXT: vpbroadcastd (%rdi), %xmm1
; NoVLX-NEXT: vpcmpgtd %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <4 x i32>
; NoVLX-NEXT: vpinsrb $12, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm0, %xmm1, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <4 x i32>
; NoVLX: # %bb.0: # %entry
; NoVLX-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <2 x i64>
; NoVLX: # %bb.0: # %entry
; NoVLX-NEXT: vpcmpgtq (%rdi), %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <2 x i64>
; NoVLX-NEXT: vpinsrb $8, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <2 x i64>
; NoVLX-NEXT: vpinsrb $8, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <2 x i64>
; NoVLX-NEXT: vpbroadcastq (%rdi), %xmm1
; NoVLX-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <2 x i64>
; NoVLX-NEXT: vpinsrb $8, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm0, %xmm1, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <2 x i64>
; NoVLX: # %bb.0: # %entry
; NoVLX-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <2 x i64>
; NoVLX: # %bb.0: # %entry
; NoVLX-NEXT: vpcmpgtq (%rdi), %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <2 x i64>
; NoVLX-NEXT: vpinsrb $8, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <2 x i64>
; NoVLX-NEXT: vpinsrb $8, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <2 x i64>
; NoVLX-NEXT: vpbroadcastq (%rdi), %xmm1
; NoVLX-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <2 x i64>
; NoVLX-NEXT: vpinsrb $8, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm0, %xmm1, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <2 x i64>
; NoVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
; NoVLX-NEXT: vpmovqd %zmm0, %ymm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vpcmpgtq (%rdi), %ymm0, %ymm0
; NoVLX-NEXT: vpmovqd %zmm0, %ymm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vpinsrb $12, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vpinsrb $12, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
; NoVLX-NEXT: vpmovqd %zmm0, %ymm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vpinsrb $12, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm0, %xmm1, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
; NoVLX-NEXT: vpmovqd %zmm0, %ymm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vpcmpgtq (%rdi), %ymm0, %ymm0
; NoVLX-NEXT: vpmovqd %zmm0, %ymm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vpinsrb $12, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vpinsrb $12, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
; NoVLX-NEXT: vpmovqd %zmm0, %ymm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vpinsrb $12, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm0, %xmm1, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vpcmpeqd %xmm1, %xmm1, %xmm1
; NoVLX-NEXT: vpxor %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <4 x i32>
; NoVLX-NEXT: vpcmpeqd %xmm1, %xmm1, %xmm1
; NoVLX-NEXT: vpxor %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <4 x i32>
; NoVLX-NEXT: vpinsrb $12, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpandn %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <4 x i32>
; NoVLX-NEXT: vpinsrb $12, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpandn %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <4 x i32>
; NoVLX-NEXT: vpcmpeqd %xmm1, %xmm1, %xmm1
; NoVLX-NEXT: vpxor %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <4 x i32>
; NoVLX-NEXT: vpinsrb $12, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpandn %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <4 x i32>
; NoVLX-NEXT: vpcmpeqd %xmm1, %xmm1, %xmm1
; NoVLX-NEXT: vpxor %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <4 x i32>
; NoVLX-NEXT: vpcmpeqd %xmm1, %xmm1, %xmm1
; NoVLX-NEXT: vpxor %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <4 x i32>
; NoVLX-NEXT: vpinsrb $12, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpandn %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <4 x i32>
; NoVLX-NEXT: vpinsrb $12, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpandn %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <4 x i32>
; NoVLX-NEXT: vpcmpeqd %xmm1, %xmm1, %xmm1
; NoVLX-NEXT: vpxor %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <4 x i32>
; NoVLX-NEXT: vpinsrb $12, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpandn %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <4 x i32>
; NoVLX-NEXT: vpcmpeqd %xmm1, %xmm1, %xmm1
; NoVLX-NEXT: vpxor %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <2 x i64>
; NoVLX-NEXT: vpcmpeqd %xmm1, %xmm1, %xmm1
; NoVLX-NEXT: vpxor %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <2 x i64>
; NoVLX-NEXT: vpinsrb $8, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpandn %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <2 x i64>
; NoVLX-NEXT: vpinsrb $8, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpandn %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <2 x i64>
; NoVLX-NEXT: vpcmpeqd %xmm1, %xmm1, %xmm1
; NoVLX-NEXT: vpxor %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <2 x i64>
; NoVLX-NEXT: vpinsrb $8, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpandn %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <2 x i64>
; NoVLX-NEXT: vpcmpeqd %xmm1, %xmm1, %xmm1
; NoVLX-NEXT: vpxor %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <2 x i64>
; NoVLX-NEXT: vpcmpeqd %xmm1, %xmm1, %xmm1
; NoVLX-NEXT: vpxor %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <2 x i64>
; NoVLX-NEXT: vpinsrb $8, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpandn %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <2 x i64>
; NoVLX-NEXT: vpinsrb $8, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpandn %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <2 x i64>
; NoVLX-NEXT: vpcmpeqd %xmm1, %xmm1, %xmm1
; NoVLX-NEXT: vpxor %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <2 x i64>
; NoVLX-NEXT: vpinsrb $8, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpandn %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <2 x i64>
; NoVLX-NEXT: vpxor %ymm1, %ymm0, %ymm0
; NoVLX-NEXT: vpmovqd %zmm0, %ymm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vpxor %ymm1, %ymm0, %ymm0
; NoVLX-NEXT: vpmovqd %zmm0, %ymm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vpinsrb $12, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
-; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
-; NoVLX-NEXT: kmovw %k0, %eax
-; NoVLX-NEXT: # kill: def %al killed %al killed %eax
-; NoVLX-NEXT: vzeroupper
-; NoVLX-NEXT: retq
-entry:
- %0 = bitcast <4 x i64> %__a to <4 x i64>
- %1 = bitcast <4 x i64> %__b to <4 x i64>
- %2 = icmp sge <4 x i64> %0, %1
- %3 = bitcast i8 %__u to <8 x i1>
- %extract.i = shufflevector <8 x i1> %3, <8 x i1> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
- %4 = and <4 x i1> %2, %extract.i
- %5 = shufflevector <4 x i1> %4, <4 x i1> zeroinitializer, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
- %6 = bitcast <8 x i1> %5 to i8
- ret i8 %6
-}
-
-define zeroext i8 @test_masked_vpcmpsgeq_v4i1_v8i1_mask_mem(i8 zeroext %__u, <4 x i64> %__a, <4 x i64>* %__b) local_unnamed_addr {
-; VLX-LABEL: test_masked_vpcmpsgeq_v4i1_v8i1_mask_mem:
-; VLX: # %bb.0: # %entry
-; VLX-NEXT: kmovd %edi, %k1
-; VLX-NEXT: vpcmpnltq (%rsi), %ymm0, %k0 {%k1}
-; VLX-NEXT: kmovd %k0, %eax
-; VLX-NEXT: # kill: def %al killed %al killed %eax
-; VLX-NEXT: vzeroupper
-; VLX-NEXT: retq
-;
-; NoVLX-LABEL: test_masked_vpcmpsgeq_v4i1_v8i1_mask_mem:
-; NoVLX: # %bb.0: # %entry
-; NoVLX-NEXT: vmovdqa (%rsi), %ymm1
-; NoVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
-; NoVLX-NEXT: vpcmpeqd %ymm1, %ymm1, %ymm1
-; NoVLX-NEXT: vpxor %ymm1, %ymm0, %ymm0
-; NoVLX-NEXT: vpmovqd %zmm0, %ymm0
-; NoVLX-NEXT: kmovw %edi, %k0
-; NoVLX-NEXT: kshiftlw $12, %k0, %k1
-; NoVLX-NEXT: kshiftrw $15, %k1, %k1
-; NoVLX-NEXT: kshiftlw $13, %k0, %k2
-; NoVLX-NEXT: kshiftrw $15, %k2, %k2
-; NoVLX-NEXT: kshiftlw $15, %k0, %k3
-; NoVLX-NEXT: kshiftrw $15, %k3, %k3
-; NoVLX-NEXT: kshiftlw $14, %k0, %k0
-; NoVLX-NEXT: kshiftrw $15, %k0, %k0
-; NoVLX-NEXT: kmovw %k0, %eax
-; NoVLX-NEXT: kmovw %k3, %ecx
-; NoVLX-NEXT: vmovd %ecx, %xmm1
-; NoVLX-NEXT: vpinsrb $4, %eax, %xmm1, %xmm1
-; NoVLX-NEXT: kmovw %k2, %eax
-; NoVLX-NEXT: vpinsrb $8, %eax, %xmm1, %xmm1
-; NoVLX-NEXT: kmovw %k1, %eax
-; NoVLX-NEXT: vpinsrb $12, %eax, %xmm1, %xmm1
-; NoVLX-NEXT: vpand %xmm1, %xmm0, %xmm0
-; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kmovw %k0, %eax
+; NoVLX-NEXT: # kill: def %al killed %al killed %eax
+; NoVLX-NEXT: vzeroupper
+; NoVLX-NEXT: retq
+entry:
+ %0 = bitcast <4 x i64> %__a to <4 x i64>
+ %1 = bitcast <4 x i64> %__b to <4 x i64>
+ %2 = icmp sge <4 x i64> %0, %1
+ %3 = bitcast i8 %__u to <8 x i1>
+ %extract.i = shufflevector <8 x i1> %3, <8 x i1> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
+ %4 = and <4 x i1> %2, %extract.i
+ %5 = shufflevector <4 x i1> %4, <4 x i1> zeroinitializer, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
+ %6 = bitcast <8 x i1> %5 to i8
+ ret i8 %6
+}
+
+define zeroext i8 @test_masked_vpcmpsgeq_v4i1_v8i1_mask_mem(i8 zeroext %__u, <4 x i64> %__a, <4 x i64>* %__b) local_unnamed_addr {
+; VLX-LABEL: test_masked_vpcmpsgeq_v4i1_v8i1_mask_mem:
+; VLX: # %bb.0: # %entry
+; VLX-NEXT: kmovd %edi, %k1
+; VLX-NEXT: vpcmpnltq (%rsi), %ymm0, %k0 {%k1}
+; VLX-NEXT: kmovd %k0, %eax
+; VLX-NEXT: # kill: def %al killed %al killed %eax
+; VLX-NEXT: vzeroupper
+; VLX-NEXT: retq
+;
+; NoVLX-LABEL: test_masked_vpcmpsgeq_v4i1_v8i1_mask_mem:
+; NoVLX: # %bb.0: # %entry
+; NoVLX-NEXT: vmovdqa (%rsi), %ymm1
+; NoVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
+; NoVLX-NEXT: vpcmpeqd %ymm1, %ymm1, %ymm1
+; NoVLX-NEXT: vpxor %ymm1, %ymm0, %ymm0
+; NoVLX-NEXT: vpmovqd %zmm0, %ymm0
+; NoVLX-NEXT: kmovw %edi, %k0
+; NoVLX-NEXT: kshiftlw $12, %k0, %k1
+; NoVLX-NEXT: kshiftrw $15, %k1, %k1
+; NoVLX-NEXT: kshiftlw $13, %k0, %k2
+; NoVLX-NEXT: kshiftrw $15, %k2, %k2
+; NoVLX-NEXT: kshiftlw $15, %k0, %k3
+; NoVLX-NEXT: kshiftrw $15, %k3, %k3
+; NoVLX-NEXT: kshiftlw $14, %k0, %k0
+; NoVLX-NEXT: kshiftrw $15, %k0, %k0
+; NoVLX-NEXT: kmovw %k0, %eax
+; NoVLX-NEXT: kmovw %k3, %ecx
+; NoVLX-NEXT: vmovd %ecx, %xmm1
+; NoVLX-NEXT: vpinsrb $4, %eax, %xmm1, %xmm1
+; NoVLX-NEXT: kmovw %k2, %eax
+; NoVLX-NEXT: vpinsrb $8, %eax, %xmm1, %xmm1
+; NoVLX-NEXT: kmovw %k1, %eax
+; NoVLX-NEXT: vpinsrb $12, %eax, %xmm1, %xmm1
+; NoVLX-NEXT: vpand %xmm1, %xmm0, %xmm0
+; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k0
+; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
+; NoVLX-NEXT: andl $1, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
+; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vpxor %ymm1, %ymm0, %ymm0
; NoVLX-NEXT: vpmovqd %zmm0, %ymm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vpinsrb $12, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm0, %xmm1, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vpxor %ymm1, %ymm0, %ymm0
; NoVLX-NEXT: vpmovqd %zmm0, %ymm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vpxor %ymm1, %ymm0, %ymm0
; NoVLX-NEXT: vpmovqd %zmm0, %ymm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vpinsrb $12, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vpinsrb $12, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vpxor %ymm1, %ymm0, %ymm0
; NoVLX-NEXT: vpmovqd %zmm0, %ymm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vpinsrb $12, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm0, %xmm1, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vpxor %xmm2, %xmm1, %xmm1
; NoVLX-NEXT: vpcmpgtd %xmm0, %xmm1, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <4 x i32>
; NoVLX-NEXT: vpxor (%rdi), %xmm1, %xmm1
; NoVLX-NEXT: vpcmpgtd %xmm0, %xmm1, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <4 x i32>
; NoVLX-NEXT: vpinsrb $12, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <4 x i32>
; NoVLX-NEXT: vpinsrb $12, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <4 x i32>
; NoVLX-NEXT: vpxor %xmm2, %xmm1, %xmm1
; NoVLX-NEXT: vpcmpgtd %xmm0, %xmm1, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <4 x i32>
; NoVLX-NEXT: vpinsrb $12, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm0, %xmm1, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <4 x i32>
; NoVLX-NEXT: vpxor %xmm2, %xmm1, %xmm1
; NoVLX-NEXT: vpcmpgtd %xmm0, %xmm1, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <4 x i32>
; NoVLX-NEXT: vpxor (%rdi), %xmm1, %xmm1
; NoVLX-NEXT: vpcmpgtd %xmm0, %xmm1, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <4 x i32>
; NoVLX-NEXT: vpinsrb $12, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <4 x i32>
; NoVLX-NEXT: vpinsrb $12, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <4 x i32>
; NoVLX-NEXT: vpxor %xmm2, %xmm1, %xmm1
; NoVLX-NEXT: vpcmpgtd %xmm0, %xmm1, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <4 x i32>
; NoVLX-NEXT: vpinsrb $12, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm0, %xmm1, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <4 x i32>
; NoVLX-NEXT: vpxor %xmm2, %xmm1, %xmm1
; NoVLX-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <2 x i64>
; NoVLX-NEXT: vpxor (%rdi), %xmm1, %xmm1
; NoVLX-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <2 x i64>
; NoVLX-NEXT: vpinsrb $8, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <2 x i64>
; NoVLX-NEXT: vpinsrb $8, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <2 x i64>
; NoVLX-NEXT: vpxor %xmm2, %xmm1, %xmm1
; NoVLX-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <2 x i64>
; NoVLX-NEXT: vpinsrb $8, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm0, %xmm1, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <2 x i64>
; NoVLX-NEXT: vpxor %xmm2, %xmm1, %xmm1
; NoVLX-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <2 x i64>
; NoVLX-NEXT: vpxor (%rdi), %xmm1, %xmm1
; NoVLX-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <2 x i64>
; NoVLX-NEXT: vpinsrb $8, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <2 x i64>
; NoVLX-NEXT: vpinsrb $8, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <2 x i64>
; NoVLX-NEXT: vpxor %xmm2, %xmm1, %xmm1
; NoVLX-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <2 x i64>
; NoVLX-NEXT: vpinsrb $8, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm0, %xmm1, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <2 x i64>
; NoVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
; NoVLX-NEXT: vpmovqd %zmm0, %ymm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
; NoVLX-NEXT: vpmovqd %zmm0, %ymm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vpinsrb $12, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vpinsrb $12, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
; NoVLX-NEXT: vpmovqd %zmm0, %ymm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vpinsrb $12, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm0, %xmm1, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
; NoVLX-NEXT: vpmovqd %zmm0, %ymm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
; NoVLX-NEXT: vpmovqd %zmm0, %ymm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vpinsrb $12, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vpinsrb $12, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
; NoVLX-NEXT: vpmovqd %zmm0, %ymm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vpinsrb $12, %eax, %xmm1, %xmm1
; NoVLX-NEXT: vpand %xmm0, %xmm1, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX: # %bb.0: # %entry
; NoVLX-NEXT: vcmpeqps %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <4 x float>
; NoVLX: # %bb.0: # %entry
; NoVLX-NEXT: vcmpeqps (%rdi), %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <4 x float>
; NoVLX-NEXT: vbroadcastss (%rdi), %xmm1
; NoVLX-NEXT: vcmpeqps %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <4 x float>
; NoVLX-NEXT: vcmpeqps %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vandps %xmm2, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vcmpeqps (%rsi), %xmm0, %xmm0
; NoVLX-NEXT: vandps %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vcmpeqps %xmm2, %xmm0, %xmm0
; NoVLX-NEXT: vandps %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX: # %bb.0: # %entry
; NoVLX-NEXT: vcmpeqps %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <4 x float>
; NoVLX: # %bb.0: # %entry
; NoVLX-NEXT: vcmpeqps (%rdi), %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <4 x float>
; NoVLX-NEXT: vbroadcastss (%rdi), %xmm1
; NoVLX-NEXT: vcmpeqps %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <4 x float>
; NoVLX-NEXT: vcmpeqps %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vandps %xmm2, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vcmpeqps (%rsi), %xmm0, %xmm0
; NoVLX-NEXT: vandps %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vcmpeqps %xmm2, %xmm0, %xmm0
; NoVLX-NEXT: vandps %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX: # %bb.0: # %entry
; NoVLX-NEXT: vcmpeqpd %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <2 x double>
; NoVLX: # %bb.0: # %entry
; NoVLX-NEXT: vcmpeqpd (%rdi), %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <2 x double>
; NoVLX-NEXT: vmovddup {{.*#+}} xmm1 = mem[0,0]
; NoVLX-NEXT: vcmpeqpd %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <2 x double>
; NoVLX-NEXT: vcmpeqpd %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vandpd %xmm2, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vcmpeqpd (%rsi), %xmm0, %xmm0
; NoVLX-NEXT: vandpd %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vcmpeqpd %xmm2, %xmm0, %xmm0
; NoVLX-NEXT: vandpd %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX: # %bb.0: # %entry
; NoVLX-NEXT: vcmpeqpd %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <2 x double>
; NoVLX: # %bb.0: # %entry
; NoVLX-NEXT: vcmpeqpd (%rdi), %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <2 x double>
; NoVLX-NEXT: vmovddup {{.*#+}} xmm1 = mem[0,0]
; NoVLX-NEXT: vcmpeqpd %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
-; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: retq
entry:
%0 = bitcast <2 x i64> %__a to <2 x double>
; NoVLX-NEXT: vcmpeqpd %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vandpd %xmm2, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vcmpeqpd (%rsi), %xmm0, %xmm0
; NoVLX-NEXT: vandpd %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vcmpeqpd %xmm2, %xmm0, %xmm0
; NoVLX-NEXT: vandpd %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm0, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k1
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vcmpeqpd %ymm1, %ymm0, %ymm0
; NoVLX-NEXT: vpmovqd %zmm0, %ymm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vcmpeqpd (%rdi), %ymm0, %ymm0
; NoVLX-NEXT: vpmovqd %zmm0, %ymm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vcmpeqpd %ymm1, %ymm0, %ymm0
; NoVLX-NEXT: vpmovqd %zmm0, %ymm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vpmovqd %zmm0, %ymm0
; NoVLX-NEXT: vpand %xmm2, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vpmovqd %zmm0, %ymm0
; NoVLX-NEXT: vpand %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vpmovqd %zmm0, %ymm0
; NoVLX-NEXT: vpand %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,8,2,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,8,3,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpsllq $63, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmq %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,1,2,8,4,5,6,7]
-; NoVLX-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpsllq $63, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmq %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %al killed %al killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vcmpeqpd %ymm1, %ymm0, %ymm0
; NoVLX-NEXT: vpmovqd %zmm0, %ymm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vcmpeqpd (%rdi), %ymm0, %ymm0
; NoVLX-NEXT: vpmovqd %zmm0, %ymm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vcmpeqpd %ymm1, %ymm0, %ymm0
; NoVLX-NEXT: vpmovqd %zmm0, %ymm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vpmovqd %zmm0, %ymm0
; NoVLX-NEXT: vpand %xmm2, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vpmovqd %zmm0, %ymm0
; NoVLX-NEXT: vpand %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
; NoVLX-NEXT: vzeroupper
; NoVLX-NEXT: vpmovqd %zmm0, %ymm0
; NoVLX-NEXT: vpand %xmm1, %xmm0, %xmm0
; NoVLX-NEXT: vpextrb $4, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kmovw %eax, %k0
; NoVLX-NEXT: vpextrb $0, %xmm0, %eax
; NoVLX-NEXT: andl $1, %eax
-; NoVLX-NEXT: kmovw %eax, %k0
-; NoVLX-NEXT: kxorw %k0, %k0, %k1
-; NoVLX-NEXT: kshiftrw $1, %k1, %k1
-; NoVLX-NEXT: kshiftlw $1, %k1, %k1
-; NoVLX-NEXT: korw %k0, %k1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm1, %zmm2, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
-; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm2, %zmm2, %zmm2 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm3 = [0,1,16,3,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm2, %zmm1, %zmm3
-; NoVLX-NEXT: vpslld $31, %zmm3, %zmm1
-; NoVLX-NEXT: vptestmd %zmm1, %zmm1, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1 {%k1} {z}
+; NoVLX-NEXT: kxorw %k0, %k0, %k2
+; NoVLX-NEXT: kshiftrw $1, %k2, %k2
+; NoVLX-NEXT: kshiftlw $1, %k2, %k2
+; NoVLX-NEXT: korw %k1, %k2, %k1
+; NoVLX-NEXT: kshiftrw $1, %k1, %k2
+; NoVLX-NEXT: kxorw %k0, %k2, %k0
+; NoVLX-NEXT: kshiftlw $15, %k0, %k0
+; NoVLX-NEXT: kshiftrw $14, %k0, %k0
+; NoVLX-NEXT: kxorw %k1, %k0, %k0
+; NoVLX-NEXT: kshiftrw $2, %k0, %k1
+; NoVLX-NEXT: vpextrb $8, %xmm0, %eax
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $13, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
+; NoVLX-NEXT: kshiftrw $3, %k0, %k1
; NoVLX-NEXT: vpextrb $12, %xmm0, %eax
-; NoVLX-NEXT: kmovw %eax, %k1
-; NoVLX-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
-; NoVLX-NEXT: vmovdqa32 {{.*#+}} zmm2 = [0,1,2,16,4,5,6,7,8,9,10,11,12,13,14,15]
-; NoVLX-NEXT: vpermi2d %zmm0, %zmm1, %zmm2
-; NoVLX-NEXT: vpslld $31, %zmm2, %zmm0
-; NoVLX-NEXT: vptestmd %zmm0, %zmm0, %k0
+; NoVLX-NEXT: kmovw %eax, %k2
+; NoVLX-NEXT: kxorw %k2, %k1, %k1
+; NoVLX-NEXT: kshiftlw $15, %k1, %k1
+; NoVLX-NEXT: kshiftrw $12, %k1, %k1
+; NoVLX-NEXT: kxorw %k0, %k1, %k0
; NoVLX-NEXT: kmovw %k0, %eax
; NoVLX-NEXT: # kill: def %ax killed %ax killed %eax
; NoVLX-NEXT: vzeroupper