11use crate :: arch:: asm;
2- use crate :: core_arch:: { simd :: * , x86:: * } ;
2+ use crate :: core_arch:: x86:: * ;
33
44#[ cfg( test) ]
55use stdarch_test:: assert_instr;
@@ -15,9 +15,9 @@ use stdarch_test::assert_instr;
1515 all( test, any( target_os = "linux" , target_env = "msvc" ) ) ,
1616 assert_instr( vbcstnebf162ps)
1717) ]
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)
2121}
2222
2323/// 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 {
3131 all( test, any( target_os = "linux" , target_env = "msvc" ) ) ,
3232 assert_instr( vbcstnebf162ps)
3333) ]
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)
3737}
3838
3939/// 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 {
143143#[ allow( improper_ctypes) ]
144144extern "C" {
145145 #[ link_name = "llvm.x86.vbcstnebf162ps128" ]
146- fn bcstnebf162ps_128 ( a : * const u16 ) -> f32x4 ;
146+ fn bcstnebf162ps_128 ( a : * const bf16 ) -> __m128 ;
147147 #[ link_name = "llvm.x86.vbcstnebf162ps256" ]
148- fn bcstnebf162ps_256 ( a : * const u16 ) -> f32x8 ;
148+ fn bcstnebf162ps_256 ( a : * const bf16 ) -> __m256 ;
149149
150150 #[ link_name = "llvm.x86.vcvtneebf162ps128" ]
151151 fn cvtneebf162ps_128 ( a : * const __m128bh ) -> __m128 ;
@@ -177,15 +177,15 @@ mod tests {
177177
178178 #[ simd_test( enable = "avxneconvert" ) ]
179179 unsafe fn test_mm_bcstnebf16_ps ( ) {
180- let a = BF16_ONE ;
180+ let a = bf16 :: from_bits ( BF16_ONE ) ;
181181 let r = _mm_bcstnebf16_ps ( addr_of ! ( a) ) ;
182182 let e = _mm_set_ps ( 1. , 1. , 1. , 1. ) ;
183183 assert_eq_m128 ( r, e) ;
184184 }
185185
186186 #[ simd_test( enable = "avxneconvert" ) ]
187187 unsafe fn test_mm256_bcstnebf16_ps ( ) {
188- let a = BF16_ONE ;
188+ let a = bf16 :: from_bits ( BF16_ONE ) ;
189189 let r = _mm256_bcstnebf16_ps ( addr_of ! ( a) ) ;
190190 let e = _mm256_set_ps ( 1. , 1. , 1. , 1. , 1. , 1. , 1. , 1. ) ;
191191 assert_eq_m256 ( r, e) ;
0 commit comments