Add AVX SSE2 integer packed compare instructions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107240 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bruno Cardoso Lopes 2010-06-30 02:21:09 +00:00
parent 5a3a476750
commit c0ea94a37c
3 changed files with 113 additions and 0 deletions

View File

@ -2576,6 +2576,23 @@ let Predicates = [HasSSE2] in {
// SSE2 - Packed Integer Comparison Instructions
//===---------------------------------------------------------------------===//
let isAsmParserOnly = 1, Predicates = [HasAVX, HasSSE2] in {
let isCommutable = 1 in {
defm VPCMPEQB : PDI_binop_rm_int<0x74, "vpcmpeqb", int_x86_sse2_pcmpeq_b, 0>,
VEX_4V;
defm VPCMPEQW : PDI_binop_rm_int<0x75, "vpcmpeqw", int_x86_sse2_pcmpeq_w, 0>,
VEX_4V;
defm VPCMPEQD : PDI_binop_rm_int<0x76, "vpcmpeqd", int_x86_sse2_pcmpeq_d, 0>,
VEX_4V;
}
defm VPCMPGTB : PDI_binop_rm_int<0x64, "vpcmpgtb", int_x86_sse2_pcmpgt_b, 0>,
VEX_4V;
defm VPCMPGTW : PDI_binop_rm_int<0x65, "vpcmpgtw", int_x86_sse2_pcmpgt_w, 0>,
VEX_4V;
defm VPCMPGTD : PDI_binop_rm_int<0x66, "vpcmpgtd", int_x86_sse2_pcmpgt_d, 0>,
VEX_4V;
}
let Constraints = "$src1 = $dst" in {
let isCommutable = 1 in {
defm PCMPEQB : PDI_binop_rm_int<0x74, "pcmpeqb", int_x86_sse2_pcmpeq_b>;

View File

@ -11322,3 +11322,51 @@
// CHECK: encoding: [0xc5,0xe9,0xdf,0x18]
vpandn (%eax), %xmm2, %xmm3
// CHECK: vpcmpeqb %xmm1, %xmm2, %xmm3
// CHECK: encoding: [0xc5,0xe9,0x74,0xd9]
vpcmpeqb %xmm1, %xmm2, %xmm3
// CHECK: vpcmpeqb (%eax), %xmm2, %xmm3
// CHECK: encoding: [0xc5,0xe9,0x74,0x18]
vpcmpeqb (%eax), %xmm2, %xmm3
// CHECK: vpcmpeqw %xmm1, %xmm2, %xmm3
// CHECK: encoding: [0xc5,0xe9,0x75,0xd9]
vpcmpeqw %xmm1, %xmm2, %xmm3
// CHECK: vpcmpeqw (%eax), %xmm2, %xmm3
// CHECK: encoding: [0xc5,0xe9,0x75,0x18]
vpcmpeqw (%eax), %xmm2, %xmm3
// CHECK: vpcmpeqd %xmm1, %xmm2, %xmm3
// CHECK: encoding: [0xc5,0xe9,0x76,0xd9]
vpcmpeqd %xmm1, %xmm2, %xmm3
// CHECK: vpcmpeqd (%eax), %xmm2, %xmm3
// CHECK: encoding: [0xc5,0xe9,0x76,0x18]
vpcmpeqd (%eax), %xmm2, %xmm3
// CHECK: vpcmpgtb %xmm1, %xmm2, %xmm3
// CHECK: encoding: [0xc5,0xe9,0x64,0xd9]
vpcmpgtb %xmm1, %xmm2, %xmm3
// CHECK: vpcmpgtb (%eax), %xmm2, %xmm3
// CHECK: encoding: [0xc5,0xe9,0x64,0x18]
vpcmpgtb (%eax), %xmm2, %xmm3
// CHECK: vpcmpgtw %xmm1, %xmm2, %xmm3
// CHECK: encoding: [0xc5,0xe9,0x65,0xd9]
vpcmpgtw %xmm1, %xmm2, %xmm3
// CHECK: vpcmpgtw (%eax), %xmm2, %xmm3
// CHECK: encoding: [0xc5,0xe9,0x65,0x18]
vpcmpgtw (%eax), %xmm2, %xmm3
// CHECK: vpcmpgtd %xmm1, %xmm2, %xmm3
// CHECK: encoding: [0xc5,0xe9,0x66,0xd9]
vpcmpgtd %xmm1, %xmm2, %xmm3
// CHECK: vpcmpgtd (%eax), %xmm2, %xmm3
// CHECK: encoding: [0xc5,0xe9,0x66,0x18]
vpcmpgtd (%eax), %xmm2, %xmm3

View File

@ -1362,3 +1362,51 @@ pshufb CPI1_0(%rip), %xmm1
// CHECK: encoding: [0xc5,0x19,0xdf,0x28]
vpandn (%rax), %xmm12, %xmm13
// CHECK: vpcmpeqb %xmm11, %xmm12, %xmm13
// CHECK: encoding: [0xc4,0x41,0x19,0x74,0xeb]
vpcmpeqb %xmm11, %xmm12, %xmm13
// CHECK: vpcmpeqb (%rax), %xmm12, %xmm13
// CHECK: encoding: [0xc5,0x19,0x74,0x28]
vpcmpeqb (%rax), %xmm12, %xmm13
// CHECK: vpcmpeqw %xmm11, %xmm12, %xmm13
// CHECK: encoding: [0xc4,0x41,0x19,0x75,0xeb]
vpcmpeqw %xmm11, %xmm12, %xmm13
// CHECK: vpcmpeqw (%rax), %xmm12, %xmm13
// CHECK: encoding: [0xc5,0x19,0x75,0x28]
vpcmpeqw (%rax), %xmm12, %xmm13
// CHECK: vpcmpeqd %xmm11, %xmm12, %xmm13
// CHECK: encoding: [0xc4,0x41,0x19,0x76,0xeb]
vpcmpeqd %xmm11, %xmm12, %xmm13
// CHECK: vpcmpeqd (%rax), %xmm12, %xmm13
// CHECK: encoding: [0xc5,0x19,0x76,0x28]
vpcmpeqd (%rax), %xmm12, %xmm13
// CHECK: vpcmpgtb %xmm11, %xmm12, %xmm13
// CHECK: encoding: [0xc4,0x41,0x19,0x64,0xeb]
vpcmpgtb %xmm11, %xmm12, %xmm13
// CHECK: vpcmpgtb (%rax), %xmm12, %xmm13
// CHECK: encoding: [0xc5,0x19,0x64,0x28]
vpcmpgtb (%rax), %xmm12, %xmm13
// CHECK: vpcmpgtw %xmm11, %xmm12, %xmm13
// CHECK: encoding: [0xc4,0x41,0x19,0x65,0xeb]
vpcmpgtw %xmm11, %xmm12, %xmm13
// CHECK: vpcmpgtw (%rax), %xmm12, %xmm13
// CHECK: encoding: [0xc5,0x19,0x65,0x28]
vpcmpgtw (%rax), %xmm12, %xmm13
// CHECK: vpcmpgtd %xmm11, %xmm12, %xmm13
// CHECK: encoding: [0xc4,0x41,0x19,0x66,0xeb]
vpcmpgtd %xmm11, %xmm12, %xmm13
// CHECK: vpcmpgtd (%rax), %xmm12, %xmm13
// CHECK: encoding: [0xc5,0x19,0x66,0x28]
vpcmpgtd (%rax), %xmm12, %xmm13