1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py 2; RUN: llc < %s -mtriple=x86_64-apple-darwin -mattr=+avx512bitalg,+avx512vl | FileCheck %s 3 4define i16 @test_vpshufbitqmb_128(<16 x i8> %a, <16 x i8> %b, <16 x i8> %c, <16 x i8> %d) { 5; CHECK-LABEL: test_vpshufbitqmb_128: 6; CHECK: ## %bb.0: 7; CHECK-NEXT: vpshufbitqmb %xmm1, %xmm0, %k1 8; CHECK-NEXT: vpshufbitqmb %xmm3, %xmm2, %k0 {%k1} 9; CHECK-NEXT: kmovd %k0, %eax 10; CHECK-NEXT: ## kill: def $ax killed $ax killed $eax 11; CHECK-NEXT: retq 12 %tmp = call <16 x i1> @llvm.x86.avx512.vpshufbitqmb.128(<16 x i8> %a, <16 x i8> %b) 13 %tmp1 = call <16 x i1> @llvm.x86.avx512.vpshufbitqmb.128(<16 x i8> %c, <16 x i8> %d) 14 %tmp2 = and <16 x i1> %tmp, %tmp1 15 %tmp3 = bitcast <16 x i1> %tmp2 to i16 16 ret i16 %tmp3 17} 18 19define i32 @test_vpshufbitqmb_256(<32 x i8> %a, <32 x i8> %b, <32 x i8> %c, <32 x i8> %d) { 20; CHECK-LABEL: test_vpshufbitqmb_256: 21; CHECK: ## %bb.0: 22; CHECK-NEXT: vpshufbitqmb %ymm1, %ymm0, %k1 23; CHECK-NEXT: vpshufbitqmb %ymm3, %ymm2, %k0 {%k1} 24; CHECK-NEXT: kmovd %k0, %eax 25; CHECK-NEXT: vzeroupper 26; CHECK-NEXT: retq 27 %tmp = call <32 x i1> @llvm.x86.avx512.vpshufbitqmb.256(<32 x i8> %a, <32 x i8> %b) 28 %tmp1 = call <32 x i1> @llvm.x86.avx512.vpshufbitqmb.256(<32 x i8> %c, <32 x i8> %d) 29 %tmp2 = and <32 x i1> %tmp, %tmp1 30 %tmp3 = bitcast <32 x i1> %tmp2 to i32 31 ret i32 %tmp3 32} 33 34define i64 @test_vpshufbitqmb_512(<64 x i8> %a, <64 x i8> %b, <64 x i8> %c, <64 x i8> %d) { 35; CHECK-LABEL: test_vpshufbitqmb_512: 36; CHECK: ## %bb.0: 37; CHECK-NEXT: vpshufbitqmb %zmm1, %zmm0, %k1 38; CHECK-NEXT: vpshufbitqmb %zmm3, %zmm2, %k0 {%k1} 39; CHECK-NEXT: kmovq %k0, %rax 40; CHECK-NEXT: vzeroupper 41; CHECK-NEXT: retq 42 %tmp = call <64 x i1> @llvm.x86.avx512.vpshufbitqmb.512(<64 x i8> %a, <64 x i8> %b) 43 %tmp1 = call <64 x i1> @llvm.x86.avx512.vpshufbitqmb.512(<64 x i8> %c, <64 x i8> %d) 44 %tmp2 = and <64 x i1> %tmp, %tmp1 45 %tmp3 = bitcast <64 x i1> %tmp2 to i64 46 ret i64 %tmp3 47} 48 49declare <16 x i1> @llvm.x86.avx512.vpshufbitqmb.128(<16 x i8>, <16 x i8>) 50declare <32 x i1> @llvm.x86.avx512.vpshufbitqmb.256(<32 x i8>, <32 x i8>) 51declare <64 x i1> @llvm.x86.avx512.vpshufbitqmb.512(<64 x i8>, <64 x i8>) 52