diff --git a/src/etc/platform-intrinsics/powerpc.json b/src/etc/platform-intrinsics/powerpc.json index bc92e7bf722..7f33eeb2b22 100644 --- a/src/etc/platform-intrinsics/powerpc.json +++ b/src/etc/platform-intrinsics/powerpc.json @@ -255,6 +255,13 @@ "ret": "f32", "args": ["0"] }, + { + "intrinsic": "trunc", + "width": [128], + "llvm": "vrfiz", + "ret": "f32", + "args": ["0"] + }, { "intrinsic": "loge", "width": [128], diff --git a/src/librustc_platform_intrinsics/powerpc.rs b/src/librustc_platform_intrinsics/powerpc.rs index c28dbcbceec..30d76507b0c 100644 --- a/src/librustc_platform_intrinsics/powerpc.rs +++ b/src/librustc_platform_intrinsics/powerpc.rs @@ -422,6 +422,11 @@ pub fn find(name: &str) -> Option { output: &::F32x4, definition: Named("llvm.ppc.altivec.vrfin") }, + "_vec_trunc" => Intrinsic { + inputs: { static INPUTS: [&'static Type; 1] = [&::F32x4]; &INPUTS }, + output: &::F32x4, + definition: Named("llvm.ppc.altivec.vrfiz") + }, "_vec_loge" => Intrinsic { inputs: { static INPUTS: [&'static Type; 1] = [&::F32x4]; &INPUTS }, output: &::F32x4,