-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
rust-lang/stdarch
#1694Closed
Copy link
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-stdarch_x86_avx512`#![feature(stdarch_x86_avx512)]``#![feature(stdarch_x86_avx512)]`T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Description
I tried this code:
#![feature(stdarch_x86_avx512)]
use std::arch::x86_64::*;
pub fn main() {
unsafe {
let x = _mm512_setzero_si512();
let mask = _mm512_mask_cmp_epi32_mask::<7>(1, x, x);
println!("{mask}")
}
}
I expected to see this happen: It prints 1 (compare this similar C++ program)
Instead, this happened: It prints 65535 (Godbolt, since the playground doesn't support AVX512)
This issue applies to all _mm*_mask_cmp_*_mask
functions, not just _mm512_mask_cmp_epi32_mask
. It seems to have been introduced in rust-lang/stdarch#1597.
Meta
rustc --version --verbose
:
rustc 1.84.0-nightly (8adb4b30f 2024-11-13)
binary: rustc
commit-hash: 8adb4b30f40e6fbd21dc1ba26c3301c7eeb6de3c
commit-date: 2024-11-13
host: x86_64-unknown-linux-gnu
release: 1.84.0-nightly
LLVM version: 19.1.3
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-stdarch_x86_avx512`#![feature(stdarch_x86_avx512)]``#![feature(stdarch_x86_avx512)]`T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.