mirror of
https://github.com/allankoechke/rust.git
synced 2026-12-04 17:22:19 +00:00
use the simd_fma intrinsic for vec_madd
This commit is contained in:
committed by
Amanieu d'Antras
parent
6a30c9320e
commit
aa4ce89f9e
@@ -129,8 +129,6 @@ unsafe extern "C" {
|
||||
b: vector_signed_short,
|
||||
c: vector_signed_int,
|
||||
) -> vector_signed_int;
|
||||
#[link_name = "llvm.ppc.altivec.vmaddfp"]
|
||||
fn vmaddfp(a: vector_float, b: vector_float, c: vector_float) -> vector_float;
|
||||
#[link_name = "llvm.ppc.altivec.vnmsubfp"]
|
||||
fn vnmsubfp(a: vector_float, b: vector_float, c: vector_float) -> vector_float;
|
||||
#[link_name = "llvm.ppc.altivec.vsum2sws"]
|
||||
@@ -1869,8 +1867,8 @@ mod sealed {
|
||||
#[inline]
|
||||
#[target_feature(enable = "altivec")]
|
||||
#[cfg_attr(test, assert_instr(vmaddfp))]
|
||||
unsafe fn vec_vmaddfp(a: vector_float, b: vector_float, c: vector_float) -> vector_float {
|
||||
vmaddfp(a, b, c)
|
||||
pub unsafe fn vec_vmaddfp(a: vector_float, b: vector_float, c: vector_float) -> vector_float {
|
||||
simd_fma(a, b, c)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
@@ -4234,7 +4232,7 @@ where
|
||||
#[target_feature(enable = "altivec")]
|
||||
#[unstable(feature = "stdarch_powerpc", issue = "111145")]
|
||||
pub unsafe fn vec_madd(a: vector_float, b: vector_float, c: vector_float) -> vector_float {
|
||||
vmaddfp(a, b, c)
|
||||
sealed::vec_vmaddfp(a, b, c)
|
||||
}
|
||||
|
||||
/// Vector Negative Multiply Subtract
|
||||
|
||||
Reference in New Issue
Block a user