File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -94,6 +94,36 @@ macro_rules! impl_binary_checked_op_test {
9494macro_rules! impl_common_integer_tests {
9595 { $vector: ident, $scalar: ident } => {
9696 test_helpers:: test_lanes! {
97+ fn shr<const LANES : usize >( ) {
98+ use core:: ops:: Shr ;
99+ let shr = |x: $scalar, y: $scalar| x. wrapping_shr( y as _) ;
100+ test_helpers:: test_binary_elementwise(
101+ & <$vector:: <LANES > as Shr <$vector:: <LANES >>>:: shr,
102+ & shr,
103+ & |_, _| true ,
104+ ) ;
105+ test_helpers:: test_binary_scalar_rhs_elementwise(
106+ & <$vector:: <LANES > as Shr <$scalar>>:: shr,
107+ & shr,
108+ & |_, _| true ,
109+ ) ;
110+ }
111+
112+ fn shl<const LANES : usize >( ) {
113+ use core:: ops:: Shl ;
114+ let shl = |x: $scalar, y: $scalar| x. wrapping_shl( y as _) ;
115+ test_helpers:: test_binary_elementwise(
116+ & <$vector:: <LANES > as Shl <$vector:: <LANES >>>:: shl,
117+ & shl,
118+ & |_, _| true ,
119+ ) ;
120+ test_helpers:: test_binary_scalar_rhs_elementwise(
121+ & <$vector:: <LANES > as Shl <$scalar>>:: shl,
122+ & shl,
123+ & |_, _| true ,
124+ ) ;
125+ }
126+
97127 fn reduce_sum<const LANES : usize >( ) {
98128 test_helpers:: test_1( & |x| {
99129 test_helpers:: prop_assert_biteq! (
You can’t perform that action at this time.
0 commit comments