Correctly zero extend operand of fcvt_from_uint for 8ints and 16bit ints (#997)

Fixes #996
This commit is contained in:
bjorn3
2019-09-18 10:06:15 +02:00
committed by Benjamin Bouvier
parent 156938facf
commit add6a4f269
3 changed files with 26 additions and 19 deletions

View File

@@ -0,0 +1,13 @@
test compile
target x86_64
function u0:0() -> f32 system_v {
ebb0:
v0 = iconst.i8 255
; check: v2 = iconst.i32 255
; nextln: v0 = ireduce.i8 v2
v1 = fcvt_from_uint.f32 v0
; nextln: v3 = uextend.i64 v0
; nextln: v1 = fcvt_from_sint.f32 v3
return v1
}