1
1
use crate :: arch:: asm;
2
- use crate :: core_arch:: { simd :: * , x86:: * } ;
2
+ use crate :: core_arch:: x86:: * ;
3
3
4
4
#[ cfg( test) ]
5
5
use stdarch_test:: assert_instr;
@@ -15,9 +15,9 @@ use stdarch_test::assert_instr;
15
15
all( test, any( target_os = "linux" , target_env = "msvc" ) ) ,
16
16
assert_instr( vbcstnebf162ps)
17
17
) ]
18
- #[ unstable( feature = "stdarch_x86_avx512 " , issue = "111137 " ) ]
19
- pub unsafe fn _mm_bcstnebf16_ps ( a : * const u16 ) -> __m128 {
20
- transmute ( bcstnebf162ps_128 ( a) )
18
+ #[ unstable( feature = "stdarch_x86_avx512_bf16 " , issue = "127356 " ) ]
19
+ pub unsafe fn _mm_bcstnebf16_ps ( a : * const bf16 ) -> __m128 {
20
+ bcstnebf162ps_128 ( a)
21
21
}
22
22
23
23
/// Convert scalar BF16 (16-bit) floating point element stored at memory locations starting at location
@@ -31,9 +31,9 @@ pub unsafe fn _mm_bcstnebf16_ps(a: *const u16) -> __m128 {
31
31
all( test, any( target_os = "linux" , target_env = "msvc" ) ) ,
32
32
assert_instr( vbcstnebf162ps)
33
33
) ]
34
- #[ unstable( feature = "stdarch_x86_avx512 " , issue = "111137 " ) ]
35
- pub unsafe fn _mm256_bcstnebf16_ps ( a : * const u16 ) -> __m256 {
36
- transmute ( bcstnebf162ps_256 ( a) )
34
+ #[ unstable( feature = "stdarch_x86_avx512_bf16 " , issue = "127356 " ) ]
35
+ pub unsafe fn _mm256_bcstnebf16_ps ( a : * const bf16 ) -> __m256 {
36
+ bcstnebf162ps_256 ( a)
37
37
}
38
38
39
39
/// Convert packed BF16 (16-bit) floating-point even-indexed elements stored at memory locations starting at
@@ -143,9 +143,9 @@ pub unsafe fn _mm256_cvtneps_avx_pbh(a: __m256) -> __m128bh {
143
143
#[ allow( improper_ctypes) ]
144
144
extern "C" {
145
145
#[ link_name = "llvm.x86.vbcstnebf162ps128" ]
146
- fn bcstnebf162ps_128 ( a : * const u16 ) -> f32x4 ;
146
+ fn bcstnebf162ps_128 ( a : * const bf16 ) -> __m128 ;
147
147
#[ link_name = "llvm.x86.vbcstnebf162ps256" ]
148
- fn bcstnebf162ps_256 ( a : * const u16 ) -> f32x8 ;
148
+ fn bcstnebf162ps_256 ( a : * const bf16 ) -> __m256 ;
149
149
150
150
#[ link_name = "llvm.x86.vcvtneebf162ps128" ]
151
151
fn cvtneebf162ps_128 ( a : * const __m128bh ) -> __m128 ;
@@ -177,15 +177,15 @@ mod tests {
177
177
178
178
#[ simd_test( enable = "avxneconvert" ) ]
179
179
unsafe fn test_mm_bcstnebf16_ps ( ) {
180
- let a = BF16_ONE ;
180
+ let a = bf16 :: from_bits ( BF16_ONE ) ;
181
181
let r = _mm_bcstnebf16_ps ( addr_of ! ( a) ) ;
182
182
let e = _mm_set_ps ( 1. , 1. , 1. , 1. ) ;
183
183
assert_eq_m128 ( r, e) ;
184
184
}
185
185
186
186
#[ simd_test( enable = "avxneconvert" ) ]
187
187
unsafe fn test_mm256_bcstnebf16_ps ( ) {
188
- let a = BF16_ONE ;
188
+ let a = bf16 :: from_bits ( BF16_ONE ) ;
189
189
let r = _mm256_bcstnebf16_ps ( addr_of ! ( a) ) ;
190
190
let e = _mm256_set_ps ( 1. , 1. , 1. , 1. , 1. , 1. , 1. , 1. ) ;
191
191
assert_eq_m256 ( r, e) ;
0 commit comments