diff --git a/src/etc/platform-intrinsics/powerpc.json b/src/etc/platform-intrinsics/powerpc.json index 306ccea903e..4ed1ecd7639 100644 --- a/src/etc/platform-intrinsics/powerpc.json +++ b/src/etc/platform-intrinsics/powerpc.json @@ -184,6 +184,13 @@ "llvm": "vmsumshm", "ret": "s32", "args": ["s16", "s16", "s32"] + }, + { + "intrinsic": "msum{0.kind}hs", + "width": [128], + "llvm": "vmsum{0.kind}hs", + "ret": "i32", + "args": ["0N", "0N", "0"] } ] } diff --git a/src/librustc_platform_intrinsics/powerpc.rs b/src/librustc_platform_intrinsics/powerpc.rs index 437dae48913..b205321d10f 100644 --- a/src/librustc_platform_intrinsics/powerpc.rs +++ b/src/librustc_platform_intrinsics/powerpc.rs @@ -362,6 +362,16 @@ pub fn find(name: &str) -> Option { output: &::I32x4, definition: Named("llvm.ppc.altivec.vmsumshm") }, + "_vec_msumshs" => Intrinsic { + inputs: { static INPUTS: [&'static Type; 3] = [&::I16x8, &::I16x8, &::I32x4]; &INPUTS }, + output: &::I32x4, + definition: Named("llvm.ppc.altivec.vmsumshs") + }, + "_vec_msumuhs" => Intrinsic { + inputs: { static INPUTS: [&'static Type; 3] = [&::U16x8, &::U16x8, &::U32x4]; &INPUTS }, + output: &::U32x4, + definition: Named("llvm.ppc.altivec.vmsumuhs") + }, _ => return None, }) }