Skip to content

Commit 8fb0bcb

Browse files
committed
Add support for Vector Reciprocal Estimate Float on PowerPC
1 parent 1206ae2 commit 8fb0bcb

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
@@ -247,6 +247,13 @@
247247
"llvm": "vlogefp",
248248
"ret": "f32",
249249
"args": ["0"]
250+
},
251+
{
252+
"intrinsic": "re",
253+
"width": [128],
254+
"llvm": "vrefp",
255+
"ret": "f32",
256+
"args": ["0"]
250257
}
251258
]
252259
}

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.vlogefp")
419419
},
420+
"_vec_re" => Intrinsic {
421+
inputs: { static INPUTS: [&'static Type; 1] = [&::F32x4]; &INPUTS },
422+
output: &::F32x4,
423+
definition: Named("llvm.ppc.altivec.vrefp")
424+
},
420425
_ => return None,
421426
})
422427
}

0 commit comments

Comments
 (0)