Files
wasmtime/cranelift/filetests/filetests/runtests/issue5528.clif
yuyang 0c66a1bba7 Fix issue 5528 (#5605)
* fix parameter error.

* fix float convert to i8 and i16   should extract sign bit.

* add missing regression test file.

* using tmp register.

* float convert i8 will consume more instructions.

* fix worse inst emit size.

* fix worst_case_size.
2023-01-31 15:37:36 -08:00

20 lines
317 B
Plaintext

test interpret
test run
target riscv64
function %a(f32) -> i8 system_v {
block0(v0: f32):
v1 = fcvt_to_sint_sat.i8 v0
return v1
}
; run: %a(-0x1.000006p125) == -128
function %b(f32) -> i16 system_v {
block0(v0: f32):
v1 = fcvt_to_sint_sat.i16 v0
return v1
}
; run: %b(-0x1.000006p125) == -32768