Skip to content

Commit a424205

Browse files
Use Mask::any in div check
1 parent bc326a2 commit a424205

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

crates/core_simd/src/ops.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::simd::{LaneCount, Mask, Simd, SimdElement, SupportedLaneCount};
1+
use crate::simd::{LaneCount, Simd, SimdElement, SupportedLaneCount};
22
use core::ops::{Add, Mul};
33
use core::ops::{BitAnd, BitOr, BitXor};
44
use core::ops::{Div, Rem, Sub};
@@ -70,8 +70,7 @@ macro_rules! int_divrem_guard {
7070
if $rhs.lanes_eq(Simd::splat(0)).any() {
7171
panic!($zero);
7272
} else if <$int>::MIN != 0
73-
&& $lhs.lanes_eq(Simd::splat(<$int>::MIN)) & $rhs.lanes_eq(Simd::splat(-1 as _))
74-
!= Mask::splat(false)
73+
&& ($lhs.lanes_eq(Simd::splat(<$int>::MIN)) & $rhs.lanes_eq(Simd::splat(-1 as _))).any()
7574
{
7675
panic!($overflow);
7776
} else {

0 commit comments

Comments
 (0)