http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55073
--- Comment #9 from Eric Batut <eric.batut at allegorithmic dot com> 2012-11-30 14:29:11 UTC --- Richard, I double-checked (update + rebuild), the end of my assembly files correctly states : .ident "GCC: (GNU) 4.8.0 20121130 (experimental)" Since -O1 is also broken on my end, I tried to isolate the option that would fix -O1. It turns out that "-O1" and "-O1 -fno-dse" give identical function bodies, only the epilog differs: - "-O1" gives vmovl.s8 q9, d19 <= d19 (wrong) vsub.i16 q9, q9, q8 vmovl.s8 q10, d21 <= d21 (wrong) vsub.i16 q8, q10, q8 vadd.i16 q8, q9, q8 vst1.64 {d16-d17}, [r0:128] - "-O1 -fno-dse" gives vmovl.s8 q9, d18 <= d18 (correct) instead of d19 (wrong) vsub.i16 q9, q9, q8 vmovl.s8 q10, d20 <= d20 (correct) instead of d21 (wrong) vsub.i16 q8, q10, q8 vadd.i16 q8, q9, q8 vst1.64 {d16-d17}, [r0:128] The function body above the previous code snippets is the same for both builds. The only difference is the widening of d19 and d21 in the wrong case, and of d18 and d20 in the correct case. The compiler I am using to build arm-linux-androideabi-gcc is an Apple build of gcc 4.2.1 : ~/android-ndk-r8b: gcc -v Using built-in specs. Target: i686-apple-darwin11 Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2336.1~22/src/configure --disable-checking --enable-werror --prefix=/Developer/usr/llvm-gcc-4.2 --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin11 --enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2336.1~22/dst-llvmCore/Developer/usr/local --program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11 --target=i686-apple-darwin11 --with-gxx-include-dir=/usr/include/c++/4.2.1 Thread model: posix gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00) Do you think rebuilding arm-linux-androideabi-gcc on Linux to check if the generated code is the same is worth the time or is there no chance whatsoever that it can make a difference ?