Browse Source

Fix tests

pull/3115/head
bjorn3 3 years ago
parent
commit
b79e59882d
  1. 36
      cranelift/filetests/filetests/runtests/fmin-max-pseudo-vector.clif
  2. 33
      cranelift/filetests/filetests/runtests/fmin-max-pseudo.clif

36
cranelift/filetests/filetests/runtests/fmin-max-pseudo-vector.clif

@ -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]

33
cranelift/filetests/filetests/runtests/fmin-max-pseudo.clif

@ -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]

Loading…
Cancel
Save