1 ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=knl -mattr=+avx512bw -mattr=+avx512vl --show-mc-encoding| FileCheck %s
5 define i32 @test_pcmpeq_b_256(<32 x i8> %a, <32 x i8> %b) {
6 ; CHECK-LABEL: test_pcmpeq_b_256
7 ; CHECK: vpcmpeqb %ymm1, %ymm0, %k0 ##
8 %res = call i32 @llvm.x86.avx512.mask.pcmpeq.b.256(<32 x i8> %a, <32 x i8> %b, i32 -1)
12 define i32 @test_mask_pcmpeq_b_256(<32 x i8> %a, <32 x i8> %b, i32 %mask) {
13 ; CHECK-LABEL: test_mask_pcmpeq_b_256
14 ; CHECK: vpcmpeqb %ymm1, %ymm0, %k0 {%k1} ##
15 %res = call i32 @llvm.x86.avx512.mask.pcmpeq.b.256(<32 x i8> %a, <32 x i8> %b, i32 %mask)
19 declare i32 @llvm.x86.avx512.mask.pcmpeq.b.256(<32 x i8>, <32 x i8>, i32)
21 define i16 @test_pcmpeq_w_256(<16 x i16> %a, <16 x i16> %b) {
22 ; CHECK-LABEL: test_pcmpeq_w_256
23 ; CHECK: vpcmpeqw %ymm1, %ymm0, %k0 ##
24 %res = call i16 @llvm.x86.avx512.mask.pcmpeq.w.256(<16 x i16> %a, <16 x i16> %b, i16 -1)
28 define i16 @test_mask_pcmpeq_w_256(<16 x i16> %a, <16 x i16> %b, i16 %mask) {
29 ; CHECK-LABEL: test_mask_pcmpeq_w_256
30 ; CHECK: vpcmpeqw %ymm1, %ymm0, %k0 {%k1} ##
31 %res = call i16 @llvm.x86.avx512.mask.pcmpeq.w.256(<16 x i16> %a, <16 x i16> %b, i16 %mask)
35 declare i16 @llvm.x86.avx512.mask.pcmpeq.w.256(<16 x i16>, <16 x i16>, i16)
37 define i32 @test_pcmpgt_b_256(<32 x i8> %a, <32 x i8> %b) {
38 ; CHECK-LABEL: test_pcmpgt_b_256
39 ; CHECK: vpcmpgtb %ymm1, %ymm0, %k0 ##
40 %res = call i32 @llvm.x86.avx512.mask.pcmpgt.b.256(<32 x i8> %a, <32 x i8> %b, i32 -1)
44 define i32 @test_mask_pcmpgt_b_256(<32 x i8> %a, <32 x i8> %b, i32 %mask) {
45 ; CHECK-LABEL: test_mask_pcmpgt_b_256
46 ; CHECK: vpcmpgtb %ymm1, %ymm0, %k0 {%k1} ##
47 %res = call i32 @llvm.x86.avx512.mask.pcmpgt.b.256(<32 x i8> %a, <32 x i8> %b, i32 %mask)
51 declare i32 @llvm.x86.avx512.mask.pcmpgt.b.256(<32 x i8>, <32 x i8>, i32)
53 define i16 @test_pcmpgt_w_256(<16 x i16> %a, <16 x i16> %b) {
54 ; CHECK-LABEL: test_pcmpgt_w_256
55 ; CHECK: vpcmpgtw %ymm1, %ymm0, %k0 ##
56 %res = call i16 @llvm.x86.avx512.mask.pcmpgt.w.256(<16 x i16> %a, <16 x i16> %b, i16 -1)
60 define i16 @test_mask_pcmpgt_w_256(<16 x i16> %a, <16 x i16> %b, i16 %mask) {
61 ; CHECK-LABEL: test_mask_pcmpgt_w_256
62 ; CHECK: vpcmpgtw %ymm1, %ymm0, %k0 {%k1} ##
63 %res = call i16 @llvm.x86.avx512.mask.pcmpgt.w.256(<16 x i16> %a, <16 x i16> %b, i16 %mask)
67 declare i16 @llvm.x86.avx512.mask.pcmpgt.w.256(<16 x i16>, <16 x i16>, i16)
71 define i16 @test_pcmpeq_b_128(<16 x i8> %a, <16 x i8> %b) {
72 ; CHECK-LABEL: test_pcmpeq_b_128
73 ; CHECK: vpcmpeqb %xmm1, %xmm0, %k0 ##
74 %res = call i16 @llvm.x86.avx512.mask.pcmpeq.b.128(<16 x i8> %a, <16 x i8> %b, i16 -1)
78 define i16 @test_mask_pcmpeq_b_128(<16 x i8> %a, <16 x i8> %b, i16 %mask) {
79 ; CHECK-LABEL: test_mask_pcmpeq_b_128
80 ; CHECK: vpcmpeqb %xmm1, %xmm0, %k0 {%k1} ##
81 %res = call i16 @llvm.x86.avx512.mask.pcmpeq.b.128(<16 x i8> %a, <16 x i8> %b, i16 %mask)
85 declare i16 @llvm.x86.avx512.mask.pcmpeq.b.128(<16 x i8>, <16 x i8>, i16)
87 define i8 @test_pcmpeq_w_128(<8 x i16> %a, <8 x i16> %b) {
88 ; CHECK-LABEL: test_pcmpeq_w_128
89 ; CHECK: vpcmpeqw %xmm1, %xmm0, %k0 ##
90 %res = call i8 @llvm.x86.avx512.mask.pcmpeq.w.128(<8 x i16> %a, <8 x i16> %b, i8 -1)
94 define i8 @test_mask_pcmpeq_w_128(<8 x i16> %a, <8 x i16> %b, i8 %mask) {
95 ; CHECK-LABEL: test_mask_pcmpeq_w_128
96 ; CHECK: vpcmpeqw %xmm1, %xmm0, %k0 {%k1} ##
97 %res = call i8 @llvm.x86.avx512.mask.pcmpeq.w.128(<8 x i16> %a, <8 x i16> %b, i8 %mask)
101 declare i8 @llvm.x86.avx512.mask.pcmpeq.w.128(<8 x i16>, <8 x i16>, i8)
103 define i16 @test_pcmpgt_b_128(<16 x i8> %a, <16 x i8> %b) {
104 ; CHECK-LABEL: test_pcmpgt_b_128
105 ; CHECK: vpcmpgtb %xmm1, %xmm0, %k0 ##
106 %res = call i16 @llvm.x86.avx512.mask.pcmpgt.b.128(<16 x i8> %a, <16 x i8> %b, i16 -1)
110 define i16 @test_mask_pcmpgt_b_128(<16 x i8> %a, <16 x i8> %b, i16 %mask) {
111 ; CHECK-LABEL: test_mask_pcmpgt_b_128
112 ; CHECK: vpcmpgtb %xmm1, %xmm0, %k0 {%k1} ##
113 %res = call i16 @llvm.x86.avx512.mask.pcmpgt.b.128(<16 x i8> %a, <16 x i8> %b, i16 %mask)
117 declare i16 @llvm.x86.avx512.mask.pcmpgt.b.128(<16 x i8>, <16 x i8>, i16)
119 define i8 @test_pcmpgt_w_128(<8 x i16> %a, <8 x i16> %b) {
120 ; CHECK-LABEL: test_pcmpgt_w_128
121 ; CHECK: vpcmpgtw %xmm1, %xmm0, %k0 ##
122 %res = call i8 @llvm.x86.avx512.mask.pcmpgt.w.128(<8 x i16> %a, <8 x i16> %b, i8 -1)
126 define i8 @test_mask_pcmpgt_w_128(<8 x i16> %a, <8 x i16> %b, i8 %mask) {
127 ; CHECK-LABEL: test_mask_pcmpgt_w_128
128 ; CHECK: vpcmpgtw %xmm1, %xmm0, %k0 {%k1} ##
129 %res = call i8 @llvm.x86.avx512.mask.pcmpgt.w.128(<8 x i16> %a, <8 x i16> %b, i8 %mask)
133 declare i8 @llvm.x86.avx512.mask.pcmpgt.w.128(<8 x i16>, <8 x i16>, i8)