Legalize i64.const by breaking it into two i32.const, on 32-bits platforms;

This commit is contained in:
Benjamin Bouvier
2019-08-30 13:01:03 +02:00
parent 6f1ed94e82
commit 3aa76b558c
5 changed files with 62 additions and 9 deletions

View File

@@ -62,14 +62,6 @@ ebb0:
return v1
}
function %f64const() -> f64 {
ebb0:
v1 = f64const 0x1.0p1
; check: $(tmp=$V) = iconst.i64
; check: v1 = bitcast.f64 $tmp
return v1
}
function %select_f64(f64, f64, i32) -> f64 {
ebb0(v0: f64, v1: f64, v2: i32):
v3 = select v2, v0, v1

View File

@@ -0,0 +1,13 @@
; Test the legalization of f64const.
test legalizer
target x86_64
; regex: V=v\d+
function %f64const() -> f64 {
ebb0:
v1 = f64const 0x1.0p1
; check: $(tmp=$V) = iconst.i64
; check: v1 = bitcast.f64 $tmp
return v1
}

View File

@@ -0,0 +1,12 @@
test legalizer
target i686
function %foo() -> i64 {
ebb0:
v1 = iconst.i64 0x6400000042
return v1
}
; check: v2 = iconst.i32 66
; check: v3 = iconst.i32 100
; check: v1 = iconcat v2, v3