@@ -2746,7 +2746,7 @@ pub const fn _mm256_setr_epi64x(a: i64, b: i64, c: i64, d: i64) -> __m256i {
27462746#[ stable( feature = "simd_x86" , since = "1.27.0" ) ]
27472747#[ rustc_const_unstable( feature = "stdarch_const_x86" , issue = "149298" ) ]
27482748pub const fn _mm256_set1_pd ( a : f64 ) -> __m256d {
2749- _mm256_setr_pd ( a , a , a , a )
2749+ unsafe { crate :: intrinsics :: simd :: simd_splat ( a ) }
27502750}
27512751
27522752/// Broadcasts single-precision (32-bit) floating-point value `a` to all
@@ -2759,7 +2759,7 @@ pub const fn _mm256_set1_pd(a: f64) -> __m256d {
27592759#[ stable( feature = "simd_x86" , since = "1.27.0" ) ]
27602760#[ rustc_const_unstable( feature = "stdarch_const_x86" , issue = "149298" ) ]
27612761pub const fn _mm256_set1_ps ( a : f32 ) -> __m256 {
2762- _mm256_setr_ps ( a , a , a , a , a , a , a , a )
2762+ unsafe { crate :: intrinsics :: simd :: simd_splat ( a ) }
27632763}
27642764
27652765/// Broadcasts 8-bit integer `a` to all elements of returned vector.
@@ -2772,13 +2772,7 @@ pub const fn _mm256_set1_ps(a: f32) -> __m256 {
27722772#[ stable( feature = "simd_x86" , since = "1.27.0" ) ]
27732773#[ rustc_const_unstable( feature = "stdarch_const_x86" , issue = "149298" ) ]
27742774pub const fn _mm256_set1_epi8 ( a : i8 ) -> __m256i {
2775- #[ rustfmt:: skip]
2776- _mm256_setr_epi8 (
2777- a, a, a, a, a, a, a, a,
2778- a, a, a, a, a, a, a, a,
2779- a, a, a, a, a, a, a, a,
2780- a, a, a, a, a, a, a, a,
2781- )
2775+ unsafe { crate :: intrinsics:: simd:: simd_splat ( a) }
27822776}
27832777
27842778/// Broadcasts 16-bit integer `a` to all elements of returned vector.
@@ -2793,7 +2787,7 @@ pub const fn _mm256_set1_epi8(a: i8) -> __m256i {
27932787#[ stable( feature = "simd_x86" , since = "1.27.0" ) ]
27942788#[ rustc_const_unstable( feature = "stdarch_const_x86" , issue = "149298" ) ]
27952789pub const fn _mm256_set1_epi16 ( a : i16 ) -> __m256i {
2796- _mm256_setr_epi16 ( a , a , a , a , a , a , a , a , a , a , a , a , a , a , a , a )
2790+ unsafe { crate :: intrinsics :: simd :: simd_splat ( a ) }
27972791}
27982792
27992793/// Broadcasts 32-bit integer `a` to all elements of returned vector.
@@ -2806,7 +2800,7 @@ pub const fn _mm256_set1_epi16(a: i16) -> __m256i {
28062800#[ stable( feature = "simd_x86" , since = "1.27.0" ) ]
28072801#[ rustc_const_unstable( feature = "stdarch_const_x86" , issue = "149298" ) ]
28082802pub const fn _mm256_set1_epi32 ( a : i32 ) -> __m256i {
2809- _mm256_setr_epi32 ( a , a , a , a , a , a , a , a )
2803+ unsafe { crate :: intrinsics :: simd :: simd_splat ( a ) }
28102804}
28112805
28122806/// Broadcasts 64-bit integer `a` to all elements of returned vector.
@@ -2821,7 +2815,7 @@ pub const fn _mm256_set1_epi32(a: i32) -> __m256i {
28212815#[ stable( feature = "simd_x86" , since = "1.27.0" ) ]
28222816#[ rustc_const_unstable( feature = "stdarch_const_x86" , issue = "149298" ) ]
28232817pub const fn _mm256_set1_epi64x ( a : i64 ) -> __m256i {
2824- _mm256_setr_epi64x ( a , a , a , a )
2818+ unsafe { crate :: intrinsics :: simd :: simd_splat ( a ) }
28252819}
28262820
28272821/// Cast vector of type __m256d to type __m256.
0 commit comments