[Bug rtl-optimization/50448] [4.5/4.6/4.7 Regression] Missed optimization accessing struct component with integer address

gjl at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Nov 3 11:02:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50448

--- Comment #5 from Georg-Johann Lay <gjl at gcc dot gnu.org> 2011-11-03 11:01:55 UTC ---
(In reply to comment #0)

> foo:
>     ldi r24,lo8(-86)
>     ldi r30,lo8(2752)
>     ldi r31,hi8(2752)
>     std Z+3,r24
> .L2:
>     lds r24,2754
>     sbrs r24,7
>     rjmp .L2
>     ldi r24,lo8(-69)
>     ldi r30,lo8(2752)
>     ldi r31,hi8(2752)
>     std Z+3,r24
>     [...]

This is the code generated with Paolo's patch applied:

foo:
    ldi r24,lo8(-86)
    sts 2755,r24
.L2:
    lds r24,2754
    sbrs r24,7
    rjmp .L2
    ldi r24,lo8(-69)
    sts 2755,r24
    [...]



More information about the Gcc-bugs mailing list