Closed
Description
I tried this code:
#[target_feature(enable = "avx2")]
unsafe fn demo(v: std::arch::x86_64::__m256i) {
std::arch::asm!("/* {v} */", v = in(ymm_reg) v);
}
According to the Rust Reference, the avx2
feature should imply the avx
feature (and further features), so I expected the code to compile.
Instead, this happened:
error: register class `ymm_reg` requires the `avx` target feature
--> src/lib.rs:3:34
|
3 | std::arch::asm!("/* {v} */", v = in(ymm_reg) v);
| ^^^^^^^^^^^^^^^^^
Meta
- 1.79.0
- 1.81.0-nightly (2024-07-12 c6727fc)