The tests for the SIMD floating-point maximum and minimum operations require particular care because the handling of the NaN values is non-deterministic and may vary between platforms. There is no way to match several NaN values in a test, so the solution is to extract the non-deterministic test cases into a separate file that is subsequently replicated for every backend under test, with adjustments made to the expected results. Copyright (c) 2021, Arm Limited.
49 lines
880 B
Plaintext
49 lines
880 B
Plaintext
; Test code generation for WebAssembly f64 comparison operators.
|
|
test compile
|
|
|
|
target aarch64
|
|
target i686 haswell
|
|
target x86_64 haswell
|
|
|
|
function %f64_eq(f64, f64) -> i32 {
|
|
block0(v0: f64, v1: f64):
|
|
v2 = fcmp eq v0, v1
|
|
v3 = bint.i32 v2
|
|
return v3
|
|
}
|
|
|
|
function %f64_ne(f64, f64) -> i32 {
|
|
block0(v0: f64, v1: f64):
|
|
v2 = fcmp ne v0, v1
|
|
v3 = bint.i32 v2
|
|
return v3
|
|
}
|
|
|
|
function %f64_lt(f64, f64) -> i32 {
|
|
block0(v0: f64, v1: f64):
|
|
v2 = fcmp lt v0, v1
|
|
v3 = bint.i32 v2
|
|
return v3
|
|
}
|
|
|
|
function %f64_gt(f64, f64) -> i32 {
|
|
block0(v0: f64, v1: f64):
|
|
v2 = fcmp gt v0, v1
|
|
v3 = bint.i32 v2
|
|
return v3
|
|
}
|
|
|
|
function %f64_le(f64, f64) -> i32 {
|
|
block0(v0: f64, v1: f64):
|
|
v2 = fcmp le v0, v1
|
|
v3 = bint.i32 v2
|
|
return v3
|
|
}
|
|
|
|
function %f64_ge(f64, f64) -> i32 {
|
|
block0(v0: f64, v1: f64):
|
|
v2 = fcmp ge v0, v1
|
|
v3 = bint.i32 v2
|
|
return v3
|
|
}
|