Files
wasmtime/cranelift/filetests/filetests/runtests/i128-br.clif
Afonso Bordado 45faace329 aarch64: Implement i128 br_icmp
The previous commit deduplicated the icmp impl, so we reuse that
but make modifications where we don't need to set the results.
2021-06-19 22:01:33 +01:00

46 lines
826 B
Plaintext

test run
target aarch64
; target s390x TODO: Not yet implemented on s390x
target x86_64 machinst
target x86_64 legacy
function %i128_brz(i64, i64) -> b1 {
block0(v0: i64, v1: i64):
v2 = iconcat v0, v1
brz v2, block2
jump block1
block1:
v3 = bconst.b1 false
return v3
block2:
v4 = bconst.b1 true
return v4
}
; run: %i128_brz(0, 0) == true
; run: %i128_brz(-1, 0) == false
; run: %i128_brz(0, -1) == false
; run: %i128_brz(-1, -1) == false
function %i128_brnz(i64, i64) -> b1 {
block0(v0: i64, v1: i64):
v2 = iconcat v0, v1
brnz v2, block2
jump block1
block1:
v3 = bconst.b1 false
return v3
block2:
v4 = bconst.b1 true
return v4
}
; run: %i128_brnz(0, 0) == false
; run: %i128_brnz(-1, 0) == true
; run: %i128_brnz(0, -1) == true
; run: %i128_brnz(-1, -1) == true