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.
21 lines
522 B
Plaintext
21 lines
522 B
Plaintext
test preopt
|
|
target aarch64
|
|
target x86_64
|
|
|
|
function %constant_fold(f64) -> f64 {
|
|
block0(v0: f64):
|
|
v1 = f64const 0x1.0000000000000p0
|
|
v2 = f64const 0x1.0000000000000p1
|
|
v3 = fadd v1, v2
|
|
v4 = fadd v3, v0
|
|
return v4
|
|
}
|
|
; sameln: function %constant_fold(f64) -> f64 fast {
|
|
; nextln: block0(v0: f64):
|
|
; nextln: v1 = f64const 0x1.0000000000000p0
|
|
; nextln: v2 = f64const 0x1.0000000000000p1
|
|
; nextln: v3 = f64const 0x1.8000000000000p1
|
|
; nextln: v4 = fadd v3, v0
|
|
; nextln: return v4
|
|
; nextln: }
|