mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-11 06:56:12 +00:00
8acdc5232d
Patch by Sergey Lisitsyn <sergey.lisitsyn@intel.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218670 91177308-0d34-0410-b5e6-96231b3b80d8
134 lines
4.6 KiB
LLVM
134 lines
4.6 KiB
LLVM
; 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)
|
|
|
|
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)
|
|
|
|
; 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)
|
|
|
|
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)
|