diff --git a/coresimd/ppsv/api/rotates.rs b/coresimd/ppsv/api/rotates.rs index eef0655fb7..bff498b7c8 100644 --- a/coresimd/ppsv/api/rotates.rs +++ b/coresimd/ppsv/api/rotates.rs @@ -16,7 +16,7 @@ macro_rules! impl_vector_rotates { const LANE_WIDTH: $elem_ty = ::mem::size_of::<$elem_ty>() as $elem_ty * 8; // Protect against undefined behavior for over-long bit shifts let n = n % LANE_WIDTH; - (self << n) | (self >> ((LANE_WIDTH - n) % LANE_WIDTH)) + (self << n) | (self >> (LANE_WIDTH - n)) } /// Shifts the bits of each lane to the right by the specified amount in @@ -31,7 +31,7 @@ macro_rules! impl_vector_rotates { const LANE_WIDTH: $elem_ty = ::mem::size_of::<$elem_ty>() as $elem_ty * 8; // Protect against undefined behavior for over-long bit shifts let n = n % LANE_WIDTH; - (self >> n) | (self << ((LANE_WIDTH - n) % LANE_WIDTH)) + (self >> n) | (self << (LANE_WIDTH - n)) } } };