2014-09-30 11:41:54 +00:00
|
|
|
; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=knl -mattr=+avx512vl --show-mc-encoding| FileCheck %s
|
|
|
|
|
|
|
|
; 256-bit
|
|
|
|
|
|
|
|
define i8 @test_pcmpeq_d_256(<8 x i32> %a, <8 x i32> %b) {
|
|
|
|
; CHECK-LABEL: test_pcmpeq_d_256
|
|
|
|
; CHECK: vpcmpeqd %ymm1, %ymm0, %k0 ##
|
|
|
|
%res = call i8 @llvm.x86.avx512.mask.pcmpeq.d.256(<8 x i32> %a, <8 x i32> %b, i8 -1)
|
|
|
|
ret i8 %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define i8 @test_mask_pcmpeq_d_256(<8 x i32> %a, <8 x i32> %b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_pcmpeq_d_256
|
|
|
|
; CHECK: vpcmpeqd %ymm1, %ymm0, %k0 {%k1} ##
|
|
|
|
%res = call i8 @llvm.x86.avx512.mask.pcmpeq.d.256(<8 x i32> %a, <8 x i32> %b, i8 %mask)
|
|
|
|
ret i8 %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare i8 @llvm.x86.avx512.mask.pcmpeq.d.256(<8 x i32>, <8 x i32>, i8)
|
|
|
|
|
|
|
|
define i8 @test_pcmpeq_q_256(<4 x i64> %a, <4 x i64> %b) {
|
|
|
|
; CHECK-LABEL: test_pcmpeq_q_256
|
|
|
|
; CHECK: vpcmpeqq %ymm1, %ymm0, %k0 ##
|
|
|
|
%res = call i8 @llvm.x86.avx512.mask.pcmpeq.q.256(<4 x i64> %a, <4 x i64> %b, i8 -1)
|
|
|
|
ret i8 %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define i8 @test_mask_pcmpeq_q_256(<4 x i64> %a, <4 x i64> %b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_pcmpeq_q_256
|
|
|
|
; CHECK: vpcmpeqq %ymm1, %ymm0, %k0 {%k1} ##
|
|
|
|
%res = call i8 @llvm.x86.avx512.mask.pcmpeq.q.256(<4 x i64> %a, <4 x i64> %b, i8 %mask)
|
|
|
|
ret i8 %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare i8 @llvm.x86.avx512.mask.pcmpeq.q.256(<4 x i64>, <4 x i64>, i8)
|
|
|
|
|
2014-09-30 12:15:52 +00:00
|
|
|
define i8 @test_pcmpgt_d_256(<8 x i32> %a, <8 x i32> %b) {
|
|
|
|
; CHECK-LABEL: test_pcmpgt_d_256
|
|
|
|
; CHECK: vpcmpgtd %ymm1, %ymm0, %k0 ##
|
|
|
|
%res = call i8 @llvm.x86.avx512.mask.pcmpgt.d.256(<8 x i32> %a, <8 x i32> %b, i8 -1)
|
|
|
|
ret i8 %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define i8 @test_mask_pcmpgt_d_256(<8 x i32> %a, <8 x i32> %b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_pcmpgt_d_256
|
|
|
|
; CHECK: vpcmpgtd %ymm1, %ymm0, %k0 {%k1} ##
|
|
|
|
%res = call i8 @llvm.x86.avx512.mask.pcmpgt.d.256(<8 x i32> %a, <8 x i32> %b, i8 %mask)
|
|
|
|
ret i8 %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare i8 @llvm.x86.avx512.mask.pcmpgt.d.256(<8 x i32>, <8 x i32>, i8)
|
|
|
|
|
|
|
|
define i8 @test_pcmpgt_q_256(<4 x i64> %a, <4 x i64> %b) {
|
|
|
|
; CHECK-LABEL: test_pcmpgt_q_256
|
|
|
|
; CHECK: vpcmpgtq %ymm1, %ymm0, %k0 ##
|
|
|
|
%res = call i8 @llvm.x86.avx512.mask.pcmpgt.q.256(<4 x i64> %a, <4 x i64> %b, i8 -1)
|
|
|
|
ret i8 %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define i8 @test_mask_pcmpgt_q_256(<4 x i64> %a, <4 x i64> %b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_pcmpgt_q_256
|
|
|
|
; CHECK: vpcmpgtq %ymm1, %ymm0, %k0 {%k1} ##
|
|
|
|
%res = call i8 @llvm.x86.avx512.mask.pcmpgt.q.256(<4 x i64> %a, <4 x i64> %b, i8 %mask)
|
|
|
|
ret i8 %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare i8 @llvm.x86.avx512.mask.pcmpgt.q.256(<4 x i64>, <4 x i64>, i8)
|
|
|
|
|
2014-09-30 11:41:54 +00:00
|
|
|
; 128-bit
|
|
|
|
|
|
|
|
define i8 @test_pcmpeq_d_128(<4 x i32> %a, <4 x i32> %b) {
|
|
|
|
; CHECK-LABEL: test_pcmpeq_d_128
|
|
|
|
; CHECK: vpcmpeqd %xmm1, %xmm0, %k0 ##
|
|
|
|
%res = call i8 @llvm.x86.avx512.mask.pcmpeq.d.128(<4 x i32> %a, <4 x i32> %b, i8 -1)
|
|
|
|
ret i8 %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define i8 @test_mask_pcmpeq_d_128(<4 x i32> %a, <4 x i32> %b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_pcmpeq_d_128
|
|
|
|
; CHECK: vpcmpeqd %xmm1, %xmm0, %k0 {%k1} ##
|
|
|
|
%res = call i8 @llvm.x86.avx512.mask.pcmpeq.d.128(<4 x i32> %a, <4 x i32> %b, i8 %mask)
|
|
|
|
ret i8 %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare i8 @llvm.x86.avx512.mask.pcmpeq.d.128(<4 x i32>, <4 x i32>, i8)
|
|
|
|
|
|
|
|
define i8 @test_pcmpeq_q_128(<2 x i64> %a, <2 x i64> %b) {
|
|
|
|
; CHECK-LABEL: test_pcmpeq_q_128
|
|
|
|
; CHECK: vpcmpeqq %xmm1, %xmm0, %k0 ##
|
|
|
|
%res = call i8 @llvm.x86.avx512.mask.pcmpeq.q.128(<2 x i64> %a, <2 x i64> %b, i8 -1)
|
|
|
|
ret i8 %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define i8 @test_mask_pcmpeq_q_128(<2 x i64> %a, <2 x i64> %b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_pcmpeq_q_128
|
|
|
|
; CHECK: vpcmpeqq %xmm1, %xmm0, %k0 {%k1} ##
|
|
|
|
%res = call i8 @llvm.x86.avx512.mask.pcmpeq.q.128(<2 x i64> %a, <2 x i64> %b, i8 %mask)
|
|
|
|
ret i8 %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare i8 @llvm.x86.avx512.mask.pcmpeq.q.128(<2 x i64>, <2 x i64>, i8)
|
2014-09-30 12:15:52 +00:00
|
|
|
|
|
|
|
define i8 @test_pcmpgt_d_128(<4 x i32> %a, <4 x i32> %b) {
|
|
|
|
; CHECK-LABEL: test_pcmpgt_d_128
|
|
|
|
; CHECK: vpcmpgtd %xmm1, %xmm0, %k0 ##
|
|
|
|
%res = call i8 @llvm.x86.avx512.mask.pcmpgt.d.128(<4 x i32> %a, <4 x i32> %b, i8 -1)
|
|
|
|
ret i8 %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define i8 @test_mask_pcmpgt_d_128(<4 x i32> %a, <4 x i32> %b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_pcmpgt_d_128
|
|
|
|
; CHECK: vpcmpgtd %xmm1, %xmm0, %k0 {%k1} ##
|
|
|
|
%res = call i8 @llvm.x86.avx512.mask.pcmpgt.d.128(<4 x i32> %a, <4 x i32> %b, i8 %mask)
|
|
|
|
ret i8 %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare i8 @llvm.x86.avx512.mask.pcmpgt.d.128(<4 x i32>, <4 x i32>, i8)
|
|
|
|
|
|
|
|
define i8 @test_pcmpgt_q_128(<2 x i64> %a, <2 x i64> %b) {
|
|
|
|
; CHECK-LABEL: test_pcmpgt_q_128
|
|
|
|
; CHECK: vpcmpgtq %xmm1, %xmm0, %k0 ##
|
|
|
|
%res = call i8 @llvm.x86.avx512.mask.pcmpgt.q.128(<2 x i64> %a, <2 x i64> %b, i8 -1)
|
|
|
|
ret i8 %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define i8 @test_mask_pcmpgt_q_128(<2 x i64> %a, <2 x i64> %b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_pcmpgt_q_128
|
|
|
|
; CHECK: vpcmpgtq %xmm1, %xmm0, %k0 {%k1} ##
|
|
|
|
%res = call i8 @llvm.x86.avx512.mask.pcmpgt.q.128(<2 x i64> %a, <2 x i64> %b, i8 %mask)
|
|
|
|
ret i8 %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare i8 @llvm.x86.avx512.mask.pcmpgt.q.128(<2 x i64>, <2 x i64>, i8)
|