Well, a noticeable improvement is that it does not return with an error with -march=native.
But "-march=native" is not recognized and as all nonrecognized march parameters it activates the generic profile:
Code:
/usr/lib/5.0.0/x8664/ipl -VHO:rotate -LIST:source=off:notes=off -PHASE:p:i -O3 -LANG:math_errno=off -OPT:ffast_math=ON -OPT:Ofast= -show -LANG:=ansi_c -TARG:abi=n64 -TARG:processor=generic -TARG:sse=on -TARG:sse2=on -TARG:sse3=off -TARG:ssse3=off -TARG:sse4a=off -TARG:sse4_1=off -TARG:sse4_2=off -TARG:avx=off -TARG:fma=off -TARG:xop=off -TARG:aes=off -TARG:pclmul=off -TARG:3dnow=off -fB,/tmp/pathcc-B-1934caf9.B -fp,hello.o hello.c -cmds pathcc -O3 -LANG:math_errno=off -OPT:ffast_math=ON -OPT:Ofast= -TARG:abi=n64 -TARG:processor=generic -TARG:sse=on -TARG:sse2=on -TARG:sse3=off -TARG:ssse3=off -TARG:sse4a=off -TARG:sse4_1=off -TARG:sse4_2=off -TARG:avx=off -TARG:fma=off -TARG:xop=off -TARG:aes=off -TARG:pclmul=off -TARG:3dnow=off
The correct way to autochoose the cpu is -march=auto:
"-march=auto -Ofast"
Code:
/usr/lib/5.0.0/x8664/ipl -VHO:rotate -LIST:source=off:notes=off -PHASE:p:i -O3 -LANG:math_errno=off -OPT:ffast_math=ON -OPT:Ofast= -show -LANG:=ansi_c -TARG:abi=n64 -TARG:processor=pentium4 -TARG:sse=on -TARG:sse2=on -TARG:sse3=on -TARG:ssse3=on -TARG:sse4a=off -TARG:sse4_1=on -TARG:sse4_2=on -TARG:avx=off -TARG:fma=off -TARG:xop=off -TARG:aes=on -TARG:pclmul=off -TARG:3dnow=off -fB,/tmp/pathcc-B-19683af2.B -fp,hello.o hello.c -cmds pathcc -O3 -LANG:math_errno=off -OPT:ffast_math=ON -OPT:Ofast= -TARG:abi=n64 -TARG:processor=pentium4 -TARG:sse=on -TARG:sse2=on -TARG:sse3=on -TARG:ssse3=on -TARG:sse4a=off -TARG:sse4_1=on -TARG:sse4_2=on -TARG:avx=off -TARG:fma=off -TARG:xop=off -TARG:aes=on -TARG:pclmul=off -TARG:3dnow=off
Slightly better, it builds for SSE3 but for Pentium 4?! This is a ivy bridge mobile cpu, i7 3632qm! If you could just copy & paste the cpu recognition from another compiler, that would be great.
The installer installs the manpages to /usr/docs/man/man1/ which is not in the man search path on archlinux, but I don't know about other systems. But it seems nonstandard to me. Use "man -l /file" to open files directly with man.
Code:
-march=<cpu-type>
(For x86) Compiler will optimize code for the selected cpu type: opteron, opteron-sse3, xeon, em64t, nocona, prescott, core, core2, wolfdale, harpertown, nehalem, barcelona, shanghai, istanbul, sandy, bdver1, auto. auto means to optimize for the host platform that the compiler is running on. Core refers to the
Intel Core Microarchitecture, used by 64-bit CPUs such as Woodcrest. The default is auto.
It seems none of the cpu profiles, even bdver1 enable the use of avx by default. In fact it says
Code:
pathcc -o hello_pathcc hello.c -march=bdver1 -O3 -mavx -show
pathcc ERROR: Target processor does not support AVX.
I am not so proficient what exactly is supported in which cpus, but I thought bulldozer supported avx right from the beginning?
So the closest for me would probably be using -march=sandy -Ofast and perhaps -mavx, -mxop, -maes, -mpclmul.
Unfortunately sandybridge did not support fma and xop so I can't activate it directly.
Intel's cpus don't support 3dnow but I saw that the parameter to activate 3dnow is not documented in the manpage (it's pretty clear that it's -m3dnow though. It says it's not supported for bdver1, by the way, not sure if this is right).