Skip to content

Commit 881249c

Browse files
folkertdevAmanieu
authored andcommitted
use the simd_fma intrinsic for vec_madd
1 parent 4793c09 commit 881249c

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

crates/core_arch/src/powerpc/altivec.rs

+3-5
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,6 @@ unsafe extern "C" {
129129
b: vector_signed_short,
130130
c: vector_signed_int,
131131
) -> vector_signed_int;
132-
#[link_name = "llvm.ppc.altivec.vmaddfp"]
133-
fn vmaddfp(a: vector_float, b: vector_float, c: vector_float) -> vector_float;
134132
#[link_name = "llvm.ppc.altivec.vnmsubfp"]
135133
fn vnmsubfp(a: vector_float, b: vector_float, c: vector_float) -> vector_float;
136134
#[link_name = "llvm.ppc.altivec.vsum2sws"]
@@ -1869,8 +1867,8 @@ mod sealed {
18691867
#[inline]
18701868
#[target_feature(enable = "altivec")]
18711869
#[cfg_attr(test, assert_instr(vmaddfp))]
1872-
unsafe fn vec_vmaddfp(a: vector_float, b: vector_float, c: vector_float) -> vector_float {
1873-
vmaddfp(a, b, c)
1870+
pub unsafe fn vec_vmaddfp(a: vector_float, b: vector_float, c: vector_float) -> vector_float {
1871+
simd_fma(a, b, c)
18741872
}
18751873

18761874
#[inline]
@@ -4234,7 +4232,7 @@ where
42344232
#[target_feature(enable = "altivec")]
42354233
#[unstable(feature = "stdarch_powerpc", issue = "111145")]
42364234
pub unsafe fn vec_madd(a: vector_float, b: vector_float, c: vector_float) -> vector_float {
4237-
vmaddfp(a, b, c)
4235+
sealed::vec_vmaddfp(a, b, c)
42384236
}
42394237

42404238
/// Vector Negative Multiply Subtract

0 commit comments

Comments
 (0)