Codegen fix fcvt_from_sint.f32 with small types on riscv64. (#5964)

* fix issue5952

* We should only extend i8 and i16

* remove extra space

* move some code
This commit is contained in:
yuyang
2023-03-10 18:29:55 +08:00
committed by GitHub
parent 0ec7b872fa
commit 4e875f33a7
4 changed files with 42 additions and 10 deletions

View File

@@ -802,12 +802,12 @@
;;;;; Rules for `fcvt_from_sint`;;;;;;;;;
(rule
(lower (has_type to (fcvt_from_sint v @ (value_type from))))
(fpu_rr (int_convert_2_float_op from $true to) to v))
(fpu_rr (int_convert_2_float_op from $true to) to (normalize_fcvt_from_int v from (ExtendOp.Signed))))
;;;;; Rules for `fcvt_from_uint`;;;;;;;;;
(rule
(lower (has_type to (fcvt_from_uint v @ (value_type from))))
(fpu_rr (int_convert_2_float_op from $false to) to v))
(fpu_rr (int_convert_2_float_op from $false to) to (normalize_fcvt_from_int v from (ExtendOp.Zero))))
;;;;; Rules for `symbol_value`;;;;;;;;;
(rule