@@ -67,6 +67,68 @@ const unsafe fn simd_pickod_h<T: Copy>(a: T, b: T) -> T {
6767 simd_shuffle ! ( b, a, [ 1 , 3 , 5 , 7 , 17 , 19 , 21 , 23 , 9 , 11 , 13 , 15 , 25 , 27 , 29 , 31 ] )
6868}
6969
70+ #[ inline( always) ]
71+ #[ rustc_const_unstable( feature = "stdarch_const_helpers" , issue = "none" ) ]
72+ pub ( crate ) const unsafe fn simd_ilvh_b < T : Copy > ( a : T , b : T ) -> T {
73+ simd_shuffle ! (
74+ b,
75+ a,
76+ [
77+ 8 , 40 , 9 , 41 , 10 , 42 , 11 , 43 , 12 , 44 , 13 , 45 , 14 , 46 , 15 , 47 ,
78+ 24 , 56 , 25 , 57 , 26 , 58 , 27 , 59 , 28 , 60 , 29 , 61 , 30 , 62 , 31 , 63
79+ ]
80+ )
81+ }
82+
83+ #[ inline( always) ]
84+ #[ rustc_const_unstable( feature = "stdarch_const_helpers" , issue = "none" ) ]
85+ pub ( crate ) const unsafe fn simd_ilvh_h < T : Copy > ( a : T , b : T ) -> T {
86+ simd_shuffle ! ( b, a, [ 4 , 20 , 5 , 21 , 6 , 22 , 7 , 23 , 12 , 28 , 13 , 29 , 14 , 30 , 15 , 31 ] )
87+ }
88+
89+ #[ inline( always) ]
90+ #[ rustc_const_unstable( feature = "stdarch_const_helpers" , issue = "none" ) ]
91+ pub ( crate ) const unsafe fn simd_ilvh_w < T : Copy > ( a : T , b : T ) -> T {
92+ simd_shuffle ! ( b, a, [ 2 , 10 , 3 , 11 , 6 , 14 , 7 , 15 ] )
93+ }
94+
95+ #[ inline( always) ]
96+ #[ rustc_const_unstable( feature = "stdarch_const_helpers" , issue = "none" ) ]
97+ pub ( crate ) const unsafe fn simd_ilvh_d < T : Copy > ( a : T , b : T ) -> T {
98+ simd_shuffle ! ( b, a, [ 1 , 5 , 3 , 7 ] )
99+ }
100+
101+ #[ inline( always) ]
102+ #[ rustc_const_unstable( feature = "stdarch_const_helpers" , issue = "none" ) ]
103+ pub ( crate ) const unsafe fn simd_ilvl_b < T : Copy > ( a : T , b : T ) -> T {
104+ simd_shuffle ! (
105+ b,
106+ a,
107+ [
108+ 0 , 32 , 1 , 33 , 2 , 34 , 3 , 35 , 4 , 36 , 5 , 37 , 6 , 38 , 7 , 39 ,
109+ 16 , 48 , 17 , 49 , 18 , 50 , 19 , 51 , 20 , 52 , 21 , 53 , 22 , 54 , 23 , 55
110+ ]
111+ )
112+ }
113+
114+ #[ inline( always) ]
115+ #[ rustc_const_unstable( feature = "stdarch_const_helpers" , issue = "none" ) ]
116+ pub ( crate ) const unsafe fn simd_ilvl_h < T : Copy > ( a : T , b : T ) -> T {
117+ simd_shuffle ! ( b, a, [ 0 , 16 , 1 , 17 , 2 , 18 , 3 , 19 , 8 , 24 , 9 , 25 , 10 , 26 , 11 , 27 ] )
118+ }
119+
120+ #[ inline( always) ]
121+ #[ rustc_const_unstable( feature = "stdarch_const_helpers" , issue = "none" ) ]
122+ pub ( crate ) const unsafe fn simd_ilvl_w < T : Copy > ( a : T , b : T ) -> T {
123+ simd_shuffle ! ( b, a, [ 0 , 8 , 1 , 9 , 4 , 12 , 5 , 13 ] )
124+ }
125+
126+ #[ inline( always) ]
127+ #[ rustc_const_unstable( feature = "stdarch_const_helpers" , issue = "none" ) ]
128+ pub ( crate ) const unsafe fn simd_ilvl_d < T : Copy > ( a : T , b : T ) -> T {
129+ simd_shuffle ! ( b, a, [ 0 , 4 , 2 , 6 ] )
130+ }
131+
70132impl_vv ! ( "lasx" , lasx_xvpcnt_b, is:: simd_ctpop, m256i, i8x32) ;
71133impl_vv ! ( "lasx" , lasx_xvpcnt_h, is:: simd_ctpop, m256i, i16x16) ;
72134impl_vv ! ( "lasx" , lasx_xvpcnt_w, is:: simd_ctpop, m256i, i32x8) ;
@@ -230,6 +292,14 @@ impl_vvv!("lasx", lasx_xvpickod_b, simd_pickod_b, m256i, i8x32);
230292impl_vvv ! ( "lasx" , lasx_xvpickod_h, simd_pickod_h, m256i, i16x16) ;
231293impl_vvv ! ( "lasx" , lasx_xvpickod_w, simd_pickod_w, m256i, i32x8) ;
232294impl_vvv ! ( "lasx" , lasx_xvpickod_d, simd_pickod_d, m256i, i64x4) ;
295+ impl_vvv ! ( "lasx" , lasx_xvilvh_b, simd_ilvh_b, m256i, i8x32) ;
296+ impl_vvv ! ( "lasx" , lasx_xvilvh_h, simd_ilvh_h, m256i, i16x16) ;
297+ impl_vvv ! ( "lasx" , lasx_xvilvh_w, simd_ilvh_w, m256i, i32x8) ;
298+ impl_vvv ! ( "lasx" , lasx_xvilvh_d, simd_ilvh_d, m256i, i64x4) ;
299+ impl_vvv ! ( "lasx" , lasx_xvilvl_b, simd_ilvl_b, m256i, i8x32) ;
300+ impl_vvv ! ( "lasx" , lasx_xvilvl_h, simd_ilvl_h, m256i, i16x16) ;
301+ impl_vvv ! ( "lasx" , lasx_xvilvl_w, simd_ilvl_w, m256i, i32x8) ;
302+ impl_vvv ! ( "lasx" , lasx_xvilvl_d, simd_ilvl_d, m256i, i64x4) ;
233303
234304impl_vuv ! ( "lasx" , lasx_xvslli_b, is:: simd_shl, m256i, i8x32) ;
235305impl_vuv ! ( "lasx" , lasx_xvslli_h, is:: simd_shl, m256i, i16x16) ;
0 commit comments