Summary: | [avr] GCC produces poor code for 4- and 8-byte values | ||
---|---|---|---|
Product: | gcc | Reporter: | Jacob Potter <jdpotter> |
Component: | target | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED WORKSFORME | ||
Severity: | normal | CC: | eric.weddington, gcc-bugs, gjl |
Priority: | P3 | Keywords: | missed-optimization |
Version: | 4.5.0 | ||
Target Milestone: | --- | ||
Host: | Target: | avr-*-* | |
Build: | Known to work: | 4.6.1 | |
Known to fail: | Last reconfirmed: |
Description
Jacob Potter
2010-02-16 16:59:59 UTC
Closed as WORKS FOR ME I compiled that with $ avr-gcc-4.6.1 -dp -Os -S -mmcu=atmega88 and the result is: greater_than_32: ldi r30,lo8(1) ; 7 *movqi/2 [length = 1] cp r18,r22 ; 8 *cmpsi/2 [length = 4] cpc r19,r23 cpc r20,r24 cpc r21,r25 brlt .L2 ; 9 branch [length = 1] ldi r30,lo8(0) ; 10 *movqi/1 [length = 1] .L2: mov r24,r30 ; 16 *movqi/1 [length = 1] ret ; 28 return [length = 1] For the 64-bit case, user must be aware that avr-gcc will produce bulky code. Because of shortness of contributors to avr-gcc, the avr port maintainers regard missed 64-bit optimizations as WON'T FIX. |