http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56787
Bug #: 56787 Summary: 4.8.0 Vectorization Regression Compared to 4.7.2 Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassig...@gcc.gnu.org ReportedBy: fred...@witherden.org Created attachment 29754 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29754 Test case When compiling the attached file with GCC 4.8.0 on an AVX capable system the main loop isn't vectorized. This is a regression compared with 4.7.2 on the same system (where the loop is fully vectorized). I apologize for the length of the test case -- smaller examples do not reproduce the behaviour in question. Output of -save-temps: gcc-mp-4.8 -v -save-temps -Ofast -march=native -std=c99 -S test.c Using built-in specs. COLLECT_GCC=gcc-mp-4.8 Target: x86_64-apple-darwin12 Configured with: ../gcc-4.8-20130321/configure --prefix=/opt/local --build=x86_64-apple-darwin12 --enable-languages=c,c++,objc,obj-c++,fortran,java --libdir=/opt/local/lib/gcc48 --includedir=/opt/local/include/gcc48 --infodir=/opt/local/share/info --mandir=/opt/local/share/man --datarootdir=/opt/local/share/gcc-4.8 --with-local-prefix=/opt/local --with-system-zlib --disable-nls --program-suffix=-mp-4.8 --with-gxx-include-dir=/opt/local/include/gcc48/c++/ --with-gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local --with-ppl=/opt/local --with-cloog=/opt/local --enable-cloog-backend=isl --disable-cloog-version-check --enable-stage1-checking --disable-multilib --enable-lto --enable-libstdcxx-time --with-as=/opt/local/bin/as --with-ld=/opt/local/bin/ld --with-ar=/opt/local/bin/ar --with-bugurl=https://trac.macports.org/newticket --with-pkgversion='MacPorts gcc48 4.8-20130321_0' Thread model: posix gcc version 4.8.0 20130321 (prerelease) (MacPorts gcc48 4.8-20130321_0) COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.8.3' '-v' '-save-temps' '-Ofast' '-march=native' '-std=c99' '-S' /opt/local/libexec/gcc/x86_64-apple-darwin12/4.8.0/cc1 -E -quiet -v -D__DYNAMIC__ test.c -march=corei7-avx -mcx16 -msahf -mno-movbe -maes -mpclmul -mpopcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm -mavx -mno-avx2 -msse4.2 -msse4.1 -mno-lzcnt -mno-rtm -mno-hle -mno-rdrnd -mno-f16c -mno-fsgsbase -mno-rdseed -mno-prfchw -mno-adx -mfxsr -mxsave -mxsaveopt --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=3072 -mtune=corei7-avx -fPIC -mmacosx-version-min=10.8.3 -std=c99 -Ofast -fpch-preprocess -o test.i ignoring nonexistent directory "/opt/local/lib/gcc48/gcc/x86_64-apple-darwin12/4.8.0/../../../../../x86_64-apple-darwin12/include" #include "..." search starts here: #include <...> search starts here: /opt/local/lib/gcc48/gcc/x86_64-apple-darwin12/4.8.0/include /opt/local/include /opt/local/lib/gcc48/gcc/x86_64-apple-darwin12/4.8.0/include-fixed /usr/include /System/Library/Frameworks /Library/Frameworks End of search list. COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.8.3' '-v' '-save-temps' '-Ofast' '-march=native' '-std=c99' '-S' /opt/local/libexec/gcc/x86_64-apple-darwin12/4.8.0/cc1 -fpreprocessed test.i -march=corei7-avx -mcx16 -msahf -mno-movbe -maes -mpclmul -mpopcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm -mavx -mno-avx2 -msse4.2 -msse4.1 -mno-lzcnt -mno-rtm -mno-hle -mno-rdrnd -mno-f16c -mno-fsgsbase -mno-rdseed -mno-prfchw -mno-adx -mfxsr -mxsave -mxsaveopt --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=3072 -mtune=corei7-avx -fPIC -quiet -dumpbase test.c -mmacosx-version-min=10.8.3 -auxbase test -Ofast -std=c99 -version -o test.s GNU C (MacPorts gcc48 4.8-20130321_0) version 4.8.0 20130321 (prerelease) (x86_64-apple-darwin12) compiled by GNU C version 4.8.0 20130321 (prerelease), GMP version 5.0.5, MPFR version 3.1.1-p2, MPC version 1.0.1 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 GNU C (MacPorts gcc48 4.8-20130321_0) version 4.8.0 20130321 (prerelease) (x86_64-apple-darwin12) compiled by GNU C version 4.8.0 20130321 (prerelease), GMP version 5.0.5, MPFR version 3.1.1-p2, MPC version 1.0.1 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: 6291d2010395c7dee8043d72914d31cb COMPILER_PATH=/opt/local/libexec/gcc/x86_64-apple-darwin12/4.8.0/:/opt/local/libexec/gcc/x86_64-apple-darwin12/4.8.0/:/opt/local/libexec/gcc/x86_64-apple-darwin12/:/opt/local/lib/gcc48/gcc/x86_64-apple-darwin12/4.8.0/:/opt/local/lib/gcc48/gcc/x86_64-apple-darwin12/ LIBRARY_PATH=/opt/local/lib/gcc48/gcc/x86_64-apple-darwin12/4.8.0/:/opt/local/lib/gcc48/gcc/x86_64-apple-darwin12/4.8.0/../../../:/usr/lib/ COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.8.3' '-v' '-save-temps' '-Ofast' '-march=native' '-std=c99' '-S'