Legalize unsigned-to-float conversions for Intel 64.
Also make sure we generate type checks for the controlling type variable in legalization patterns. This is not needed for encodings since the encoding tables are already keyed on the controlling type variable.
This commit is contained in:
@@ -49,25 +49,47 @@ ebb0(v0: i32):
|
||||
return v1
|
||||
}
|
||||
|
||||
function %f32_convert_u_i32(i32) -> f32 {
|
||||
ebb0(v0: i32):
|
||||
v1 = fcvt_from_uint.f32 v0
|
||||
return v1
|
||||
}
|
||||
|
||||
function %f64_convert_s_i32(i32) -> f64 {
|
||||
ebb0(v0: i32):
|
||||
v1 = fcvt_from_sint.f64 v0
|
||||
return v1
|
||||
}
|
||||
|
||||
function %f64_convert_u_i32(i32) -> f64 {
|
||||
ebb0(v0: i32):
|
||||
v1 = fcvt_from_uint.f64 v0
|
||||
return v1
|
||||
}
|
||||
|
||||
function %f32_convert_s_i64(i64) -> f32 {
|
||||
ebb0(v0: i64):
|
||||
v1 = fcvt_from_sint.f32 v0
|
||||
return v1
|
||||
}
|
||||
|
||||
function %f32_convert_u_i64(i64) -> f32 {
|
||||
ebb0(v0: i64):
|
||||
v1 = fcvt_from_uint.f32 v0
|
||||
return v1
|
||||
}
|
||||
|
||||
function %f64_convert_s_i64(i64) -> f64 {
|
||||
ebb0(v0: i64):
|
||||
v1 = fcvt_from_sint.f64 v0
|
||||
return v1
|
||||
}
|
||||
|
||||
; TODO: f*_convert_u_i* (Don't exist on Intel).
|
||||
function %f64_convert_u_i64(i64) -> f64 {
|
||||
ebb0(v0: i64):
|
||||
v1 = fcvt_from_uint.f64 v0
|
||||
return v1
|
||||
}
|
||||
|
||||
function %i32_reinterpret_f32(f32) -> i32 {
|
||||
ebb0(v0: f32):
|
||||
|
||||
Reference in New Issue
Block a user