From 5574cee0e3fd0e1e9266f2da9e41da97ffe80a6b Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 6 Jan 2025 09:51:46 -0800 Subject: [PATCH] Fix fma test on MinGW prtest:full --- crates/math/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/math/src/lib.rs b/crates/math/src/lib.rs index fee95bc10af3..ae305cd9df61 100644 --- a/crates/math/src/lib.rs +++ b/crates/math/src/lib.rs @@ -272,8 +272,10 @@ impl WasmFloat for f64 { } #[inline] fn mul_add(self, b: f64, c: f64) -> f64 { + // The MinGW implementation of `fma` differs from other platforms, so + // favor `libm` there instead. #[cfg(feature = "std")] - if true { + if !(cfg!(windows) && cfg!(target_env = "gnu")) { return self.mul_add(b, c); } libm::fma(self, b, c)