This commit goes through the `runtests` folder of the `filetests` test suite and ensure that everything which uses simd or float-related instructions on x64 is executed with the baseline support for x86_64 in addition to adding in AVX support. Most of the instructions used have AVX equivalents so this should help test all of the equivalents in addition to the codegen filetests in the x64 folder.
30 lines
1.1 KiB
Plaintext
30 lines
1.1 KiB
Plaintext
; Test the non-deterministic aspects of the SIMD arithmetic operations.
|
|
; If you change this file, you should most likely update
|
|
; simd-arithmetic-nondeterministic*.clif as well.
|
|
test run
|
|
set enable_simd
|
|
target x86_64
|
|
target x86_64 skylake
|
|
|
|
function %fmax_f64x2(f64x2, f64x2) -> f64x2 {
|
|
block0(v0: f64x2, v1: f64x2):
|
|
v2 = fmax v0, v1
|
|
return v2
|
|
}
|
|
|
|
; note below how NaNs are quieted but (unlike fmin), retain their sign: this discrepancy is allowed by non-determinism
|
|
; in the spec, see https://webassembly.github.io/spec/core/bikeshed/index.html#nan-propagation%E2%91%A0.
|
|
; run: %fmax_f64x2([NaN:0x42 0.0], [0x1.0 0.0]) == [NaN 0.0]
|
|
|
|
function %fmin_f64x2(f64x2, f64x2) -> f64x2 {
|
|
block0(v0: f64x2, v1: f64x2):
|
|
v2 = fmin v0, v1
|
|
return v2
|
|
}
|
|
|
|
; note below how NaNs are quieted and negative: this is due to non-determinism in the spec for NaNs, see
|
|
; https://webassembly.github.io/spec/core/bikeshed/index.html#nan-propagation%E2%91%A0.
|
|
; run: %fmin_f64x2([-NaN 0x100.0], [0.0 NaN]) == [-NaN -NaN]
|
|
; run: %fmin_f64x2([NaN 0.0], [0.0 0.0]) == [-NaN 0.0]
|
|
; run: %fmin_f64x2([NaN:0x42 0.0], [0x1.0 0.0]) == [-NaN 0.0]
|