diff --git a/src/etc/platform-intrinsics/powerpc.json b/src/etc/platform-intrinsics/powerpc.json index d615037b632..9f9cceb1525 100644 --- a/src/etc/platform-intrinsics/powerpc.json +++ b/src/etc/platform-intrinsics/powerpc.json @@ -156,6 +156,13 @@ "llvm": "vupkh{1.kind}{1.data_type_short}", "ret": "s(16-32)", "args": ["0N"] + }, + { + "intrinsic": "madds", + "width": [128], + "llvm": "vmhaddshs", + "ret": "s16", + "args": ["0", "0", "0"] } ] } diff --git a/src/librustc_platform_intrinsics/powerpc.rs b/src/librustc_platform_intrinsics/powerpc.rs index 1a2e8e9c5d8..fce3d5ed538 100644 --- a/src/librustc_platform_intrinsics/powerpc.rs +++ b/src/librustc_platform_intrinsics/powerpc.rs @@ -337,6 +337,11 @@ pub fn find(name: &str) -> Option { output: &::I32x4, definition: Named("llvm.ppc.altivec.vupkhsh") }, + "_vec_madds" => Intrinsic { + inputs: { static INPUTS: [&'static Type; 3] = [&::I16x8, &::I16x8, &::I16x8]; &INPUTS }, + output: &::I16x8, + definition: Named("llvm.ppc.altivec.vmhaddshs") + }, _ => return None, }) }