test overflowing Div/Rem

This commit is contained in:
Ralf Jung 2022-03-01 18:44:37 -05:00
parent aa4f82ea48
commit 363236e2d4

View File

@ -20,7 +20,9 @@ fn simd_ops_i32() {
assert_eq!(a * b, i32x4::from_array([10, 20, 30, 40]));
assert_eq!(a / b, i32x4::from_array([10, 5, 3, 2]));
assert_eq!(a / i32x4::splat(2), i32x4::splat(5));
assert_eq!(i32x2::splat(i32::MIN) / i32x2::splat(-1), i32x2::splat(i32::MIN));
assert_eq!(a % b, i32x4::from_array([0, 0, 1, 2]));
assert_eq!(i32x2::splat(i32::MIN) % i32x2::splat(-1), i32x2::splat(0));
assert_eq!(b << i32x4::splat(2), i32x4::from_array([4, 8, 12, 16]));
assert_eq!(b >> i32x4::splat(1), i32x4::from_array([0, 1, 1, 2]));
assert_eq!(b & i32x4::splat(2), i32x4::from_array([0, 2, 2, 0]));