Add part of AVX SSE4.1 packed move with sign/zero extend instructions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107720 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bruno Cardoso Lopes 2010-07-06 23:01:41 +00:00
parent 0106680a2c
commit 36869b69b0
3 changed files with 112 additions and 0 deletions

View File

@ -4304,6 +4304,21 @@ multiclass SS41I_binop_rm_int8<bits<8> opc, string OpcodeStr, Intrinsic IntId> {
OpSize; OpSize;
} }
let isAsmParserOnly = 1, Predicates = [HasAVX, HasSSE41] in {
defm VPMOVSXBW : SS41I_binop_rm_int8<0x20, "vpmovsxbw", int_x86_sse41_pmovsxbw>,
VEX;
defm VPMOVSXWD : SS41I_binop_rm_int8<0x23, "vpmovsxwd", int_x86_sse41_pmovsxwd>,
VEX;
defm VPMOVSXDQ : SS41I_binop_rm_int8<0x25, "vpmovsxdq", int_x86_sse41_pmovsxdq>,
VEX;
defm VPMOVZXBW : SS41I_binop_rm_int8<0x30, "vpmovzxbw", int_x86_sse41_pmovzxbw>,
VEX;
defm VPMOVZXWD : SS41I_binop_rm_int8<0x33, "vpmovzxwd", int_x86_sse41_pmovzxwd>,
VEX;
defm VPMOVZXDQ : SS41I_binop_rm_int8<0x35, "vpmovzxdq", int_x86_sse41_pmovzxdq>,
VEX;
}
defm PMOVSXBW : SS41I_binop_rm_int8<0x20, "pmovsxbw", int_x86_sse41_pmovsxbw>; defm PMOVSXBW : SS41I_binop_rm_int8<0x20, "pmovsxbw", int_x86_sse41_pmovsxbw>;
defm PMOVSXWD : SS41I_binop_rm_int8<0x23, "pmovsxwd", int_x86_sse41_pmovsxwd>; defm PMOVSXWD : SS41I_binop_rm_int8<0x23, "pmovsxwd", int_x86_sse41_pmovsxwd>;
defm PMOVSXDQ : SS41I_binop_rm_int8<0x25, "pmovsxdq", int_x86_sse41_pmovsxdq>; defm PMOVSXDQ : SS41I_binop_rm_int8<0x25, "pmovsxdq", int_x86_sse41_pmovsxdq>;

View File

@ -11950,3 +11950,51 @@
// CHECK: encoding: [0xc4,0xe3,0x71,0x4c,0x18,0x20] // CHECK: encoding: [0xc4,0xe3,0x71,0x4c,0x18,0x20]
vpblendvb %xmm2, (%eax), %xmm1, %xmm3 vpblendvb %xmm2, (%eax), %xmm1, %xmm3
// CHECK: vpmovsxbw %xmm2, %xmm5
// CHECK: encoding: [0xc4,0xe2,0x79,0x20,0xea]
vpmovsxbw %xmm2, %xmm5
// CHECK: vpmovsxbw (%eax), %xmm2
// CHECK: encoding: [0xc4,0xe2,0x79,0x20,0x10]
vpmovsxbw (%eax), %xmm2
// CHECK: vpmovsxwd %xmm2, %xmm5
// CHECK: encoding: [0xc4,0xe2,0x79,0x23,0xea]
vpmovsxwd %xmm2, %xmm5
// CHECK: vpmovsxwd (%eax), %xmm2
// CHECK: encoding: [0xc4,0xe2,0x79,0x23,0x10]
vpmovsxwd (%eax), %xmm2
// CHECK: vpmovsxdq %xmm2, %xmm5
// CHECK: encoding: [0xc4,0xe2,0x79,0x25,0xea]
vpmovsxdq %xmm2, %xmm5
// CHECK: vpmovsxdq (%eax), %xmm2
// CHECK: encoding: [0xc4,0xe2,0x79,0x25,0x10]
vpmovsxdq (%eax), %xmm2
// CHECK: vpmovzxbw %xmm2, %xmm5
// CHECK: encoding: [0xc4,0xe2,0x79,0x30,0xea]
vpmovzxbw %xmm2, %xmm5
// CHECK: vpmovzxbw (%eax), %xmm2
// CHECK: encoding: [0xc4,0xe2,0x79,0x30,0x10]
vpmovzxbw (%eax), %xmm2
// CHECK: vpmovzxwd %xmm2, %xmm5
// CHECK: encoding: [0xc4,0xe2,0x79,0x33,0xea]
vpmovzxwd %xmm2, %xmm5
// CHECK: vpmovzxwd (%eax), %xmm2
// CHECK: encoding: [0xc4,0xe2,0x79,0x33,0x10]
vpmovzxwd (%eax), %xmm2
// CHECK: vpmovzxdq %xmm2, %xmm5
// CHECK: encoding: [0xc4,0xe2,0x79,0x35,0xea]
vpmovzxdq %xmm2, %xmm5
// CHECK: vpmovzxdq (%eax), %xmm2
// CHECK: encoding: [0xc4,0xe2,0x79,0x35,0x10]
vpmovzxdq (%eax), %xmm2

