This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/36467] New: [avr] Missed optimization with pointer arithmetic and mul*
- From: "eric dot weddington at atmel dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Jun 2008 17:56:37 -0000
- Subject: [Bug target/36467] New: [avr] Missed optimization with pointer arithmetic and mul*
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
>From AVR Freaks forum:
http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=453770#453770
Adding an offset to a pointer to a structure. If the structure size is 16, the
generated code is a loop with shifts. If the structure size is 17, the
generated code uses MUL* instructions and generates shorter code than when the
size is 16.
Command lines:
avr-gcc -save-temps -Os -mmcu=atmega32 -c test.c -o test.o
avr-gcc -save-temps -Os -mmcu=atmega32 -c test2.c -o test2.o
See the code generation of funct().
Test cases to follow...
--
Summary: [avr] Missed optimization with pointer arithmetic and
mul*
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: eric dot weddington at atmel dot com
GCC target triplet: avr-*-*
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36467