Legalize uextend and sextend to 128bit ints
This commit is contained in:
26
cranelift/filetests/filetests/isa/x86/extend-i128-run.clif
Normal file
26
cranelift/filetests/filetests/isa/x86/extend-i128-run.clif
Normal file
@@ -0,0 +1,26 @@
|
||||
test run
|
||||
target x86_64
|
||||
|
||||
function u0:0() -> b1 {
|
||||
ebb0:
|
||||
v0 = iconst.i64 0xffff_ffff_eeee_0000
|
||||
v1 = uextend.i128 v0
|
||||
v2, v3 = isplit v1
|
||||
v4 = icmp_imm eq v2, 0xffff_ffff_eeee_0000
|
||||
v5 = icmp_imm eq v3, 0
|
||||
v6 = band v4, v5
|
||||
return v6
|
||||
}
|
||||
; run
|
||||
|
||||
function u0:1() -> b1 {
|
||||
ebb0:
|
||||
v0 = iconst.i64 0xffff_ffff_eeee_0000
|
||||
v1 = sextend.i128 v0
|
||||
v2, v3 = isplit v1
|
||||
v4 = icmp_imm eq v2, 0xffff_ffff_eeee_0000
|
||||
v5 = icmp_imm eq v3, 0xffff_ffff_ffff_ffff
|
||||
v6 = band v4, v5
|
||||
return v6
|
||||
}
|
||||
; run
|
||||
37
cranelift/filetests/filetests/isa/x86/extend-i128.clif
Normal file
37
cranelift/filetests/filetests/isa/x86/extend-i128.clif
Normal file
@@ -0,0 +1,37 @@
|
||||
test compile
|
||||
target x86_64
|
||||
|
||||
function u0:0() -> b1 {
|
||||
ebb0:
|
||||
v0 = iconst.i64 0xffff_ffff_eeee_0000
|
||||
; check: v0 = iconst.i64 0xffff_ffff_eeee_0000
|
||||
; nextln: v2 -> v0
|
||||
v1 = uextend.i128 v0
|
||||
; nextln: v7 = iconst.i64 0
|
||||
; nextln: v3 -> v7
|
||||
; nextln: v1 = iconcat v0, v7
|
||||
|
||||
v2, v3 = isplit v1
|
||||
v4 = icmp_imm eq v2, 0xffff_ffff_eeee_0000
|
||||
v5 = icmp_imm eq v3, 0
|
||||
|
||||
v6 = band v4, v5
|
||||
return v6
|
||||
}
|
||||
|
||||
function u0:1() -> b1 {
|
||||
ebb0:
|
||||
v0 = iconst.i64 0xffff_ffff_eeee_0000
|
||||
; check: v0 = iconst.i64 0xffff_ffff_eeee_0000
|
||||
; nextln: v2 -> v0
|
||||
v1 = sextend.i128 v0
|
||||
; nextln: v8 = copy v0
|
||||
; nextln: v7 = sshr_imm v8, 63
|
||||
; nextln: v3 -> v7
|
||||
|
||||
v2, v3 = isplit v1
|
||||
v4 = icmp_imm eq v2, 0xffff_ffff_eeee_0000
|
||||
v5 = icmp_imm eq v3, 0xffff_ffff_ffff_ffff
|
||||
v6 = band v4, v5
|
||||
return v6
|
||||
}
|
||||
Reference in New Issue
Block a user