Looking at the code of a binary produced by cargo
(cargo build --release
). I found in the binary that SSSE3
instructions like pshufb
were used.
Looking at cfg I have:
$ rustc --print cfg
debug_assertions
target_arch="x86_64"
target_endian="little"
target_env=""
target_family="unix"
target_feature="fxsr"
target_feature="sse"
target_feature="sse2"
target_feature="sse3"
target_feature="ssse3"
target_os="macos"
target_pointer_width="64"
target_vendor="apple"
unix
I have different paths given the SIMD ISA (AVX2 or SSSE3) and expected to have a non SIMD one with the default build.
#[cfg(target_feature = "avx2")]
{
...
return;
}
#[cfg(target_feature = "ssse3")]
{
...
return;
}
// portable Rust code at the end
...
Does this mean that a default release build will always use up to SSSE3 instructions, and not just SSE2 which is mandatory on x86_64?