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.
This commit is contained in:
yuyang
2023-02-01 07:37:36 +08:00
committed by GitHub
parent 8c9eb9939b
commit 0c66a1bba7
5 changed files with 113 additions and 6 deletions

View File

@@ -0,0 +1,20 @@
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