cranelift: Add MinGW fma regression tests (#4517)

* cranelift: Add MinGW `fma` regression tests

* cranelift: Fix FMA in interpreter

* cranelift: Add separate `fma` test suite for the interpreter

The interpreter can run `fma.clif` on most platforms, however on
`x86_64-pc-windows-gnu` we use libm which has issues with some inputs.
We should delete `fma-interpreter.clif` and enable the interpreter on
the main `fma.clif` file once those are fixed.
This commit is contained in:
Afonso Bordado
2022-07-29 15:09:37 +01:00
committed by GitHub
parent 46782b18c2
commit 1f058a02c0
6 changed files with 70 additions and 15 deletions

View File

@@ -770,12 +770,6 @@ impl Ieee32 {
f32::from_bits(self.0)
}
/// Fused multiply-add. Computes (self * a) + b with only one rounding error, yielding a
/// more accurate result than an unfused multiply-add.
pub fn mul_add(&self, a: Self, b: Self) -> Self {
Self::with_float(self.as_f32().mul_add(a.as_f32(), b.as_f32()))
}
/// Returns the square root of self.
pub fn sqrt(self) -> Self {
Self::with_float(self.as_f32().sqrt())
@@ -962,12 +956,6 @@ impl Ieee64 {
f64::from_bits(self.0)
}
/// Fused multiply-add. Computes (self * a) + b with only one rounding error, yielding a
/// more accurate result than an unfused multiply-add.
pub fn mul_add(&self, a: Self, b: Self) -> Self {
Self::with_float(self.as_f64().mul_add(a.as_f64(), b.as_f64()))
}
/// Returns the square root of self.
pub fn sqrt(self) -> Self {
Self::with_float(self.as_f64().sqrt())