cranelift: Avoid lowering VEX instructions with memory encodings (#4768)

This commit is contained in:
Afonso Bordado
2022-08-24 18:35:06 +01:00
committed by GitHub
parent d394edcefe
commit 7e3c481f4e
2 changed files with 25 additions and 4 deletions

View File

@@ -136,3 +136,16 @@ block0(v0: f64, v1: f64, v2: f64):
; run: %fma_is_nan_f64(-NaN, 0x0.0, 0x0.0) == 1
; run: %fma_is_nan_f64(0x0.0, -NaN, 0x0.0) == 1
; run: %fma_is_nan_f64(0x0.0, 0x0.0, -NaN) == 1
; This is a regression test for the native fma instruction
; Discovered by the fuzzer in: https://github.com/bytecodealliance/wasmtime/issues/4759
function %fma_load_f32(f32, f32, f32) -> f32 {
ss0 = explicit_slot 4
block0(v0: f32, v1: f32, v2: f32):
stack_store.f32 v2, ss0
v3 = stack_load.f32 ss0
v4 = fma v0, v1, v3
return v4
}
; run: %fma_load_f32(0x9.0, 0x9.0, 0x9.0) == 0x1.680000p6