I tried this code: https://rust.godbolt.org/z/b9A7oP
extern crate core;
use core::arch::x86_64::__m128;
use core::arch::x86_64::_mm_extract_ps;
use core::arch::x86_64::_mm_hadd_ps;
pub unsafe fn add_reduce(a: __m128, b: __m128) -> f32 {
let c = _mm_hadd_ps(a, b);
f32::from_bits(_mm_extract_ps(c, 0) as u32)
}
I expect to see this happens: rustc lint about missing target_feature in add_reduce when using _mm_extract_ps.
Instead this happen: There is no warning and functions are not inlined.
Meta
- rustc 1.46.0-nightly (3503f56 2020-07-02) x86_64-unknown-linux-gnu
I tried this code: https://rust.godbolt.org/z/b9A7oP
I expect to see this happens: rustc lint about missing
target_featureinadd_reducewhen using_mm_extract_ps.Instead this happen: There is no warning and functions are not inlined.
Meta