Skip to content

Commit 9dd3690

Browse files
committed
Add support for Vector Round on PowerPC
1 parent 3740d32 commit 9dd3690

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
@@ -248,6 +248,13 @@
248248
"ret": "f32",
249249
"args": ["0"]
250250
},
251+
{
252+
"intrinsic": "round",
253+
"width": [128],
254+
"llvm": "vrfin",
255+
"ret": "f32",
256+
"args": ["0"]
257+
},
251258
{
252259
"intrinsic": "loge",
253260
"width": [128],

src/librustc_platform_intrinsics/powerpc.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,11 @@ pub fn find(name: &str) -> Option<Intrinsic> {
417417
output: &::F32x4,
418418
definition: Named("llvm.ppc.altivec.vrfip")
419419
},
420+
"_vec_round" => Intrinsic {
421+
inputs: { static INPUTS: [&'static Type; 1] = [&::F32x4]; &INPUTS },
422+
output: &::F32x4,
423+
definition: Named("llvm.ppc.altivec.vrfin")
424+
},
420425
"_vec_loge" => Intrinsic {
421426
inputs: { static INPUTS: [&'static Type; 1] = [&::F32x4]; &INPUTS },
422427
output: &::F32x4,

0 commit comments

Comments
 (0)