Skip to content

Commit 1206ae2

Browse files
committed
Add support for Vector Log2 Estimate Float on PowerPC
1 parent f52f1ab commit 1206ae2

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/etc/platform-intrinsics/powerpc.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,13 @@
240240
"llvm": "vrfim",
241241
"ret": "f32",
242242
"args": ["0"]
243+
},
244+
{
245+
"intrinsic": "loge",
246+
"width": [128],
247+
"llvm": "vlogefp",
248+
"ret": "f32",
249+
"args": ["0"]
243250
}
244251
]
245252
}

src/librustc_platform_intrinsics/powerpc.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,11 @@ pub fn find(name: &str) -> Option<Intrinsic> {
412412
output: &::F32x4,
413413
definition: Named("llvm.ppc.altivec.vrfim")
414414
},
415+
"_vec_loge" => Intrinsic {
416+
inputs: { static INPUTS: [&'static Type; 1] = [&::F32x4]; &INPUTS },
417+
output: &::F32x4,
418+
definition: Named("llvm.ppc.altivec.vlogefp")
419+
},
415420
_ => return None,
416421
})
417422
}

0 commit comments

Comments
 (0)