brintos

brintos / llvm-project-archived public Read only

0
0
Text · 33.1 KiB · 9741972 Raw
575 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -mtriple=i686-unknown-unknown -mattr=+avx512vp2intersect,+avx512vl --show-mc-encoding | FileCheck %s --check-prefix=X863; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512vp2intersect,+avx512vl --show-mc-encoding | FileCheck %s --check-prefix=X644 5define void @test_mm256_2intersect_epi32(<4 x i64> %a, <4 x i64> %b, ptr nocapture %m0, ptr nocapture %m1) {6; X86-LABEL: test_mm256_2intersect_epi32:7; X86:       # %bb.0: # %entry8; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x04]9; X86-NEXT:    vp2intersectd %ymm1, %ymm0, %k0 # encoding: [0x62,0xf2,0x7f,0x28,0x68,0xc1]10; X86-NEXT:    kmovw %k1, %ecx # encoding: [0xc5,0xf8,0x93,0xc9]11; X86-NEXT:    kmovw %k0, %edx # encoding: [0xc5,0xf8,0x93,0xd0]12; X86-NEXT:    movb %dl, (%eax) # encoding: [0x88,0x10]13; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x08]14; X86-NEXT:    movb %cl, (%eax) # encoding: [0x88,0x08]15; X86-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]16; X86-NEXT:    retl # encoding: [0xc3]17;18; X64-LABEL: test_mm256_2intersect_epi32:19; X64:       # %bb.0: # %entry20; X64-NEXT:    vp2intersectd %ymm1, %ymm0, %k0 # encoding: [0x62,0xf2,0x7f,0x28,0x68,0xc1]21; X64-NEXT:    kmovw %k1, %eax # encoding: [0xc5,0xf8,0x93,0xc1]22; X64-NEXT:    kmovw %k0, %ecx # encoding: [0xc5,0xf8,0x93,0xc8]23; X64-NEXT:    movb %cl, (%rdi) # encoding: [0x88,0x0f]24; X64-NEXT:    movb %al, (%rsi) # encoding: [0x88,0x06]25; X64-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]26; X64-NEXT:    retq # encoding: [0xc3]27entry:28  %0 = bitcast <4 x i64> %a to <8 x i32>29  %1 = bitcast <4 x i64> %b to <8 x i32>30  %2 = tail call { <8 x i1>, <8 x i1> } @llvm.x86.avx512.vp2intersect.d.256(<8 x i32> %0, <8 x i32> %1)31  %3 = extractvalue { <8 x i1>, <8 x i1> } %2, 032  store <8 x i1> %3, ptr %m0, align 833  %4 = extractvalue { <8 x i1>, <8 x i1> } %2, 134  store <8 x i1> %4, ptr %m1, align 835  ret void36}37 38define void @test_mm256_2intersect_epi64(<4 x i64> %a, <4 x i64> %b, ptr nocapture %m0, ptr nocapture %m1) {39; X86-LABEL: test_mm256_2intersect_epi64:40; X86:       # %bb.0: # %entry41; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x08]42; X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx # encoding: [0x8b,0x4c,0x24,0x04]43; X86-NEXT:    vp2intersectq %ymm1, %ymm0, %k0 # encoding: [0x62,0xf2,0xff,0x28,0x68,0xc1]44; X86-NEXT:    kshiftlw $12, %k0, %k2 # encoding: [0xc4,0xe3,0xf9,0x32,0xd0,0x0c]45; X86-NEXT:    kshiftrw $12, %k2, %k2 # encoding: [0xc4,0xe3,0xf9,0x30,0xd2,0x0c]46; X86-NEXT:    kmovw %k2, %edx # encoding: [0xc5,0xf8,0x93,0xd2]47; X86-NEXT:    movb %dl, (%ecx) # encoding: [0x88,0x11]48; X86-NEXT:    kshiftlw $12, %k1, %k0 # encoding: [0xc4,0xe3,0xf9,0x32,0xc1,0x0c]49; X86-NEXT:    kshiftrw $12, %k0, %k0 # encoding: [0xc4,0xe3,0xf9,0x30,0xc0,0x0c]50; X86-NEXT:    kmovw %k0, %ecx # encoding: [0xc5,0xf8,0x93,0xc8]51; X86-NEXT:    movb %cl, (%eax) # encoding: [0x88,0x08]52; X86-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]53; X86-NEXT:    retl # encoding: [0xc3]54;55; X64-LABEL: test_mm256_2intersect_epi64:56; X64:       # %bb.0: # %entry57; X64-NEXT:    vp2intersectq %ymm1, %ymm0, %k0 # encoding: [0x62,0xf2,0xff,0x28,0x68,0xc1]58; X64-NEXT:    kshiftlw $12, %k0, %k2 # encoding: [0xc4,0xe3,0xf9,0x32,0xd0,0x0c]59; X64-NEXT:    kshiftrw $12, %k2, %k2 # encoding: [0xc4,0xe3,0xf9,0x30,0xd2,0x0c]60; X64-NEXT:    kmovw %k2, %eax # encoding: [0xc5,0xf8,0x93,0xc2]61; X64-NEXT:    movb %al, (%rdi) # encoding: [0x88,0x07]62; X64-NEXT:    kshiftlw $12, %k1, %k0 # encoding: [0xc4,0xe3,0xf9,0x32,0xc1,0x0c]63; X64-NEXT:    kshiftrw $12, %k0, %k0 # encoding: [0xc4,0xe3,0xf9,0x30,0xc0,0x0c]64; X64-NEXT:    kmovw %k0, %eax # encoding: [0xc5,0xf8,0x93,0xc0]65; X64-NEXT:    movb %al, (%rsi) # encoding: [0x88,0x06]66; X64-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]67; X64-NEXT:    retq # encoding: [0xc3]68entry:69  %0 = tail call { <4 x i1>, <4 x i1> } @llvm.x86.avx512.vp2intersect.q.256(<4 x i64> %a, <4 x i64> %b)70  %1 = extractvalue { <4 x i1>, <4 x i1> } %0, 071  %2 = shufflevector <4 x i1> %1, <4 x i1> zeroinitializer, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>72  %3 = bitcast <8 x i1> %2 to i873  store i8 %3, ptr %m0, align 174  %4 = extractvalue { <4 x i1>, <4 x i1> } %0, 175  %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>76  %6 = bitcast <8 x i1> %5 to i877  store i8 %6, ptr %m1, align 178  ret void79}80 81define void @test_mm256_2intersect_epi32_p(ptr nocapture readonly %a, ptr nocapture readonly %b, ptr nocapture %m0, ptr nocapture %m1) {82; X86-LABEL: test_mm256_2intersect_epi32_p:83; X86:       # %bb.0: # %entry84; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x0c]85; X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx # encoding: [0x8b,0x4c,0x24,0x08]86; X86-NEXT:    movl {{[0-9]+}}(%esp), %edx # encoding: [0x8b,0x54,0x24,0x04]87; X86-NEXT:    vmovdqa (%edx), %ymm0 # EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0x02]88; X86-NEXT:    vp2intersectd (%ecx), %ymm0, %k0 # encoding: [0x62,0xf2,0x7f,0x28,0x68,0x01]89; X86-NEXT:    kmovw %k1, %ecx # encoding: [0xc5,0xf8,0x93,0xc9]90; X86-NEXT:    kmovw %k0, %edx # encoding: [0xc5,0xf8,0x93,0xd0]91; X86-NEXT:    movb %dl, (%eax) # encoding: [0x88,0x10]92; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x10]93; X86-NEXT:    movb %cl, (%eax) # encoding: [0x88,0x08]94; X86-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]95; X86-NEXT:    retl # encoding: [0xc3]96;97; X64-LABEL: test_mm256_2intersect_epi32_p:98; X64:       # %bb.0: # %entry99; X64-NEXT:    vmovdqa (%rdi), %ymm0 # EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0x07]100; X64-NEXT:    vp2intersectd (%rsi), %ymm0, %k0 # encoding: [0x62,0xf2,0x7f,0x28,0x68,0x06]101; X64-NEXT:    kmovw %k1, %eax # encoding: [0xc5,0xf8,0x93,0xc1]102; X64-NEXT:    kmovw %k0, %esi # encoding: [0xc5,0xf8,0x93,0xf0]103; X64-NEXT:    movb %sil, (%rdx) # encoding: [0x40,0x88,0x32]104; X64-NEXT:    movb %al, (%rcx) # encoding: [0x88,0x01]105; X64-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]106; X64-NEXT:    retq # encoding: [0xc3]107entry:108  %0 = load <8 x i32>, ptr %a, align 32109  %1 = load <8 x i32>, ptr %b, align 32110  %2 = tail call { <8 x i1>, <8 x i1> } @llvm.x86.avx512.vp2intersect.d.256(<8 x i32> %0, <8 x i32> %1)111  %3 = extractvalue { <8 x i1>, <8 x i1> } %2, 0112  store <8 x i1> %3, ptr %m0, align 8113  %4 = extractvalue { <8 x i1>, <8 x i1> } %2, 1114  store <8 x i1> %4, ptr %m1, align 8115  ret void116}117 118define void @test_mm256_2intersect_epi64_p(ptr nocapture readonly %a, ptr nocapture readonly %b, ptr nocapture %m0, ptr nocapture %m1) {119; X86-LABEL: test_mm256_2intersect_epi64_p:120; X86:       # %bb.0: # %entry121; X86-NEXT:    pushl %esi # encoding: [0x56]122; X86-NEXT:    .cfi_def_cfa_offset 8123; X86-NEXT:    .cfi_offset %esi, -8124; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x14]125; X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx # encoding: [0x8b,0x4c,0x24,0x10]126; X86-NEXT:    movl {{[0-9]+}}(%esp), %edx # encoding: [0x8b,0x54,0x24,0x0c]127; X86-NEXT:    movl {{[0-9]+}}(%esp), %esi # encoding: [0x8b,0x74,0x24,0x08]128; X86-NEXT:    vmovdqa (%esi), %ymm0 # EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0x06]129; X86-NEXT:    vp2intersectq (%edx), %ymm0, %k0 # encoding: [0x62,0xf2,0xff,0x28,0x68,0x02]130; X86-NEXT:    kshiftlw $12, %k0, %k2 # encoding: [0xc4,0xe3,0xf9,0x32,0xd0,0x0c]131; X86-NEXT:    kshiftrw $12, %k2, %k2 # encoding: [0xc4,0xe3,0xf9,0x30,0xd2,0x0c]132; X86-NEXT:    kmovw %k2, %edx # encoding: [0xc5,0xf8,0x93,0xd2]133; X86-NEXT:    movb %dl, (%ecx) # encoding: [0x88,0x11]134; X86-NEXT:    kshiftlw $12, %k1, %k0 # encoding: [0xc4,0xe3,0xf9,0x32,0xc1,0x0c]135; X86-NEXT:    kshiftrw $12, %k0, %k0 # encoding: [0xc4,0xe3,0xf9,0x30,0xc0,0x0c]136; X86-NEXT:    kmovw %k0, %ecx # encoding: [0xc5,0xf8,0x93,0xc8]137; X86-NEXT:    movb %cl, (%eax) # encoding: [0x88,0x08]138; X86-NEXT:    popl %esi # encoding: [0x5e]139; X86-NEXT:    .cfi_def_cfa_offset 4140; X86-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]141; X86-NEXT:    retl # encoding: [0xc3]142;143; X64-LABEL: test_mm256_2intersect_epi64_p:144; X64:       # %bb.0: # %entry145; X64-NEXT:    vmovdqa (%rdi), %ymm0 # EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0x07]146; X64-NEXT:    vp2intersectq (%rsi), %ymm0, %k0 # encoding: [0x62,0xf2,0xff,0x28,0x68,0x06]147; X64-NEXT:    kshiftlw $12, %k0, %k2 # encoding: [0xc4,0xe3,0xf9,0x32,0xd0,0x0c]148; X64-NEXT:    kshiftrw $12, %k2, %k2 # encoding: [0xc4,0xe3,0xf9,0x30,0xd2,0x0c]149; X64-NEXT:    kmovw %k2, %eax # encoding: [0xc5,0xf8,0x93,0xc2]150; X64-NEXT:    movb %al, (%rdx) # encoding: [0x88,0x02]151; X64-NEXT:    kshiftlw $12, %k1, %k0 # encoding: [0xc4,0xe3,0xf9,0x32,0xc1,0x0c]152; X64-NEXT:    kshiftrw $12, %k0, %k0 # encoding: [0xc4,0xe3,0xf9,0x30,0xc0,0x0c]153; X64-NEXT:    kmovw %k0, %eax # encoding: [0xc5,0xf8,0x93,0xc0]154; X64-NEXT:    movb %al, (%rcx) # encoding: [0x88,0x01]155; X64-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]156; X64-NEXT:    retq # encoding: [0xc3]157entry:158  %0 = load <4 x i64>, ptr %a, align 32159  %1 = load <4 x i64>, ptr %b, align 32160  %2 = tail call { <4 x i1>, <4 x i1> } @llvm.x86.avx512.vp2intersect.q.256(<4 x i64> %0, <4 x i64> %1)161  %3 = extractvalue { <4 x i1>, <4 x i1> } %2, 0162  %4 = shufflevector <4 x i1> %3, <4 x i1> zeroinitializer, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>163  %5 = bitcast <8 x i1> %4 to i8164  store i8 %5, ptr %m0, align 1165  %6 = extractvalue { <4 x i1>, <4 x i1> } %2, 1166  %7 = shufflevector <4 x i1> %6, <4 x i1> zeroinitializer, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>167  %8 = bitcast <8 x i1> %7 to i8168  store i8 %8, ptr %m1, align 1169  ret void170}171 172define void @test_mm256_2intersect_epi32_b(ptr nocapture readonly %a, ptr nocapture readonly %b, ptr nocapture %m0, ptr nocapture %m1) {173; X86-LABEL: test_mm256_2intersect_epi32_b:174; X86:       # %bb.0: # %entry175; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x0c]176; X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx # encoding: [0x8b,0x4c,0x24,0x08]177; X86-NEXT:    movl {{[0-9]+}}(%esp), %edx # encoding: [0x8b,0x54,0x24,0x04]178; X86-NEXT:    vpbroadcastd (%edx), %ymm0 # EVEX TO VEX Compression encoding: [0xc4,0xe2,0x7d,0x58,0x02]179; X86-NEXT:    vp2intersectd (%ecx){1to8}, %ymm0, %k0 # encoding: [0x62,0xf2,0x7f,0x38,0x68,0x01]180; X86-NEXT:    kmovw %k1, %ecx # encoding: [0xc5,0xf8,0x93,0xc9]181; X86-NEXT:    kmovw %k0, %edx # encoding: [0xc5,0xf8,0x93,0xd0]182; X86-NEXT:    movb %dl, (%eax) # encoding: [0x88,0x10]183; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x10]184; X86-NEXT:    movb %cl, (%eax) # encoding: [0x88,0x08]185; X86-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]186; X86-NEXT:    retl # encoding: [0xc3]187;188; X64-LABEL: test_mm256_2intersect_epi32_b:189; X64:       # %bb.0: # %entry190; X64-NEXT:    vpbroadcastd (%rdi), %ymm0 # EVEX TO VEX Compression encoding: [0xc4,0xe2,0x7d,0x58,0x07]191; X64-NEXT:    vp2intersectd (%rsi){1to8}, %ymm0, %k0 # encoding: [0x62,0xf2,0x7f,0x38,0x68,0x06]192; X64-NEXT:    kmovw %k1, %eax # encoding: [0xc5,0xf8,0x93,0xc1]193; X64-NEXT:    kmovw %k0, %esi # encoding: [0xc5,0xf8,0x93,0xf0]194; X64-NEXT:    movb %sil, (%rdx) # encoding: [0x40,0x88,0x32]195; X64-NEXT:    movb %al, (%rcx) # encoding: [0x88,0x01]196; X64-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]197; X64-NEXT:    retq # encoding: [0xc3]198entry:199  %0 = load i32, ptr %a, align 4200  %vecinit.i.i = insertelement <8 x i32> undef, i32 %0, i32 0201  %vecinit7.i.i = shufflevector <8 x i32> %vecinit.i.i, <8 x i32> undef, <8 x i32> zeroinitializer202  %1 = load i32, ptr %b, align 4203  %vecinit.i.i2 = insertelement <8 x i32> undef, i32 %1, i32 0204  %vecinit7.i.i3 = shufflevector <8 x i32> %vecinit.i.i2, <8 x i32> undef, <8 x i32> zeroinitializer205  %2 = tail call { <8 x i1>, <8 x i1> } @llvm.x86.avx512.vp2intersect.d.256(<8 x i32> %vecinit7.i.i, <8 x i32> %vecinit7.i.i3)206  %3 = extractvalue { <8 x i1>, <8 x i1> } %2, 0207  store <8 x i1> %3, ptr %m0, align 8208  %4 = extractvalue { <8 x i1>, <8 x i1> } %2, 1209  store <8 x i1> %4, ptr %m1, align 8210  ret void211}212 213define void @test_mm256_2intersect_epi64_b(ptr nocapture readonly %a, ptr nocapture readonly %b, ptr nocapture %m0, ptr nocapture %m1) {214; X86-LABEL: test_mm256_2intersect_epi64_b:215; X86:       # %bb.0: # %entry216; X86-NEXT:    pushl %esi # encoding: [0x56]217; X86-NEXT:    .cfi_def_cfa_offset 8218; X86-NEXT:    .cfi_offset %esi, -8219; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x14]220; X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx # encoding: [0x8b,0x4c,0x24,0x10]221; X86-NEXT:    movl {{[0-9]+}}(%esp), %edx # encoding: [0x8b,0x54,0x24,0x0c]222; X86-NEXT:    movl {{[0-9]+}}(%esp), %esi # encoding: [0x8b,0x74,0x24,0x08]223; X86-NEXT:    vpbroadcastq (%esi), %ymm0 # EVEX TO VEX Compression encoding: [0xc4,0xe2,0x7d,0x59,0x06]224; X86-NEXT:    vp2intersectq (%edx){1to4}, %ymm0, %k0 # encoding: [0x62,0xf2,0xff,0x38,0x68,0x02]225; X86-NEXT:    kshiftlw $12, %k0, %k2 # encoding: [0xc4,0xe3,0xf9,0x32,0xd0,0x0c]226; X86-NEXT:    kshiftrw $12, %k2, %k2 # encoding: [0xc4,0xe3,0xf9,0x30,0xd2,0x0c]227; X86-NEXT:    kmovw %k2, %edx # encoding: [0xc5,0xf8,0x93,0xd2]228; X86-NEXT:    movb %dl, (%ecx) # encoding: [0x88,0x11]229; X86-NEXT:    kshiftlw $12, %k1, %k0 # encoding: [0xc4,0xe3,0xf9,0x32,0xc1,0x0c]230; X86-NEXT:    kshiftrw $12, %k0, %k0 # encoding: [0xc4,0xe3,0xf9,0x30,0xc0,0x0c]231; X86-NEXT:    kmovw %k0, %ecx # encoding: [0xc5,0xf8,0x93,0xc8]232; X86-NEXT:    movb %cl, (%eax) # encoding: [0x88,0x08]233; X86-NEXT:    popl %esi # encoding: [0x5e]234; X86-NEXT:    .cfi_def_cfa_offset 4235; X86-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]236; X86-NEXT:    retl # encoding: [0xc3]237;238; X64-LABEL: test_mm256_2intersect_epi64_b:239; X64:       # %bb.0: # %entry240; X64-NEXT:    vpbroadcastq (%rdi), %ymm0 # EVEX TO VEX Compression encoding: [0xc4,0xe2,0x7d,0x59,0x07]241; X64-NEXT:    vp2intersectq (%rsi){1to4}, %ymm0, %k0 # encoding: [0x62,0xf2,0xff,0x38,0x68,0x06]242; X64-NEXT:    kshiftlw $12, %k0, %k2 # encoding: [0xc4,0xe3,0xf9,0x32,0xd0,0x0c]243; X64-NEXT:    kshiftrw $12, %k2, %k2 # encoding: [0xc4,0xe3,0xf9,0x30,0xd2,0x0c]244; X64-NEXT:    kmovw %k2, %eax # encoding: [0xc5,0xf8,0x93,0xc2]245; X64-NEXT:    movb %al, (%rdx) # encoding: [0x88,0x02]246; X64-NEXT:    kshiftlw $12, %k1, %k0 # encoding: [0xc4,0xe3,0xf9,0x32,0xc1,0x0c]247; X64-NEXT:    kshiftrw $12, %k0, %k0 # encoding: [0xc4,0xe3,0xf9,0x30,0xc0,0x0c]248; X64-NEXT:    kmovw %k0, %eax # encoding: [0xc5,0xf8,0x93,0xc0]249; X64-NEXT:    movb %al, (%rcx) # encoding: [0x88,0x01]250; X64-NEXT:    vzeroupper # encoding: [0xc5,0xf8,0x77]251; X64-NEXT:    retq # encoding: [0xc3]252entry:253  %0 = load i64, ptr %a, align 8254  %vecinit.i.i = insertelement <4 x i64> undef, i64 %0, i32 0255  %vecinit3.i.i = shufflevector <4 x i64> %vecinit.i.i, <4 x i64> undef, <4 x i32> zeroinitializer256  %1 = load i64, ptr %b, align 8257  %vecinit.i.i2 = insertelement <4 x i64> undef, i64 %1, i32 0258  %vecinit3.i.i3 = shufflevector <4 x i64> %vecinit.i.i2, <4 x i64> undef, <4 x i32> zeroinitializer259  %2 = tail call { <4 x i1>, <4 x i1> } @llvm.x86.avx512.vp2intersect.q.256(<4 x i64> %vecinit3.i.i, <4 x i64> %vecinit3.i.i3)260  %3 = extractvalue { <4 x i1>, <4 x i1> } %2, 0261  %4 = shufflevector <4 x i1> %3, <4 x i1> zeroinitializer, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>262  %5 = bitcast <8 x i1> %4 to i8263  store i8 %5, ptr %m0, align 1264  %6 = extractvalue { <4 x i1>, <4 x i1> } %2, 1265  %7 = shufflevector <4 x i1> %6, <4 x i1> zeroinitializer, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>266  %8 = bitcast <8 x i1> %7 to i8267  store i8 %8, ptr %m1, align 1268  ret void269}270 271define void @test_mm_2intersect_epi32(<2 x i64> %a, <2 x i64> %b, ptr nocapture %m0, ptr nocapture %m1) {272; X86-LABEL: test_mm_2intersect_epi32:273; X86:       # %bb.0: # %entry274; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x08]275; X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx # encoding: [0x8b,0x4c,0x24,0x04]276; X86-NEXT:    vp2intersectd %xmm1, %xmm0, %k0 # encoding: [0x62,0xf2,0x7f,0x08,0x68,0xc1]277; X86-NEXT:    kshiftlw $12, %k0, %k2 # encoding: [0xc4,0xe3,0xf9,0x32,0xd0,0x0c]278; X86-NEXT:    kshiftrw $12, %k2, %k2 # encoding: [0xc4,0xe3,0xf9,0x30,0xd2,0x0c]279; X86-NEXT:    kmovw %k2, %edx # encoding: [0xc5,0xf8,0x93,0xd2]280; X86-NEXT:    movb %dl, (%ecx) # encoding: [0x88,0x11]281; X86-NEXT:    kshiftlw $12, %k1, %k0 # encoding: [0xc4,0xe3,0xf9,0x32,0xc1,0x0c]282; X86-NEXT:    kshiftrw $12, %k0, %k0 # encoding: [0xc4,0xe3,0xf9,0x30,0xc0,0x0c]283; X86-NEXT:    kmovw %k0, %ecx # encoding: [0xc5,0xf8,0x93,0xc8]284; X86-NEXT:    movb %cl, (%eax) # encoding: [0x88,0x08]285; X86-NEXT:    retl # encoding: [0xc3]286;287; X64-LABEL: test_mm_2intersect_epi32:288; X64:       # %bb.0: # %entry289; X64-NEXT:    vp2intersectd %xmm1, %xmm0, %k0 # encoding: [0x62,0xf2,0x7f,0x08,0x68,0xc1]290; X64-NEXT:    kshiftlw $12, %k0, %k2 # encoding: [0xc4,0xe3,0xf9,0x32,0xd0,0x0c]291; X64-NEXT:    kshiftrw $12, %k2, %k2 # encoding: [0xc4,0xe3,0xf9,0x30,0xd2,0x0c]292; X64-NEXT:    kmovw %k2, %eax # encoding: [0xc5,0xf8,0x93,0xc2]293; X64-NEXT:    movb %al, (%rdi) # encoding: [0x88,0x07]294; X64-NEXT:    kshiftlw $12, %k1, %k0 # encoding: [0xc4,0xe3,0xf9,0x32,0xc1,0x0c]295; X64-NEXT:    kshiftrw $12, %k0, %k0 # encoding: [0xc4,0xe3,0xf9,0x30,0xc0,0x0c]296; X64-NEXT:    kmovw %k0, %eax # encoding: [0xc5,0xf8,0x93,0xc0]297; X64-NEXT:    movb %al, (%rsi) # encoding: [0x88,0x06]298; X64-NEXT:    retq # encoding: [0xc3]299entry:300  %0 = bitcast <2 x i64> %a to <4 x i32>301  %1 = bitcast <2 x i64> %b to <4 x i32>302  %2 = tail call { <4 x i1>, <4 x i1> } @llvm.x86.avx512.vp2intersect.d.128(<4 x i32> %0, <4 x i32> %1)303  %3 = extractvalue { <4 x i1>, <4 x i1> } %2, 0304  %4 = shufflevector <4 x i1> %3, <4 x i1> zeroinitializer, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>305  %5 = bitcast <8 x i1> %4 to i8306  store i8 %5, ptr %m0, align 1307  %6 = extractvalue { <4 x i1>, <4 x i1> } %2, 1308  %7 = shufflevector <4 x i1> %6, <4 x i1> zeroinitializer, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>309  %8 = bitcast <8 x i1> %7 to i8310  store i8 %8, ptr %m1, align 1311  ret void312}313 314define void @test_mm_2intersect_epi64(<2 x i64> %a, <2 x i64> %b, ptr nocapture %m0, ptr nocapture %m1) {315; X86-LABEL: test_mm_2intersect_epi64:316; X86:       # %bb.0: # %entry317; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x08]318; X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx # encoding: [0x8b,0x4c,0x24,0x04]319; X86-NEXT:    vp2intersectq %xmm1, %xmm0, %k0 # encoding: [0x62,0xf2,0xff,0x08,0x68,0xc1]320; X86-NEXT:    kshiftlw $14, %k0, %k2 # encoding: [0xc4,0xe3,0xf9,0x32,0xd0,0x0e]321; X86-NEXT:    kshiftrw $14, %k2, %k2 # encoding: [0xc4,0xe3,0xf9,0x30,0xd2,0x0e]322; X86-NEXT:    kmovw %k2, %edx # encoding: [0xc5,0xf8,0x93,0xd2]323; X86-NEXT:    movb %dl, (%ecx) # encoding: [0x88,0x11]324; X86-NEXT:    kshiftlw $14, %k1, %k0 # encoding: [0xc4,0xe3,0xf9,0x32,0xc1,0x0e]325; X86-NEXT:    kshiftrw $14, %k0, %k0 # encoding: [0xc4,0xe3,0xf9,0x30,0xc0,0x0e]326; X86-NEXT:    kmovw %k0, %ecx # encoding: [0xc5,0xf8,0x93,0xc8]327; X86-NEXT:    movb %cl, (%eax) # encoding: [0x88,0x08]328; X86-NEXT:    retl # encoding: [0xc3]329;330; X64-LABEL: test_mm_2intersect_epi64:331; X64:       # %bb.0: # %entry332; X64-NEXT:    vp2intersectq %xmm1, %xmm0, %k0 # encoding: [0x62,0xf2,0xff,0x08,0x68,0xc1]333; X64-NEXT:    kshiftlw $14, %k0, %k2 # encoding: [0xc4,0xe3,0xf9,0x32,0xd0,0x0e]334; X64-NEXT:    kshiftrw $14, %k2, %k2 # encoding: [0xc4,0xe3,0xf9,0x30,0xd2,0x0e]335; X64-NEXT:    kmovw %k2, %eax # encoding: [0xc5,0xf8,0x93,0xc2]336; X64-NEXT:    movb %al, (%rdi) # encoding: [0x88,0x07]337; X64-NEXT:    kshiftlw $14, %k1, %k0 # encoding: [0xc4,0xe3,0xf9,0x32,0xc1,0x0e]338; X64-NEXT:    kshiftrw $14, %k0, %k0 # encoding: [0xc4,0xe3,0xf9,0x30,0xc0,0x0e]339; X64-NEXT:    kmovw %k0, %eax # encoding: [0xc5,0xf8,0x93,0xc0]340; X64-NEXT:    movb %al, (%rsi) # encoding: [0x88,0x06]341; X64-NEXT:    retq # encoding: [0xc3]342entry:343  %0 = tail call { <2 x i1>, <2 x i1> } @llvm.x86.avx512.vp2intersect.q.128(<2 x i64> %a, <2 x i64> %b)344  %1 = extractvalue { <2 x i1>, <2 x i1> } %0, 0345  %2 = shufflevector <2 x i1> %1, <2 x i1> zeroinitializer, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 2, i32 3, i32 2, i32 3>346  %3 = bitcast <8 x i1> %2 to i8347  store i8 %3, ptr %m0, align 1348  %4 = extractvalue { <2 x i1>, <2 x i1> } %0, 1349  %5 = shufflevector <2 x i1> %4, <2 x i1> zeroinitializer, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 2, i32 3, i32 2, i32 3>350  %6 = bitcast <8 x i1> %5 to i8351  store i8 %6, ptr %m1, align 1352  ret void353}354 355define void @test_mm_2intersect_epi32_p(ptr nocapture readonly %a, ptr nocapture readonly %b, ptr nocapture %m0, ptr nocapture %m1) {356; X86-LABEL: test_mm_2intersect_epi32_p:357; X86:       # %bb.0: # %entry358; X86-NEXT:    pushl %esi # encoding: [0x56]359; X86-NEXT:    .cfi_def_cfa_offset 8360; X86-NEXT:    .cfi_offset %esi, -8361; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x14]362; X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx # encoding: [0x8b,0x4c,0x24,0x10]363; X86-NEXT:    movl {{[0-9]+}}(%esp), %edx # encoding: [0x8b,0x54,0x24,0x0c]364; X86-NEXT:    movl {{[0-9]+}}(%esp), %esi # encoding: [0x8b,0x74,0x24,0x08]365; X86-NEXT:    vmovdqa (%esi), %xmm0 # EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0x06]366; X86-NEXT:    vp2intersectd (%edx), %xmm0, %k0 # encoding: [0x62,0xf2,0x7f,0x08,0x68,0x02]367; X86-NEXT:    kshiftlw $12, %k0, %k2 # encoding: [0xc4,0xe3,0xf9,0x32,0xd0,0x0c]368; X86-NEXT:    kshiftrw $12, %k2, %k2 # encoding: [0xc4,0xe3,0xf9,0x30,0xd2,0x0c]369; X86-NEXT:    kmovw %k2, %edx # encoding: [0xc5,0xf8,0x93,0xd2]370; X86-NEXT:    movb %dl, (%ecx) # encoding: [0x88,0x11]371; X86-NEXT:    kshiftlw $12, %k1, %k0 # encoding: [0xc4,0xe3,0xf9,0x32,0xc1,0x0c]372; X86-NEXT:    kshiftrw $12, %k0, %k0 # encoding: [0xc4,0xe3,0xf9,0x30,0xc0,0x0c]373; X86-NEXT:    kmovw %k0, %ecx # encoding: [0xc5,0xf8,0x93,0xc8]374; X86-NEXT:    movb %cl, (%eax) # encoding: [0x88,0x08]375; X86-NEXT:    popl %esi # encoding: [0x5e]376; X86-NEXT:    .cfi_def_cfa_offset 4377; X86-NEXT:    retl # encoding: [0xc3]378;379; X64-LABEL: test_mm_2intersect_epi32_p:380; X64:       # %bb.0: # %entry381; X64-NEXT:    vmovdqa (%rdi), %xmm0 # EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0x07]382; X64-NEXT:    vp2intersectd (%rsi), %xmm0, %k0 # encoding: [0x62,0xf2,0x7f,0x08,0x68,0x06]383; X64-NEXT:    kshiftlw $12, %k0, %k2 # encoding: [0xc4,0xe3,0xf9,0x32,0xd0,0x0c]384; X64-NEXT:    kshiftrw $12, %k2, %k2 # encoding: [0xc4,0xe3,0xf9,0x30,0xd2,0x0c]385; X64-NEXT:    kmovw %k2, %eax # encoding: [0xc5,0xf8,0x93,0xc2]386; X64-NEXT:    movb %al, (%rdx) # encoding: [0x88,0x02]387; X64-NEXT:    kshiftlw $12, %k1, %k0 # encoding: [0xc4,0xe3,0xf9,0x32,0xc1,0x0c]388; X64-NEXT:    kshiftrw $12, %k0, %k0 # encoding: [0xc4,0xe3,0xf9,0x30,0xc0,0x0c]389; X64-NEXT:    kmovw %k0, %eax # encoding: [0xc5,0xf8,0x93,0xc0]390; X64-NEXT:    movb %al, (%rcx) # encoding: [0x88,0x01]391; X64-NEXT:    retq # encoding: [0xc3]392entry:393  %0 = load <4 x i32>, ptr %a, align 16394  %1 = load <4 x i32>, ptr %b, align 16395  %2 = tail call { <4 x i1>, <4 x i1> } @llvm.x86.avx512.vp2intersect.d.128(<4 x i32> %0, <4 x i32> %1)396  %3 = extractvalue { <4 x i1>, <4 x i1> } %2, 0397  %4 = shufflevector <4 x i1> %3, <4 x i1> zeroinitializer, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>398  %5 = bitcast <8 x i1> %4 to i8399  store i8 %5, ptr %m0, align 1400  %6 = extractvalue { <4 x i1>, <4 x i1> } %2, 1401  %7 = shufflevector <4 x i1> %6, <4 x i1> zeroinitializer, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>402  %8 = bitcast <8 x i1> %7 to i8403  store i8 %8, ptr %m1, align 1404  ret void405}406 407define void @test_mm_2intersect_epi64_p(ptr nocapture readonly %a, ptr nocapture readonly %b, ptr nocapture %m0, ptr nocapture %m1) {408; X86-LABEL: test_mm_2intersect_epi64_p:409; X86:       # %bb.0: # %entry410; X86-NEXT:    pushl %esi # encoding: [0x56]411; X86-NEXT:    .cfi_def_cfa_offset 8412; X86-NEXT:    .cfi_offset %esi, -8413; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x14]414; X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx # encoding: [0x8b,0x4c,0x24,0x10]415; X86-NEXT:    movl {{[0-9]+}}(%esp), %edx # encoding: [0x8b,0x54,0x24,0x0c]416; X86-NEXT:    movl {{[0-9]+}}(%esp), %esi # encoding: [0x8b,0x74,0x24,0x08]417; X86-NEXT:    vmovdqa (%esi), %xmm0 # EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0x06]418; X86-NEXT:    vp2intersectq (%edx), %xmm0, %k0 # encoding: [0x62,0xf2,0xff,0x08,0x68,0x02]419; X86-NEXT:    kshiftlw $14, %k0, %k2 # encoding: [0xc4,0xe3,0xf9,0x32,0xd0,0x0e]420; X86-NEXT:    kshiftrw $14, %k2, %k2 # encoding: [0xc4,0xe3,0xf9,0x30,0xd2,0x0e]421; X86-NEXT:    kmovw %k2, %edx # encoding: [0xc5,0xf8,0x93,0xd2]422; X86-NEXT:    movb %dl, (%ecx) # encoding: [0x88,0x11]423; X86-NEXT:    kshiftlw $14, %k1, %k0 # encoding: [0xc4,0xe3,0xf9,0x32,0xc1,0x0e]424; X86-NEXT:    kshiftrw $14, %k0, %k0 # encoding: [0xc4,0xe3,0xf9,0x30,0xc0,0x0e]425; X86-NEXT:    kmovw %k0, %ecx # encoding: [0xc5,0xf8,0x93,0xc8]426; X86-NEXT:    movb %cl, (%eax) # encoding: [0x88,0x08]427; X86-NEXT:    popl %esi # encoding: [0x5e]428; X86-NEXT:    .cfi_def_cfa_offset 4429; X86-NEXT:    retl # encoding: [0xc3]430;431; X64-LABEL: test_mm_2intersect_epi64_p:432; X64:       # %bb.0: # %entry433; X64-NEXT:    vmovdqa (%rdi), %xmm0 # EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0x07]434; X64-NEXT:    vp2intersectq (%rsi), %xmm0, %k0 # encoding: [0x62,0xf2,0xff,0x08,0x68,0x06]435; X64-NEXT:    kshiftlw $14, %k0, %k2 # encoding: [0xc4,0xe3,0xf9,0x32,0xd0,0x0e]436; X64-NEXT:    kshiftrw $14, %k2, %k2 # encoding: [0xc4,0xe3,0xf9,0x30,0xd2,0x0e]437; X64-NEXT:    kmovw %k2, %eax # encoding: [0xc5,0xf8,0x93,0xc2]438; X64-NEXT:    movb %al, (%rdx) # encoding: [0x88,0x02]439; X64-NEXT:    kshiftlw $14, %k1, %k0 # encoding: [0xc4,0xe3,0xf9,0x32,0xc1,0x0e]440; X64-NEXT:    kshiftrw $14, %k0, %k0 # encoding: [0xc4,0xe3,0xf9,0x30,0xc0,0x0e]441; X64-NEXT:    kmovw %k0, %eax # encoding: [0xc5,0xf8,0x93,0xc0]442; X64-NEXT:    movb %al, (%rcx) # encoding: [0x88,0x01]443; X64-NEXT:    retq # encoding: [0xc3]444entry:445  %0 = load <2 x i64>, ptr %a, align 16446  %1 = load <2 x i64>, ptr %b, align 16447  %2 = tail call { <2 x i1>, <2 x i1> } @llvm.x86.avx512.vp2intersect.q.128(<2 x i64> %0, <2 x i64> %1)448  %3 = extractvalue { <2 x i1>, <2 x i1> } %2, 0449  %4 = shufflevector <2 x i1> %3, <2 x i1> zeroinitializer, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 2, i32 3, i32 2, i32 3>450  %5 = bitcast <8 x i1> %4 to i8451  store i8 %5, ptr %m0, align 1452  %6 = extractvalue { <2 x i1>, <2 x i1> } %2, 1453  %7 = shufflevector <2 x i1> %6, <2 x i1> zeroinitializer, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 2, i32 3, i32 2, i32 3>454  %8 = bitcast <8 x i1> %7 to i8455  store i8 %8, ptr %m1, align 1456  ret void457}458 459define void @test_mm_2intersect_epi32_b(ptr nocapture readonly %a, ptr nocapture readonly %b, ptr nocapture %m0, ptr nocapture %m1) {460; X86-LABEL: test_mm_2intersect_epi32_b:461; X86:       # %bb.0: # %entry462; X86-NEXT:    pushl %esi # encoding: [0x56]463; X86-NEXT:    .cfi_def_cfa_offset 8464; X86-NEXT:    .cfi_offset %esi, -8465; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x14]466; X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx # encoding: [0x8b,0x4c,0x24,0x10]467; X86-NEXT:    movl {{[0-9]+}}(%esp), %edx # encoding: [0x8b,0x54,0x24,0x0c]468; X86-NEXT:    movl {{[0-9]+}}(%esp), %esi # encoding: [0x8b,0x74,0x24,0x08]469; X86-NEXT:    vpbroadcastd (%esi), %xmm0 # EVEX TO VEX Compression encoding: [0xc4,0xe2,0x79,0x58,0x06]470; X86-NEXT:    vp2intersectd (%edx){1to4}, %xmm0, %k0 # encoding: [0x62,0xf2,0x7f,0x18,0x68,0x02]471; X86-NEXT:    kshiftlw $12, %k0, %k2 # encoding: [0xc4,0xe3,0xf9,0x32,0xd0,0x0c]472; X86-NEXT:    kshiftrw $12, %k2, %k2 # encoding: [0xc4,0xe3,0xf9,0x30,0xd2,0x0c]473; X86-NEXT:    kmovw %k2, %edx # encoding: [0xc5,0xf8,0x93,0xd2]474; X86-NEXT:    movb %dl, (%ecx) # encoding: [0x88,0x11]475; X86-NEXT:    kshiftlw $12, %k1, %k0 # encoding: [0xc4,0xe3,0xf9,0x32,0xc1,0x0c]476; X86-NEXT:    kshiftrw $12, %k0, %k0 # encoding: [0xc4,0xe3,0xf9,0x30,0xc0,0x0c]477; X86-NEXT:    kmovw %k0, %ecx # encoding: [0xc5,0xf8,0x93,0xc8]478; X86-NEXT:    movb %cl, (%eax) # encoding: [0x88,0x08]479; X86-NEXT:    popl %esi # encoding: [0x5e]480; X86-NEXT:    .cfi_def_cfa_offset 4481; X86-NEXT:    retl # encoding: [0xc3]482;483; X64-LABEL: test_mm_2intersect_epi32_b:484; X64:       # %bb.0: # %entry485; X64-NEXT:    vpbroadcastd (%rdi), %xmm0 # EVEX TO VEX Compression encoding: [0xc4,0xe2,0x79,0x58,0x07]486; X64-NEXT:    vp2intersectd (%rsi){1to4}, %xmm0, %k0 # encoding: [0x62,0xf2,0x7f,0x18,0x68,0x06]487; X64-NEXT:    kshiftlw $12, %k0, %k2 # encoding: [0xc4,0xe3,0xf9,0x32,0xd0,0x0c]488; X64-NEXT:    kshiftrw $12, %k2, %k2 # encoding: [0xc4,0xe3,0xf9,0x30,0xd2,0x0c]489; X64-NEXT:    kmovw %k2, %eax # encoding: [0xc5,0xf8,0x93,0xc2]490; X64-NEXT:    movb %al, (%rdx) # encoding: [0x88,0x02]491; X64-NEXT:    kshiftlw $12, %k1, %k0 # encoding: [0xc4,0xe3,0xf9,0x32,0xc1,0x0c]492; X64-NEXT:    kshiftrw $12, %k0, %k0 # encoding: [0xc4,0xe3,0xf9,0x30,0xc0,0x0c]493; X64-NEXT:    kmovw %k0, %eax # encoding: [0xc5,0xf8,0x93,0xc0]494; X64-NEXT:    movb %al, (%rcx) # encoding: [0x88,0x01]495; X64-NEXT:    retq # encoding: [0xc3]496entry:497  %0 = load i32, ptr %a, align 4498  %vecinit.i.i = insertelement <4 x i32> undef, i32 %0, i32 0499  %vecinit3.i.i = shufflevector <4 x i32> %vecinit.i.i, <4 x i32> undef, <4 x i32> zeroinitializer500  %1 = load i32, ptr %b, align 4501  %vecinit.i.i2 = insertelement <4 x i32> undef, i32 %1, i32 0502  %vecinit3.i.i3 = shufflevector <4 x i32> %vecinit.i.i2, <4 x i32> undef, <4 x i32> zeroinitializer503  %2 = tail call { <4 x i1>, <4 x i1> } @llvm.x86.avx512.vp2intersect.d.128(<4 x i32> %vecinit3.i.i, <4 x i32> %vecinit3.i.i3)504  %3 = extractvalue { <4 x i1>, <4 x i1> } %2, 0505  %4 = shufflevector <4 x i1> %3, <4 x i1> zeroinitializer, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>506  %5 = bitcast <8 x i1> %4 to i8507  store i8 %5, ptr %m0, align 1508  %6 = extractvalue { <4 x i1>, <4 x i1> } %2, 1509  %7 = shufflevector <4 x i1> %6, <4 x i1> zeroinitializer, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>510  %8 = bitcast <8 x i1> %7 to i8511  store i8 %8, ptr %m1, align 1512  ret void513}514 515define void @test_mm_2intersect_epi64_b(ptr nocapture readonly %a, ptr nocapture readonly %b, ptr nocapture %m0, ptr nocapture %m1) {516; X86-LABEL: test_mm_2intersect_epi64_b:517; X86:       # %bb.0: # %entry518; X86-NEXT:    pushl %esi # encoding: [0x56]519; X86-NEXT:    .cfi_def_cfa_offset 8520; X86-NEXT:    .cfi_offset %esi, -8521; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x14]522; X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx # encoding: [0x8b,0x4c,0x24,0x10]523; X86-NEXT:    movl {{[0-9]+}}(%esp), %edx # encoding: [0x8b,0x54,0x24,0x0c]524; X86-NEXT:    movl {{[0-9]+}}(%esp), %esi # encoding: [0x8b,0x74,0x24,0x08]525; X86-NEXT:    vpbroadcastq (%esi), %xmm0 # EVEX TO VEX Compression encoding: [0xc4,0xe2,0x79,0x59,0x06]526; X86-NEXT:    vp2intersectq (%edx){1to2}, %xmm0, %k0 # encoding: [0x62,0xf2,0xff,0x18,0x68,0x02]527; X86-NEXT:    kshiftlw $14, %k0, %k2 # encoding: [0xc4,0xe3,0xf9,0x32,0xd0,0x0e]528; X86-NEXT:    kshiftrw $14, %k2, %k2 # encoding: [0xc4,0xe3,0xf9,0x30,0xd2,0x0e]529; X86-NEXT:    kmovw %k2, %edx # encoding: [0xc5,0xf8,0x93,0xd2]530; X86-NEXT:    movb %dl, (%ecx) # encoding: [0x88,0x11]531; X86-NEXT:    kshiftlw $14, %k1, %k0 # encoding: [0xc4,0xe3,0xf9,0x32,0xc1,0x0e]532; X86-NEXT:    kshiftrw $14, %k0, %k0 # encoding: [0xc4,0xe3,0xf9,0x30,0xc0,0x0e]533; X86-NEXT:    kmovw %k0, %ecx # encoding: [0xc5,0xf8,0x93,0xc8]534; X86-NEXT:    movb %cl, (%eax) # encoding: [0x88,0x08]535; X86-NEXT:    popl %esi # encoding: [0x5e]536; X86-NEXT:    .cfi_def_cfa_offset 4537; X86-NEXT:    retl # encoding: [0xc3]538;539; X64-LABEL: test_mm_2intersect_epi64_b:540; X64:       # %bb.0: # %entry541; X64-NEXT:    vpbroadcastq (%rdi), %xmm0 # EVEX TO VEX Compression encoding: [0xc4,0xe2,0x79,0x59,0x07]542; X64-NEXT:    vp2intersectq (%rsi){1to2}, %xmm0, %k0 # encoding: [0x62,0xf2,0xff,0x18,0x68,0x06]543; X64-NEXT:    kshiftlw $14, %k0, %k2 # encoding: [0xc4,0xe3,0xf9,0x32,0xd0,0x0e]544; X64-NEXT:    kshiftrw $14, %k2, %k2 # encoding: [0xc4,0xe3,0xf9,0x30,0xd2,0x0e]545; X64-NEXT:    kmovw %k2, %eax # encoding: [0xc5,0xf8,0x93,0xc2]546; X64-NEXT:    movb %al, (%rdx) # encoding: [0x88,0x02]547; X64-NEXT:    kshiftlw $14, %k1, %k0 # encoding: [0xc4,0xe3,0xf9,0x32,0xc1,0x0e]548; X64-NEXT:    kshiftrw $14, %k0, %k0 # encoding: [0xc4,0xe3,0xf9,0x30,0xc0,0x0e]549; X64-NEXT:    kmovw %k0, %eax # encoding: [0xc5,0xf8,0x93,0xc0]550; X64-NEXT:    movb %al, (%rcx) # encoding: [0x88,0x01]551; X64-NEXT:    retq # encoding: [0xc3]552entry:553  %0 = load i64, ptr %a, align 8554  %vecinit.i.i = insertelement <2 x i64> undef, i64 %0, i32 0555  %vecinit1.i.i = shufflevector <2 x i64> %vecinit.i.i, <2 x i64> undef, <2 x i32> zeroinitializer556  %1 = load i64, ptr %b, align 8557  %vecinit.i.i2 = insertelement <2 x i64> undef, i64 %1, i32 0558  %vecinit1.i.i3 = shufflevector <2 x i64> %vecinit.i.i2, <2 x i64> undef, <2 x i32> zeroinitializer559  %2 = tail call { <2 x i1>, <2 x i1> } @llvm.x86.avx512.vp2intersect.q.128(<2 x i64> %vecinit1.i.i, <2 x i64> %vecinit1.i.i3)560  %3 = extractvalue { <2 x i1>, <2 x i1> } %2, 0561  %4 = shufflevector <2 x i1> %3, <2 x i1> zeroinitializer, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 2, i32 3, i32 2, i32 3>562  %5 = bitcast <8 x i1> %4 to i8563  store i8 %5, ptr %m0, align 1564  %6 = extractvalue { <2 x i1>, <2 x i1> } %2, 1565  %7 = shufflevector <2 x i1> %6, <2 x i1> zeroinitializer, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 2, i32 3, i32 2, i32 3>566  %8 = bitcast <8 x i1> %7 to i8567  store i8 %8, ptr %m1, align 1568  ret void569}570 571declare { <8 x i1>, <8 x i1> } @llvm.x86.avx512.vp2intersect.d.256(<8 x i32>, <8 x i32>)572declare { <4 x i1>, <4 x i1> } @llvm.x86.avx512.vp2intersect.q.256(<4 x i64>, <4 x i64>)573declare { <4 x i1>, <4 x i1> } @llvm.x86.avx512.vp2intersect.d.128(<4 x i32>, <4 x i32>)574declare { <2 x i1>, <2 x i1> } @llvm.x86.avx512.vp2intersect.q.128(<2 x i64>, <2 x i64>)575