forked from OSchip/llvm-project
[PowerPC] Add support for vmsumudm
This patch adds support for Vector Multiply-Sum Unsigned Doubleword Modulo instruction; vmsumudm. Differential Revision: https://reviews.llvm.org/D80294
This commit is contained in:
parent
861b526933
commit
a28e9f1208
|
@ -495,6 +495,9 @@ let TargetPrefix = "ppc" in { // All PPC intrinsics start with "llvm.ppc.".
|
|||
def int_ppc_altivec_vmsumuhm : GCCBuiltin<"__builtin_altivec_vmsumuhm">,
|
||||
Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty, llvm_v8i16_ty,
|
||||
llvm_v4i32_ty], [IntrNoMem]>;
|
||||
def int_ppc_altivec_vmsumudm : GCCBuiltin<"__builtin_altivec_vmsumudm">,
|
||||
Intrinsic<[llvm_v1i128_ty], [llvm_v2i64_ty, llvm_v2i64_ty,
|
||||
llvm_v1i128_ty], [IntrNoMem]>;
|
||||
def int_ppc_altivec_vmsumuhs : GCCBuiltin<"__builtin_altivec_vmsumuhs">,
|
||||
Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty, llvm_v8i16_ty,
|
||||
llvm_v4i32_ty], [IntrNoMem]>;
|
||||
|
|
|
@ -373,6 +373,7 @@ def : InstRW<[P9_DPE_7C, P9_DPO_7C, IP_EXECE_1C, IP_EXECO_1C, DISP_1C],
|
|||
VMSUMSHS,
|
||||
VMSUMUBM,
|
||||
VMSUMUHM,
|
||||
VMSUMUDM,
|
||||
VMSUMUHS,
|
||||
VMULESB,
|
||||
VMULESH,
|
||||
|
|
|
@ -1362,6 +1362,10 @@ def VSBOX : VXBX_Int_Ty<1480, "vsbox", int_ppc_altivec_crypto_vsbox, v2i64>;
|
|||
def HasP9Altivec : Predicate<"PPCSubTarget->hasP9Altivec()">;
|
||||
let Predicates = [HasP9Altivec] in {
|
||||
|
||||
// Vector Multiply-Sum
|
||||
def VMSUMUDM : VA1a_Int_Ty3<35, "vmsumudm", int_ppc_altivec_vmsumudm,
|
||||
v1i128, v2i64, v1i128>;
|
||||
|
||||
// i8 element comparisons.
|
||||
def VCMPNEB : VCMP < 7, "vcmpneb $vD, $vA, $vB" , v16i8>;
|
||||
def VCMPNEB_rec : VCMPo < 7, "vcmpneb. $vD, $vA, $vB" , v16i8>;
|
||||
|
|
|
@ -333,6 +333,9 @@
|
|||
# CHECK: vmsumuhm 2, 3, 4, 5
|
||||
0x10 0x43 0x21 0x66
|
||||
|
||||
# CHECK: vmsumudm 2, 3, 4, 5
|
||||
0x10 0x43 0x21 0x63
|
||||
|
||||
# CHECK: vmsumuhs 2, 3, 4, 5
|
||||
0x10 0x43 0x21 0x67
|
||||
|
||||
|
|
|
@ -366,6 +366,9 @@
|
|||
# CHECK-BE: vmsumuhm 2, 3, 4, 5 # encoding: [0x10,0x43,0x21,0x66]
|
||||
# CHECK-LE: vmsumuhm 2, 3, 4, 5 # encoding: [0x66,0x21,0x43,0x10]
|
||||
vmsumuhm 2, 3, 4, 5
|
||||
# CHECK-BE: vmsumudm 2, 3, 4, 5 # encoding: [0x10,0x43,0x21,0x63]
|
||||
# CHECK-LE: vmsumudm 2, 3, 4, 5 # encoding: [0x63,0x21,0x43,0x10]
|
||||
vmsumudm 2, 3, 4, 5
|
||||
# CHECK-BE: vmsumuhs 2, 3, 4, 5 # encoding: [0x10,0x43,0x21,0x67]
|
||||
# CHECK-LE: vmsumuhs 2, 3, 4, 5 # encoding: [0x67,0x21,0x43,0x10]
|
||||
vmsumuhs 2, 3, 4, 5
|
||||
|
|
Loading…
Reference in New Issue