gcc-mp-4.8 -march=native fails

Vincent Habchi vince at macports.org
Tue Mar 18 03:19:19 PDT 2014


Salut René,

Le 18 mars 2014 à 10:44, René J.V. Bertin <rjvbertin at gmail.com> a écrit :

> On Tuesday March 18 2014 09:43:57 Vincent Habchi wrote:
>> If you want to use the -march=native switch, use Clang instead (LLVM-AS handles new extensions correctly).
>> 
> 
> Or use -march=native -no-avx , or simply -march=core2 if you insist on having AVX.

-march=core2 precisely avoids AVX (AVX was introduced on the next ‘tock’, Nehalem). You can still get SSE4.2 with -msse4.2 with the old Apple ‘as’ though.
 
> Note that when your code isn't optimised for using SIMD instructions you'll likely see very little benefit from using the full instruction set. In fact, in the testing I did I got better floating point performance using gcc 4.7 with -march=core2 than with clang 3.3 with -march=native . I *think* clang still doesn't have a (good) auto-vectorisation engine, while gcc's has become quite impressive IMHO.

That’s not what the latest Phoronix tests seemed to point out (but with clang 3.4).
http://www.phoronix.com/scan.php?page=article&item=llvm34_gcc49_compilers&num=1

Bonne journée !
Vincent



More information about the macports-users mailing list