> -----Original Message----- > From: > [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > org] On Behalf Of Andy H > Sent: Tuesday, July 22, 2008 6:40 PM > To: AVR-GCC > Subject: [avr-gcc-list] Can someone benchmark this option please > > Hi, > > I have noted problem where gcc is optimizing if-then-else > constructs - > with disastrous results. For example: > > if (a >= 0) > return 8; > else > return 0; > > (This is now reported as bug.) > > Can folks try the following gcc option > > -fno-if-conversion > > on their own code at -Os optimization, and see if this produce > better/worse or same code? This will help figure if the whole pass > should be skipped - or whether it still contains useful optimizations. >
Hi Andy, I tried it on the BC100 Kit code for gcc, which uses these options: -mmcu=attiny861 -gdwarf-2 -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -std=gnu99 -ffunction-sections -fno-inline-small-functions -fno-split-wide-types When I added -fno-if-conversion, there was no change in code size: 5588 bytes. _______________________________________________ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list