Legalize i64.const by breaking it into two i32.const, on 32-bits platforms;
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
12
cranelift/filetests/filetests/legalizer/iconst-i64.clif
Normal file
12
cranelift/filetests/filetests/legalizer/iconst-i64.clif
Normal 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
|
||||
Reference in New Issue
Block a user