Files
wasmtime/cranelift/filetests/filetests/runtests/icmp.clif
Afonso Bordado f48e40f150 cranelift: Implement icmp for scalar types
Add `icmp` tests for all scalar types and condition codes.

AArch64 (no)overflow tests are disabled because they are currently failing.
2021-09-11 17:15:44 +01:00

19 lines
514 B
Plaintext

test interpret
test run
target aarch64
target s390x
target x86_64 machinst
; This test is also a regression test for aarch64.
; We were not correctly handling the fact that the rhs constant value
; overflows its type when viewed as a signed value, and thus encoding the wrong
; value into the resulting instruction.
function %overflow_rhs_const(i8) -> b1 {
block0(v0: i8):
v1 = iconst.i8 192
v2 = icmp sge v0, v1
return v2
}
; run: %overflow_rhs_con(49) == true
; run: %overflow_rhs_con(-65) == false