mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-18 09:27:27 +00:00
Add AVX SSE2 pack with saturation integer instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107241 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c0ea94a37c
commit
6d5d2b5de2
@ -2634,6 +2634,15 @@ def : Pat<(v4i32 (X86pcmpgtd VR128:$src1, (memop addr:$src2))),
|
||||
// SSE2 - Packed Integer Pack Instructions
|
||||
//===---------------------------------------------------------------------===//
|
||||
|
||||
let isAsmParserOnly = 1, Predicates = [HasAVX, HasSSE2] in {
|
||||
defm VPACKSSWB : PDI_binop_rm_int<0x63, "vpacksswb", int_x86_sse2_packsswb_128,
|
||||
0>, VEX_4V;
|
||||
defm VPACKSSDW : PDI_binop_rm_int<0x6B, "vpackssdw", int_x86_sse2_packssdw_128,
|
||||
0>, VEX_4V;
|
||||
defm VPACKUSWB : PDI_binop_rm_int<0x67, "vpackuswb", int_x86_sse2_packuswb_128,
|
||||
0>, VEX_4V;
|
||||
}
|
||||
|
||||
let Constraints = "$src1 = $dst" in {
|
||||
defm PACKSSWB : PDI_binop_rm_int<0x63, "packsswb", int_x86_sse2_packsswb_128>;
|
||||
defm PACKSSDW : PDI_binop_rm_int<0x6B, "packssdw", int_x86_sse2_packssdw_128>;
|
||||
|
@ -11370,3 +11370,27 @@
|
||||
// CHECK: encoding: [0xc5,0xe9,0x66,0x18]
|
||||
vpcmpgtd (%eax), %xmm2, %xmm3
|
||||
|
||||
// CHECK: vpacksswb %xmm1, %xmm2, %xmm3
|
||||
// CHECK: encoding: [0xc5,0xe9,0x63,0xd9]
|
||||
vpacksswb %xmm1, %xmm2, %xmm3
|
||||
|
||||
// CHECK: vpacksswb (%eax), %xmm2, %xmm3
|
||||
// CHECK: encoding: [0xc5,0xe9,0x63,0x18]
|
||||
vpacksswb (%eax), %xmm2, %xmm3
|
||||
|
||||
// CHECK: vpackssdw %xmm1, %xmm2, %xmm3
|
||||
// CHECK: encoding: [0xc5,0xe9,0x6b,0xd9]
|
||||
vpackssdw %xmm1, %xmm2, %xmm3
|
||||
|
||||
// CHECK: vpackssdw (%eax), %xmm2, %xmm3
|
||||
// CHECK: encoding: [0xc5,0xe9,0x6b,0x18]
|
||||
vpackssdw (%eax), %xmm2, %xmm3
|
||||
|
||||
// CHECK: vpackuswb %xmm1, %xmm2, %xmm3
|
||||
// CHECK: encoding: [0xc5,0xe9,0x67,0xd9]
|
||||
vpackuswb %xmm1, %xmm2, %xmm3
|
||||
|
||||
// CHECK: vpackuswb (%eax), %xmm2, %xmm3
|
||||
// CHECK: encoding: [0xc5,0xe9,0x67,0x18]
|
||||
vpackuswb (%eax), %xmm2, %xmm3
|
||||
|
||||
|
@ -1410,3 +1410,27 @@ pshufb CPI1_0(%rip), %xmm1
|
||||
// CHECK: encoding: [0xc5,0x19,0x66,0x28]
|
||||
vpcmpgtd (%rax), %xmm12, %xmm13
|
||||
|
||||
// CHECK: vpacksswb %xmm11, %xmm12, %xmm13
|
||||
// CHECK: encoding: [0xc4,0x41,0x19,0x63,0xeb]
|
||||
vpacksswb %xmm11, %xmm12, %xmm13
|
||||
|
||||
// CHECK: vpacksswb (%rax), %xmm12, %xmm13
|
||||
// CHECK: encoding: [0xc5,0x19,0x63,0x28]
|
||||
vpacksswb (%rax), %xmm12, %xmm13
|
||||
|
||||
// CHECK: vpackssdw %xmm11, %xmm12, %xmm13
|
||||
// CHECK: encoding: [0xc4,0x41,0x19,0x6b,0xeb]
|
||||
vpackssdw %xmm11, %xmm12, %xmm13
|
||||
|
||||
// CHECK: vpackssdw (%rax), %xmm12, %xmm13
|
||||
// CHECK: encoding: [0xc5,0x19,0x6b,0x28]
|
||||
vpackssdw (%rax), %xmm12, %xmm13
|
||||
|
||||
// CHECK: vpackuswb %xmm11, %xmm12, %xmm13
|
||||
// CHECK: encoding: [0xc4,0x41,0x19,0x67,0xeb]
|
||||
vpackuswb %xmm11, %xmm12, %xmm13
|
||||
|
||||
// CHECK: vpackuswb (%rax), %xmm12, %xmm13
|
||||
// CHECK: encoding: [0xc5,0x19,0x67,0x28]
|
||||
vpackuswb (%rax), %xmm12, %xmm13
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user