News for hackers. Stuff that matters.
Re:GCC x86 Performance Hints (2012) by vii on Friday August 21, 2020 @09:54AM (#24234883)
clang also doesn't assume -march=native - just like gcc it makes binaries that can run on machines of the same architecture rather than specialising to the current processor's features.

You can see the flags it's using by comparing

   clang -E -v - </dev/null 2>&1
and

   clang -march=native -E -v - </dev/null 2>&1
The second output will probably show a lot of important features enabled - for example

   +sse4.2 -target-feature +avx2 -target-feature +fxsr -target-feature -wbnoinvd -target-feature +sse -target-feature +lzcnt -target-feature +pclmul -target-feature -prefetchwt1 -target-feature +f16c -target-feature +ssse3 -target-feature -sgx -target-feature -shstk -target-feature +cmov

There are no comments on this comment yet.