Fix tests

This commit is contained in:
bjorn3
2021-08-27 18:28:33 +02:00
parent 8adb40b2b8
commit b79e59882d
2 changed files with 37 additions and 32 deletions

View File

@@ -0,0 +1,36 @@
test run
; target s390x TODO: Not yet implemented on s390x
set enable_simd
target aarch64
target x86_64 machinst skylake
function %fmin_pseudo_f32x4(f32x4, f32x4) -> f32x4 {
block0(v0:f32x4, v1:f32x4):
v2 = fmin_pseudo v0, v1
return v2
}
; run: %fmin_pseudo_f32x4([0x1.0 NaN 0x0.1 -0x0.0], [0x2.0 0x2.0 NaN 0x0.0]) == [0x1.0 NaN 0x0.1 -0x0.0]
function %fmax_pseudo_f32x4(f32x4, f32x4) -> f32x4 {
block0(v0:f32x4, v1:f32x4):
v2 = fmax_pseudo v0, v1
return v2
}
; run: %fmax_pseudo_f32x4([0x1.0 NaN 0x0.1 -0x0.0], [0x2.0 0x2.0 NaN 0x0.0]) == [0x2.0 NaN 0x0.1 -0x0.0]
function %fmin_pseudo_f64x2(f64x2, f64x2) -> f64x2 {
block0(v0:f64x2, v1:f64x2):
v2 = fmin_pseudo v0, v1
return v2
}
; run: %fmin_pseudo_f64x2([0x1.0 NaN], [0x2.0 0x2.0]) == [0x1.0 NaN]
; run: %fmin_pseudo_f64x2([0x0.1 -0x0.0], [NaN 0x0.0]) == [0x0.1 -0x0.0]
function %fmax_pseudo_f64x2(f64x2, f64x2) -> f64x2 {
block0(v0:f64x2, v1:f64x2):
v2 = fmax_pseudo v0, v1
return v2
}
; run: %fmax_pseudo_f64x2([0x1.0 NaN], [0x2.0 0x2.0]) == [0x2.0 NaN]
; run: %fmax_pseudo_f64x2([0x0.1 -0x0.0], [NaN 0x0.0]) == [0x0.1 -0x0.0]

View File

@@ -1,5 +1,6 @@
test run
; target s390x TODO: Not yet implemented on s390x
; target aarch64 TODO: Not yet implemented on aarch64
set enable_simd
target x86_64 machinst skylake
@@ -47,35 +48,3 @@ block0(v0:f64, v1:f64):
; run: %fmax_pseudo_f64(0x0.0, 0x0.0) == 0x0.0
; run: %fmax_pseudo_f64(-0x0.0, 0x0.0) == -0x0.0
target aarch64 ; TODO scalar fmin_pseudo and fmax_pseudo are unimplemented for AArch64
function %fmin_pseudo_f32x4(f32x4, f32x4) -> f32x4 {
block0(v0:f32x4, v1:f32x4):
v2 = fmin_pseudo v0, v1
return v2
}
; run: %fmin_pseudo_f32x4([0x1.0 NaN 0x0.1 -0x0.0], [0x2.0 0x2.0 NaN 0x0.0]) == [0x1.0 NaN 0x0.1 -0x0.0]
function %fmax_pseudo_f32x4(f32x4, f32x4) -> f32x4 {
block0(v0:f32x4, v1:f32x4):
v2 = fmax_pseudo v0, v1
return v2
}
; run: %fmax_pseudo_f32x4([0x1.0 NaN 0x0.1 -0x0.0], [0x2.0 0x2.0 NaN 0x0.0]) == [0x2.0 NaN 0x0.1 -0x0.0]
function %fmin_pseudo_f64x2(f64x2, f64x2) -> f64x2 {
block0(v0:f64x2, v1:f64x2):
v2 = fmin_pseudo v0, v1
return v2
}
; run: %fmin_pseudo_f64x2([0x1.0 NaN], [0x2.0 0x2.0]) == [0x1.0 NaN]
; run: %fmin_pseudo_f64x2([0x0.1 -0x0.0], [NaN 0x0.0]) == [0x0.1 -0x0.0]
function %fmax_pseudo_f64x2(f64x2, f64x2) -> f64x2 {
block0(v0:f64x2, v1:f64x2):
v2 = fmax_pseudo v0, v1
return v2
}
; run: %fmax_pseudo_f64x2([0x1.0 NaN], [0x2.0 0x2.0]) == [0x2.0 NaN]
; run: %fmax_pseudo_f64x2([0x0.1 -0x0.0], [NaN 0x0.0]) == [0x0.1 -0x0.0]