Skip to content

Commit bfa1b0d

Browse files
folkertdevAmanieu
authored andcommitted
use simd_neg in the impl crate::ops::Neg
on s390x I had some problems with the old implementation not combining with other instructions well, and using the purpose-built intrinsic is just clearer.
1 parent f351152 commit bfa1b0d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

crates/core_arch/src/powerpc/macros.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,7 @@ macro_rules! impl_neg {
298298
impl crate::ops::Neg for s_t_l!($s) {
299299
type Output = s_t_l!($s);
300300
fn neg(self) -> Self::Output {
301-
let zero = $s::splat($zero);
302-
unsafe { transmute(simd_sub(zero, transmute(self))) }
301+
unsafe { simd_neg(self) }
303302
}
304303
}
305304
};

0 commit comments

Comments
 (0)