View File

@ -1998,3 +1998,52 @@ pshufb CPI1_0(%rip), %xmm1
// CHECK: encoding: [0xc4,0x63,0x21,0x4c,0x28,0xc0] // CHECK: encoding: [0xc4,0x63,0x21,0x4c,0x28,0xc0]
vpblendvb %xmm12, (%rax), %xmm11, %xmm13 vpblendvb %xmm12, (%rax), %xmm11, %xmm13
// CHECK: vpmovsxbw %xmm12, %xmm10
// CHECK: encoding: [0xc4,0x42,0x79,0x20,0xd4]
vpmovsxbw %xmm12, %xmm10
// CHECK: vpmovsxbw (%rax), %xmm12
// CHECK: encoding: [0xc4,0x62,0x79,0x20,0x20]
vpmovsxbw (%rax), %xmm12
// CHECK: vpmovsxwd %xmm12, %xmm10
// CHECK: encoding: [0xc4,0x42,0x79,0x23,0xd4]
vpmovsxwd %xmm12, %xmm10
// CHECK: vpmovsxwd (%rax), %xmm12
// CHECK: encoding: [0xc4,0x62,0x79,0x23,0x20]
vpmovsxwd (%rax), %xmm12
// CHECK: vpmovsxdq %xmm12, %xmm10
// CHECK: encoding: [0xc4,0x42,0x79,0x25,0xd4]
vpmovsxdq %xmm12, %xmm10
// CHECK: vpmovsxdq (%rax), %xmm12
// CHECK: encoding: [0xc4,0x62,0x79,0x25,0x20]
vpmovsxdq (%rax), %xmm12
// CHECK: vpmovzxbw %xmm12, %xmm10
// CHECK: encoding: [0xc4,0x42,0x79,0x30,0xd4]
vpmovzxbw %xmm12, %xmm10
// CHECK: vpmovzxbw (%rax), %xmm12
// CHECK: encoding: [0xc4,0x62,0x79,0x30,0x20]
vpmovzxbw (%rax), %xmm12
// CHECK: vpmovzxwd %xmm12, %xmm10
// CHECK: encoding: [0xc4,0x42,0x79,0x33,0xd4]
vpmovzxwd %xmm12, %xmm10
// CHECK: vpmovzxwd (%rax), %xmm12
// CHECK: encoding: [0xc4,0x62,0x79,0x33,0x20]
vpmovzxwd (%rax), %xmm12
// CHECK: vpmovzxdq %xmm12, %xmm10
// CHECK: encoding: [0xc4,0x42,0x79,0x35,0xd4]
vpmovzxdq %xmm12, %xmm10
// CHECK: vpmovzxdq (%rax), %xmm12
// CHECK: encoding: [0xc4,0x62,0x79,0x35,0x20]
vpmovzxdq (%rax), %xmm12