http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51244
Bug #: 51244 Summary: SH Target: Inefficient conditional branch Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: target AssignedTo: unassig...@gcc.gnu.org ReportedBy: oleg.e...@t-online.de CC: kkoj...@gcc.gnu.org Target: sh*-*-* Created attachment 25869 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25869 Examples It seems that the condition inversion sometimes gets confused, resulting in unnecessary code bloat. The attached examples were compiled with -Os but the same problem happens also at -O2 and -O3. sh-elf-gcc -v Using built-in specs. COLLECT_GCC=sh-elf-gcc COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/sh-elf/4.7.0/lto-wrapper Target: sh-elf Configured with: ../gcc-trunk/configure --target=sh-elf --prefix=/usr/local --enable-languages=c,c++ --enable-multilib --disable-libssp --disable-nls --disable-werror --enable-lto --with-newlib --with-gnu-as --with-gnu-ld --with-system-zlib Thread model: single gcc version 4.7.0 20111119 (experimental) (GCC)