Files
wasmtime/cranelift/filetests/filetests/runtests/fcmp.clif

63 lines
1.3 KiB
Plaintext

test run
target aarch64
target s390x
target x86_64
function %fcmp_eq(f64, f64) -> b1 {
block0(v0: f64, v1: f64):
v2 = fcmp eq v0, v1
return v2
}
; run: %fcmp_eq(0x1.0, 0x1.0) == true
; run: %fcmp_eq(0x1.0, 0x0.0) == false
function %fcmp_ne(f64, f64) -> b1 {
block0(v0: f64, v1: f64):
v2 = fcmp ne v0, v1
return v2
}
; run: %fcmp_ne(0x1.0, 0x1.0) == false
; run: %fcmp_ne(0x1.0, 0x0.0) == true
function %fcmp_lt(f64, f64) -> b1 {
block0(v0: f64, v1: f64):
v2 = fcmp lt v0, v1
return v2
}
; run: %fcmp_lt(0x1.0, 0x1.0) == false
; run: %fcmp_lt(0x1.0, 0x0.0) == false
; run: %fcmp_lt(0x1.0, 0x2.3) == true
function %fcmp_le(f64, f64) -> b1 {
block0(v0: f64, v1: f64):
v2 = fcmp le v0, v1
return v2
}
; run: %fcmp_le(0x1.0, 0x1.0) == true
; run: %fcmp_le(0x1.0, 0x0.0) == false
; run: %fcmp_le(0x1.0, 0x2.3) == true
function %fcmp_gt(f64, f64) -> b1 {
block0(v0: f64, v1: f64):
v2 = fcmp gt v0, v1
return v2
}
; run: %fcmp_gt(0x1.0, 0x1.0) == false
; run: %fcmp_gt(0x1.0, 0x0.0) == true
; run: %fcmp_gt(0x1.0, 0x2.3) == false
function %fcmp_ge(f64, f64) -> b1 {
block0(v0: f64, v1: f64):
v2 = fcmp ge v0, v1
return v2
}
; run: %fcmp_ge(0x1.0, 0x1.0) == true
; run: %fcmp_ge(0x1.0, 0x0.0) == true
; run: %fcmp_ge(0x1.0, 0x2.3) == false