Skip to content

Commit

Permalink
make _mm256_zero{upper,all} safe
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung authored and Amanieu committed Mar 3, 2025
1 parent 3f38a72 commit 85efc78
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/core_arch/src/x86/avx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1053,8 +1053,8 @@ pub fn _mm256_cvtsi256_si32(a: __m256i) -> i32 {
#[target_feature(enable = "avx")]
#[cfg_attr(test, assert_instr(vzeroall))]
#[stable(feature = "simd_x86", since = "1.27.0")]
pub unsafe fn _mm256_zeroall() {
vzeroall()
pub fn _mm256_zeroall() {
unsafe { vzeroall() }
}

/// Zeroes the upper 128 bits of all YMM registers;
Expand All @@ -1065,8 +1065,8 @@ pub unsafe fn _mm256_zeroall() {
#[target_feature(enable = "avx")]
#[cfg_attr(test, assert_instr(vzeroupper))]
#[stable(feature = "simd_x86", since = "1.27.0")]
pub unsafe fn _mm256_zeroupper() {
vzeroupper()
pub fn _mm256_zeroupper() {
unsafe { vzeroupper() }
}

/// Shuffles single-precision (32-bit) floating-point elements in `a`
Expand Down

0 comments on commit 85efc78

Please sign in to comment.