File tree Expand file tree Collapse file tree 3 files changed +7
-10
lines changed
testable-simd-models/src/core_arch/x86 Expand file tree Collapse file tree 3 files changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -916,8 +916,6 @@ pub fn _mm256_and_si256(a: __m256i, b: __m256i) -> __m256i {
916
916
simd_and ( BitVec :: to_i64x4 ( a) , BitVec :: to_i64x4 ( b) ) . into ( )
917
917
}
918
918
919
-
920
-
921
919
/// Computes the bitwise NOT of 256 bits (representing integer data)
922
920
/// in `a` and then AND with `b`.
923
921
///
@@ -2137,8 +2135,6 @@ pub fn _mm256_srli_si256<const IMM8: i32>(a: __m256i) -> __m256i {
2137
2135
/// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_bsrli_epi128)
2138
2136
2139
2137
pub fn _mm256_bsrli_epi128 < const IMM8 : i32 > ( a : __m256i ) -> __m256i {
2140
-
2141
-
2142
2138
const fn mask ( shift : i32 , i : u32 ) -> u64 {
2143
2139
let shift = shift as u32 & 0xff ;
2144
2140
if shift > 15 || ( 15 - ( i % 16 ) ) < shift {
@@ -2147,7 +2143,7 @@ pub fn _mm256_bsrli_epi128<const IMM8: i32>(a: __m256i) -> __m256i {
2147
2143
( 32 + ( i + shift) ) as u64
2148
2144
}
2149
2145
}
2150
-
2146
+
2151
2147
let a = BitVec :: to_i8x32 ( a) ;
2152
2148
let r: i8x32 = simd_shuffle (
2153
2149
i8x32:: from_fn ( |_| 0 ) ,
@@ -2187,7 +2183,7 @@ pub fn _mm256_bsrli_epi128<const IMM8: i32>(a: __m256i) -> __m256i {
2187
2183
mask ( IMM8 , 31 ) ,
2188
2184
] ,
2189
2185
) ;
2190
-
2186
+
2191
2187
r. into ( )
2192
2188
}
2193
2189
Original file line number Diff line number Diff line change @@ -12,9 +12,11 @@ pub fn _mm256_bsrli_epi128<const IMM8: i32>(a: __m256i) -> __m256i {
12
12
let a = BitVec :: to_i128x2 ( a) ;
13
13
let a = i128x2:: from_fn ( |i| {
14
14
let tmp = IMM8 % 256 ;
15
- if tmp > 15 { 0 } else {
15
+ if tmp > 15 {
16
+ 0
17
+ } else {
16
18
( ( a[ i] as u128 ) >> ( tmp * 8 ) ) as i128
17
- }
19
+ }
18
20
} ) ;
19
21
BitVec :: from_i128x2 ( a)
20
22
}
Original file line number Diff line number Diff line change @@ -54,15 +54,14 @@ fn _mm256_testz_si256() {
54
54
55
55
for _ in 0 ..n {
56
56
let a: BitVec < 256 > = BitVec :: random ( ) ;
57
- let b: BitVec < 256 > = BitVec :: random ( ) ;
57
+ let b: BitVec < 256 > = BitVec :: random ( ) ;
58
58
assert_eq ! (
59
59
super :: super :: models:: avx:: _mm256_testz_si256( a. into( ) , b. into( ) ) ,
60
60
unsafe { upstream:: _mm256_testz_si256( a. into( ) , b. into( ) ) }
61
61
) ;
62
62
}
63
63
}
64
64
65
-
66
65
mk ! ( _mm256_setzero_ps( ) ) ;
67
66
mk ! ( _mm256_setzero_si256( ) ) ;
68
67
mk ! ( _mm256_set_epi8(
You can’t perform that action at this time.
0 commit comments