In c++ I have the following piece of code, that is optimised in assembly to call memcpy.
void do_something(big_struct& a, const big_struct& b)
{
a = b;
}
lea rdi,[rsi+0x4]
mov edx,0x220
lea rsi,[rbx+0x18]
call 7ead40 <memcpy@plt>
Looking at the implementation of memcpy, it looks like libstdc++ provides several different versions with different restrictions based on supported instruction sets. From other questions I believe the specific implementation chosen is deferred to runtime.
If I compile with gcc and link with flags that restrict the instruction set used, for example '-mno-avx', assuming the CPU this binary is run on supports avx, will the specific implementation of memcpy chosen still respect this decision?