Skip to content

Commit f0bb812

Browse files
authored
Merge pull request #2061 from RalfJung/f64-tests
s390x: add f64 tests for vec_min
2 parents 7a5ba5a + 44c14df commit f0bb812

1 file changed

Lines changed: 14 additions & 3 deletions

File tree

crates/core_arch/src/s390x/vector.rs

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7491,19 +7491,30 @@ mod tests {
74917491
[0, !0, !0, !0]
74927492
}
74937493

7494-
// f32 is the tricky case for max/min as that needs a fallback on z13
7495-
test_vec_2! { test_vec_max, vec_max, f32x4, f32x4 -> f32x4,
7494+
test_vec_2! { test_vec_max_f32, vec_max, f32x4, f32x4 -> f32x4,
74967495
[1.0, f32::NAN, f32::INFINITY, 2.0],
74977496
[-10.0, -10.0, 5.0, f32::NAN],
74987497
[1.0, -10.0, f32::INFINITY, 2.0]
74997498
}
75007499

7501-
test_vec_2! { test_vec_min, vec_min, f32x4, f32x4 -> f32x4,
7500+
test_vec_2! { test_vec_min_f32, vec_min, f32x4, f32x4 -> f32x4,
75027501
[1.0, f32::NAN, f32::INFINITY, 2.0],
75037502
[-10.0, -10.0, 5.0, f32::NAN],
75047503
[-10.0, -10.0, 5.0, 2.0]
75057504
}
75067505

7506+
test_vec_2! { test_vec_max_f64, vec_max, f64x2, f64x2 -> f64x2,
7507+
[f64::NAN, 2.0],
7508+
[-10.0, f64::NAN],
7509+
[-10.0, 2.0]
7510+
}
7511+
7512+
test_vec_2! { test_vec_min_f64, vec_min, f64x2, f64x2 -> f64x2,
7513+
[f64::NAN, 2.0],
7514+
[-10.0, f64::NAN],
7515+
[-10.0, 2.0]
7516+
}
7517+
75077518
#[simd_test(enable = "vector")]
75087519
fn test_vec_meadd() {
75097520
let a = vector_unsigned_short([1, 0, 2, 0, 3, 0, 4, 0]);

0 commit comments

Comments
 (0)