On target-cpu=native and adding target features

If I supply -C target-cpu=native on a machine that natively already has +aes,+sse2,+sse4.1,+ssse3,+avx,+avx2 instructions available, would adding the flag -C target-cpu=native -C target-feature=+aes,+sse2,+sse4.1,+ssse3,+avx,+avx2 be redundant? In simpler terms: does the -C target-cpu=native flag automatically add all available CPU optimized instructions for me?

This article says: "The compiler will translate this into a list of target features". Therefore, it is safe to assume that adding target features after supplying -C target-cpu=native is redundant.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.