Browse Source
* 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.pull/4553/head
Afonso Bordado
2 years ago
committed by
GitHub
6 changed files with 70 additions and 15 deletions
@ -0,0 +1,25 @@ |
|||
test interpret |
|||
|
|||
; 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 this file and enable the interpreter |
|||
; on the main `fma.clif` file once those are fixed. |
|||
|
|||
; See: https://github.com/bytecodealliance/wasmtime/pull/4517 |
|||
; See: https://github.com/rust-lang/libm/issues/263 |
|||
|
|||
function %fma_f32(f32, f32, f32) -> f32 { |
|||
block0(v0: f32, v1: f32, v2: f32): |
|||
v3 = fma v0, v1, v2 |
|||
return v3 |
|||
} |
|||
; run: %fma_f32(0x9.0, 0x9.0, 0x9.0) == 0x1.680000p6 |
|||
; run: %fma_f32(0x83.0, 0x2.68091p6, 0x9.88721p1) == 0x1.3b88e6p14 |
|||
|
|||
|
|||
function %fma_f64(f64, f64, f64) -> f64 { |
|||
block0(v0: f64, v1: f64, v2: f64): |
|||
v3 = fma v0, v1, v2 |
|||
return v3 |
|||
} |
|||
; run: %fma_f64(0x9.0, 0x9.0, 0x9.0) == 0x1.680000p6 |
|||
; run: %fma_f64(0x1.3b88ea148dd4ap14, 0x2.680916809121p6, 0x9.887218721837p1) == 0x1.7ba6ebee17417p21 |
Loading…
Reference in new issue