After looking at how Intel's Sandy Bridge processor performance has evolved with the new GCC 4.7 compiler and Apple's forthcoming LLVM 3.1 with Clang, here are benchmark results from the AMD FX-8150 "Bulldozer" Eight-Core processor with GCC 4.7.0 and the latest LLVM/Clang 3.1 development code along with looking at the performance impact of various compiler tuning flags for this latest-generation AMD CPU. Making things even more interesting, AMD's Open64 4.5.1 compiler was also tossed into the testing mix.
First up are the results from AMD FX-8150 Bulldozer from the ASUS Crosshair V Formula when it was running Ubuntu 12.04 with the Linux 3.2 kernel and comparing GCC 4.7.0, LLVM/Clang 3.1 SVN, and AMD Open64 4.5.1. Each of the tests were done when the compilers were build the open-source test profiles with -march=k8 and -march=bdver1 as the compiler flags (and -O3 was set the entire time for all compilers for both the k8/bdver1 architecture optimizations). The new compilers have better AVX1 support and other x86 enhancements (along with initial AVX2 support, but that won't benefit the first-generation Bulldozers) and other new compiler features and improvements.
The k8 march flag enables compiler optimizations targeting the original AMD K8 processor while bdver1 enables all of the compiler optimizations/features of the first-generation AMD Bulldozer hardware, like AVX and FMA4 instructions. The three tested compilers were built in their release/optimized modes with the build configurations being shown on the Phoronix Test Suite system table above. All benchmarking was done via the Phoronix Test Suite and these results can be reproduced using OpenBenchmarking.org.