Talk:Safe Cflags/AMD

The bottom line is that if you're using a version of gcc which doesn't know about your processor's features, you use the older -march flag and add the instruction sets. Thus, on my Athlon X2 and Phenom, prior to gcc 4.3 (or some such) I used something like this: CFLAGS="-march=k8 -msse3" And later, when SSE4a instructions were supported: CFLAGS="-march=k8 -msse3 -msse4a" As a final note, the -ftree-vectorize is now a part of -O2, but only in the last year or so (not sure which gcc version they included it). I never added that one to my global CFLAGS, but I did add it to a few packages via /etc/portage/env. Check your gcc man page in the -O2 section to see if it's included. As far as I know, it was a stable optimization prior to being added to -O2 and I believe quite key to utilizing SIMD instructions in some cases.Daniel Santos 22:47, 7 November 2009 (GMT)
 * I believe you are referring to -O3 and not -O2 in regards to your information about the -ftree-vectorize flag. -ftree-vectorize was moved into -O3 as of GCC 4.3.x (probably 4.3.4). The 4.4.x series has seen no changes regarding -ftree-vectorize so I believe it's safe to say that ftree-vectorize is still only included, by default, in -O3 and not -O2 as of yet.  Also a quick:  should return [ disabled ] .  -  Mousee 22:39, 10 April 2010 (GMT)

Geode LX
"Note: While i586-pc-linux-gnu CHOST works fine on a Geode LX, i486-pc-linux-gnu should be a more performant choice right now due to the way Geode LX CPU pipeline and scheduling works. glibc i586 assembler optimized routines are measurably slower than the i486 ones on a Geode LX."

Are there known problems with using an i686-pc-linux-gnu CHOST for the Geode LX? GentooXO uses i686 by default, and I haven't been able to change it as emerging gcc fails due to lack of resources on my XO. --Nik 23:11, 23 March 2010 (GMT)

AMD Fusion
Appreciate if someone can add the Cflags for the AMD A-series Fusion processors. 170.38.136.2 10:20, 10 January 2012 (GMT)

AMD K6-2
Two questions:
 * If one uses -march=native and follows he gets

Therefore, -march is set to k6-3 while -mtune is k6, thus not k6-2 or k6-3. So, it seems to be OK.

If one uses the indication from wiki by setting -march=k6-2 he gets


 * Does it make sense to use -OS instead of -O2

AMD Bulldozer FX-8150
http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86_002d64-Options.html explicitly mentions that --march=bdver1 supersets all the extra options currently recommended except -msahf and -mpopcnt. The cflags recommended for bulldozer should be reviewed and the redundant options should be removed.