Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
test/CodeGen/X86/avx512bw-intrinsics.ll
Show First 20 Lines • Show All 1,594 Lines • ▼ Show 20 Lines | |||||
; AVX512F-32-NEXT: .cfi_def_cfa_offset 16 | ; AVX512F-32-NEXT: .cfi_def_cfa_offset 16 | ||||
; AVX512F-32-NEXT: kmovd {{[0-9]+}}(%esp), %k0 | ; AVX512F-32-NEXT: kmovd {{[0-9]+}}(%esp), %k0 | ||||
; AVX512F-32-NEXT: kmovd {{[0-9]+}}(%esp), %k1 | ; AVX512F-32-NEXT: kmovd {{[0-9]+}}(%esp), %k1 | ||||
; AVX512F-32-NEXT: kunpckdq %k0, %k1, %k0 | ; AVX512F-32-NEXT: kunpckdq %k0, %k1, %k0 | ||||
; AVX512F-32-NEXT: kmovq %k0, (%esp) | ; AVX512F-32-NEXT: kmovq %k0, (%esp) | ||||
; AVX512F-32-NEXT: movl (%esp), %eax | ; AVX512F-32-NEXT: movl (%esp), %eax | ||||
; AVX512F-32-NEXT: movl {{[0-9]+}}(%esp), %edx | ; AVX512F-32-NEXT: movl {{[0-9]+}}(%esp), %edx | ||||
; AVX512F-32-NEXT: addl $12, %esp | ; AVX512F-32-NEXT: addl $12, %esp | ||||
; AVX512F-32-NEXT: .Lcfi1: | |||||
; AVX512F-32-NEXT: .cfi_def_cfa_offset 4 | |||||
; AVX512F-32-NEXT: retl | ; AVX512F-32-NEXT: retl | ||||
%res = call i64 @llvm.x86.avx512.kunpck.dq(i64 %x0, i64 %x1) | %res = call i64 @llvm.x86.avx512.kunpck.dq(i64 %x0, i64 %x1) | ||||
ret i64 %res | ret i64 %res | ||||
} | } | ||||
declare i64 @llvm.x86.avx512.cvtb2mask.512(<64 x i8>) | declare i64 @llvm.x86.avx512.cvtb2mask.512(<64 x i8>) | ||||
define i64@test_int_x86_avx512_cvtb2mask_512(<64 x i8> %x0) { | define i64@test_int_x86_avx512_cvtb2mask_512(<64 x i8> %x0) { | ||||
; AVX512BW-LABEL: test_int_x86_avx512_cvtb2mask_512: | ; AVX512BW-LABEL: test_int_x86_avx512_cvtb2mask_512: | ||||
; AVX512BW: ## BB#0: | ; AVX512BW: ## BB#0: | ||||
; AVX512BW-NEXT: vpmovb2m %zmm0, %k0 | ; AVX512BW-NEXT: vpmovb2m %zmm0, %k0 | ||||
; AVX512BW-NEXT: kmovq %k0, %rax | ; AVX512BW-NEXT: kmovq %k0, %rax | ||||
; AVX512BW-NEXT: retq | ; AVX512BW-NEXT: retq | ||||
; | ; | ||||
; AVX512F-32-LABEL: test_int_x86_avx512_cvtb2mask_512: | ; AVX512F-32-LABEL: test_int_x86_avx512_cvtb2mask_512: | ||||
; AVX512F-32: # BB#0: | ; AVX512F-32: # BB#0: | ||||
; AVX512F-32-NEXT: subl $12, %esp | ; AVX512F-32-NEXT: subl $12, %esp | ||||
; AVX512F-32-NEXT: .Lcfi1: | ; AVX512F-32-NEXT: .Lcfi2: | ||||
; AVX512F-32-NEXT: .cfi_def_cfa_offset 16 | ; AVX512F-32-NEXT: .cfi_def_cfa_offset 16 | ||||
; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0 | ; AVX512F-32-NEXT: vpmovb2m %zmm0, %k0 | ||||
; AVX512F-32-NEXT: kmovq %k0, (%esp) | ; AVX512F-32-NEXT: kmovq %k0, (%esp) | ||||
; AVX512F-32-NEXT: movl (%esp), %eax | ; AVX512F-32-NEXT: movl (%esp), %eax | ||||
; AVX512F-32-NEXT: movl {{[0-9]+}}(%esp), %edx | ; AVX512F-32-NEXT: movl {{[0-9]+}}(%esp), %edx | ||||
; AVX512F-32-NEXT: addl $12, %esp | ; AVX512F-32-NEXT: addl $12, %esp | ||||
; AVX512F-32-NEXT: .Lcfi3: | |||||
; AVX512F-32-NEXT: .cfi_def_cfa_offset 4 | |||||
; AVX512F-32-NEXT: retl | ; AVX512F-32-NEXT: retl | ||||
%res = call i64 @llvm.x86.avx512.cvtb2mask.512(<64 x i8> %x0) | %res = call i64 @llvm.x86.avx512.cvtb2mask.512(<64 x i8> %x0) | ||||
ret i64 %res | ret i64 %res | ||||
} | } | ||||
declare i32 @llvm.x86.avx512.cvtw2mask.512(<32 x i16>) | declare i32 @llvm.x86.avx512.cvtw2mask.512(<32 x i16>) | ||||
define i32@test_int_x86_avx512_cvtw2mask_512(<32 x i16> %x0) { | define i32@test_int_x86_avx512_cvtw2mask_512(<32 x i16> %x0) { | ||||
▲ Show 20 Lines • Show All 161 Lines • ▼ Show 20 Lines | |||||
; AVX512BW-NEXT: vptestmb %zmm1, %zmm0, %k0 | ; AVX512BW-NEXT: vptestmb %zmm1, %zmm0, %k0 | ||||
; AVX512BW-NEXT: kmovq %k0, %rax | ; AVX512BW-NEXT: kmovq %k0, %rax | ||||
; AVX512BW-NEXT: addq %rcx, %rax | ; AVX512BW-NEXT: addq %rcx, %rax | ||||
; AVX512BW-NEXT: retq | ; AVX512BW-NEXT: retq | ||||
; | ; | ||||
; AVX512F-32-LABEL: test_int_x86_avx512_ptestm_b_512: | ; AVX512F-32-LABEL: test_int_x86_avx512_ptestm_b_512: | ||||
; AVX512F-32: # BB#0: | ; AVX512F-32: # BB#0: | ||||
; AVX512F-32-NEXT: subl $20, %esp | ; AVX512F-32-NEXT: subl $20, %esp | ||||
; AVX512F-32-NEXT: .Lcfi2: | ; AVX512F-32-NEXT: .Lcfi4: | ||||
; AVX512F-32-NEXT: .cfi_def_cfa_offset 24 | ; AVX512F-32-NEXT: .cfi_def_cfa_offset 24 | ||||
; AVX512F-32-NEXT: kmovd {{[0-9]+}}(%esp), %k0 | ; AVX512F-32-NEXT: kmovd {{[0-9]+}}(%esp), %k0 | ||||
; AVX512F-32-NEXT: kmovd {{[0-9]+}}(%esp), %k1 | ; AVX512F-32-NEXT: kmovd {{[0-9]+}}(%esp), %k1 | ||||
; AVX512F-32-NEXT: kunpckdq %k0, %k1, %k1 | ; AVX512F-32-NEXT: kunpckdq %k0, %k1, %k1 | ||||
; AVX512F-32-NEXT: vptestmb %zmm1, %zmm0, %k0 {%k1} | ; AVX512F-32-NEXT: vptestmb %zmm1, %zmm0, %k0 {%k1} | ||||
; AVX512F-32-NEXT: kmovq %k0, (%esp) | ; AVX512F-32-NEXT: kmovq %k0, (%esp) | ||||
; AVX512F-32-NEXT: vptestmb %zmm1, %zmm0, %k0 | ; AVX512F-32-NEXT: vptestmb %zmm1, %zmm0, %k0 | ||||
; AVX512F-32-NEXT: kmovq %k0, {{[0-9]+}}(%esp) | ; AVX512F-32-NEXT: kmovq %k0, {{[0-9]+}}(%esp) | ||||
; AVX512F-32-NEXT: movl (%esp), %eax | ; AVX512F-32-NEXT: movl (%esp), %eax | ||||
; AVX512F-32-NEXT: movl {{[0-9]+}}(%esp), %edx | ; AVX512F-32-NEXT: movl {{[0-9]+}}(%esp), %edx | ||||
; AVX512F-32-NEXT: addl {{[0-9]+}}(%esp), %eax | ; AVX512F-32-NEXT: addl {{[0-9]+}}(%esp), %eax | ||||
; AVX512F-32-NEXT: adcxl {{[0-9]+}}(%esp), %edx | ; AVX512F-32-NEXT: adcxl {{[0-9]+}}(%esp), %edx | ||||
; AVX512F-32-NEXT: addl $20, %esp | ; AVX512F-32-NEXT: addl $20, %esp | ||||
; AVX512F-32-NEXT: .Lcfi5: | |||||
; AVX512F-32-NEXT: .cfi_def_cfa_offset 4 | |||||
; AVX512F-32-NEXT: retl | ; AVX512F-32-NEXT: retl | ||||
%res = call i64 @llvm.x86.avx512.ptestm.b.512(<64 x i8> %x0, <64 x i8> %x1, i64 %x2) | %res = call i64 @llvm.x86.avx512.ptestm.b.512(<64 x i8> %x0, <64 x i8> %x1, i64 %x2) | ||||
%res1 = call i64 @llvm.x86.avx512.ptestm.b.512(<64 x i8> %x0, <64 x i8> %x1, i64-1) | %res1 = call i64 @llvm.x86.avx512.ptestm.b.512(<64 x i8> %x0, <64 x i8> %x1, i64-1) | ||||
%res2 = add i64 %res, %res1 | %res2 = add i64 %res, %res1 | ||||
ret i64 %res2 | ret i64 %res2 | ||||
} | } | ||||
declare i32 @llvm.x86.avx512.ptestm.w.512(<32 x i16>, <32 x i16>, i32) | declare i32 @llvm.x86.avx512.ptestm.w.512(<32 x i16>, <32 x i16>, i32) | ||||
Show All 35 Lines | |||||
; AVX512BW-NEXT: vptestnmb %zmm1, %zmm0, %k0 | ; AVX512BW-NEXT: vptestnmb %zmm1, %zmm0, %k0 | ||||
; AVX512BW-NEXT: kmovq %k0, %rax | ; AVX512BW-NEXT: kmovq %k0, %rax | ||||
; AVX512BW-NEXT: addq %rcx, %rax | ; AVX512BW-NEXT: addq %rcx, %rax | ||||
; AVX512BW-NEXT: retq | ; AVX512BW-NEXT: retq | ||||
; | ; | ||||
; AVX512F-32-LABEL: test_int_x86_avx512_ptestnm_b_512: | ; AVX512F-32-LABEL: test_int_x86_avx512_ptestnm_b_512: | ||||
; AVX512F-32: # BB#0: | ; AVX512F-32: # BB#0: | ||||
; AVX512F-32-NEXT: subl $20, %esp | ; AVX512F-32-NEXT: subl $20, %esp | ||||
; AVX512F-32-NEXT: .Lcfi3: | ; AVX512F-32-NEXT: .Lcfi6: | ||||
; AVX512F-32-NEXT: .cfi_def_cfa_offset 24 | ; AVX512F-32-NEXT: .cfi_def_cfa_offset 24 | ||||
; AVX512F-32-NEXT: kmovd {{[0-9]+}}(%esp), %k0 | ; AVX512F-32-NEXT: kmovd {{[0-9]+}}(%esp), %k0 | ||||
; AVX512F-32-NEXT: kmovd {{[0-9]+}}(%esp), %k1 | ; AVX512F-32-NEXT: kmovd {{[0-9]+}}(%esp), %k1 | ||||
; AVX512F-32-NEXT: kunpckdq %k0, %k1, %k1 | ; AVX512F-32-NEXT: kunpckdq %k0, %k1, %k1 | ||||
; AVX512F-32-NEXT: vptestnmb %zmm1, %zmm0, %k0 {%k1} | ; AVX512F-32-NEXT: vptestnmb %zmm1, %zmm0, %k0 {%k1} | ||||
; AVX512F-32-NEXT: kmovq %k0, (%esp) | ; AVX512F-32-NEXT: kmovq %k0, (%esp) | ||||
; AVX512F-32-NEXT: vptestnmb %zmm1, %zmm0, %k0 | ; AVX512F-32-NEXT: vptestnmb %zmm1, %zmm0, %k0 | ||||
; AVX512F-32-NEXT: kmovq %k0, {{[0-9]+}}(%esp) | ; AVX512F-32-NEXT: kmovq %k0, {{[0-9]+}}(%esp) | ||||
; AVX512F-32-NEXT: movl (%esp), %eax | ; AVX512F-32-NEXT: movl (%esp), %eax | ||||
; AVX512F-32-NEXT: movl {{[0-9]+}}(%esp), %edx | ; AVX512F-32-NEXT: movl {{[0-9]+}}(%esp), %edx | ||||
; AVX512F-32-NEXT: addl {{[0-9]+}}(%esp), %eax | ; AVX512F-32-NEXT: addl {{[0-9]+}}(%esp), %eax | ||||
; AVX512F-32-NEXT: adcxl {{[0-9]+}}(%esp), %edx | ; AVX512F-32-NEXT: adcxl {{[0-9]+}}(%esp), %edx | ||||
; AVX512F-32-NEXT: addl $20, %esp | ; AVX512F-32-NEXT: addl $20, %esp | ||||
; AVX512F-32-NEXT: .Lcfi7: | |||||
; AVX512F-32-NEXT: .cfi_def_cfa_offset 4 | |||||
; AVX512F-32-NEXT: retl | ; AVX512F-32-NEXT: retl | ||||
%res = call i64 @llvm.x86.avx512.ptestnm.b.512(<64 x i8> %x0, <64 x i8> %x1, i64 %x2) | %res = call i64 @llvm.x86.avx512.ptestnm.b.512(<64 x i8> %x0, <64 x i8> %x1, i64 %x2) | ||||
%res1 = call i64 @llvm.x86.avx512.ptestnm.b.512(<64 x i8> %x0, <64 x i8> %x1, i64-1) | %res1 = call i64 @llvm.x86.avx512.ptestnm.b.512(<64 x i8> %x0, <64 x i8> %x1, i64-1) | ||||
%res2 = add i64 %res, %res1 | %res2 = add i64 %res, %res1 | ||||
ret i64 %res2 | ret i64 %res2 | ||||
} | } | ||||
declare i32 @llvm.x86.avx512.ptestnm.w.512(<32 x i16>, <32 x i16>, i32 %x2) | declare i32 @llvm.x86.avx512.ptestnm.w.512(<32 x i16>, <32 x i16>, i32 %x2) | ||||
▲ Show 20 Lines • Show All 402 Lines • Show Last 20 Lines |