1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=skx | FileCheck --check-prefix=SKX --check-prefix=SKX_ONLY %s
4 ; TODO - fix fail on KNL and move this test to avx512-insert-extract.ll
6 define zeroext i8 @test_extractelement_varible_v64i1(<64 x i8> %a, <64 x i8> %b, i32 %index) {
7 ; SKX-LABEL: test_extractelement_varible_v64i1:
10 ; SKX-NEXT: .cfi_def_cfa_offset 16
11 ; SKX-NEXT: .cfi_offset %rbp, -16
12 ; SKX-NEXT: movq %rsp, %rbp
13 ; SKX-NEXT: .cfi_def_cfa_register %rbp
14 ; SKX-NEXT: andq $-64, %rsp
15 ; SKX-NEXT: subq $128, %rsp
16 ; SKX-NEXT: ## kill: def $edi killed $edi def $rdi
17 ; SKX-NEXT: vpcmpnleub %zmm1, %zmm0, %k0
18 ; SKX-NEXT: vpmovm2b %k0, %zmm0
19 ; SKX-NEXT: vmovdqa64 %zmm0, (%rsp)
20 ; SKX-NEXT: andl $63, %edi
21 ; SKX-NEXT: movzbl (%rsp,%rdi), %eax
22 ; SKX-NEXT: andl $1, %eax
23 ; SKX-NEXT: movq %rbp, %rsp
25 ; SKX-NEXT: vzeroupper
27 %t1 = icmp ugt <64 x i8> %a, %b
28 %t2 = extractelement <64 x i1> %t1, i32 %index
29 %res = zext i1 %t2 to i8