File tree 2 files changed +5
-3
lines changed
2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 1
1
//! Implements integer rotates.
2
2
#![ allow( unused) ]
3
3
4
+ // inline(always) to encourage the compiler to generate rotate instructions
5
+ // where available
4
6
macro_rules! impl_vector_rotates {
5
7
( $id: ident, $elem_ty: ident) => {
6
8
impl $id {
@@ -11,7 +13,7 @@ macro_rules! impl_vector_rotates {
11
13
/// Please note this isn't the same operation as `<<`!. Also note it
12
14
/// isn't equivalent to `slice::rotate_left`, it doesn't move the vector's
13
15
/// lanes around. (that can be implemented with vector shuffles).
14
- #[ inline]
16
+ #[ inline( always ) ]
15
17
pub fn rotate_left( self , n: $id) -> $id {
16
18
const LANE_WIDTH : $elem_ty = :: mem:: size_of:: <$elem_ty>( ) as $elem_ty * 8 ;
17
19
// Protect against undefined behavior for over-long bit shifts
@@ -26,7 +28,7 @@ macro_rules! impl_vector_rotates {
26
28
/// Please note this isn't the same operation as `>>`!. Also note it
27
29
/// isn't similar to `slice::rotate_right`, it doesn't move the vector's
28
30
/// lanes around. (that can be implemented with vector shuffles).
29
- #[ inline]
31
+ #[ inline( always ) ]
30
32
pub fn rotate_right( self , n: $id) -> $id {
31
33
const LANE_WIDTH : $elem_ty = :: mem:: size_of:: <$elem_ty>( ) as $elem_ty * 8 ;
32
34
// Protect against undefined behavior for over-long bit shifts
Original file line number Diff line number Diff line change 5
5
#![ feature( avx512_target_feature) ]
6
6
#![ feature( abi_vectorcall) ]
7
7
8
- extern crate stdsimd_test;
9
8
extern crate stdsimd;
9
+ extern crate stdsimd_test;
10
10
11
11
use stdsimd:: simd:: * ;
12
12
use stdsimd_test:: assert_instr;
You can’t perform that action at this time.
0 commit comments