From 43adc9c24ac4dc296f2de22f0e4dc347df15ff2a Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Tue, 7 Apr 2020 15:35:03 -0400 Subject: [PATCH] Fix arm I32x4 min/max operations that require on floating point values. --- simd/src/arm/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/simd/src/arm/mod.rs b/simd/src/arm/mod.rs index f9db6674..3fa5c7da 100644 --- a/simd/src/arm/mod.rs +++ b/simd/src/arm/mod.rs @@ -559,12 +559,12 @@ impl I32x4 { #[inline] pub fn max(self, other: I32x4) -> I32x4 { - unsafe { I32x4(simd_fmax(self.0, other.0)) } + unsafe { I32x4(simd_cast(simd_fmax(self.to_f32x4().0, other.to_f32x4().0))) } } #[inline] pub fn min(self, other: I32x4) -> I32x4 { - unsafe { I32x4(simd_fmin(self.0, other.0)) } + unsafe { I32x4(simd_cast(simd_fmin(self.to_f32x4().0, other.to_f32x4().0))) } } // Packed comparisons