Bug 47644 - [avr] Optimisation regression in choosing registers
Summary: [avr] Optimisation regression in choosing registers
Status: RESOLVED DUPLICATE of bug 52278
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.3.3
: P3 minor
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-08 11:45 UTC by Ángel
Modified: 2012-10-21 20:54 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
Test case in C (58 bytes, application/octet-stream)
2011-02-08 11:45 UTC, Ángel
Details
gcc 4.3.3 assembler (221 bytes, text/plain)
2011-02-08 11:47 UTC, Ángel
Details
gcc 4.2 assembler (265 bytes, application/octet-stream)
2011-02-08 11:48 UTC, Ángel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ángel 2011-02-08 11:45:55 UTC
Created attachment 23275 [details]
Test case in C

Consider the following snippet compiled with -O3:

int lsl_short(int f) {
    return f << 1;
}

gcc 4.3.3 is copying the value from r25:r24 (first parameter) to r19:r18, then moving back to r25:r24 (return value). Same for longs but with 4 registers.

Expected:
The lsl and rol should happen directly on r25:r24, just as they did in 4.2
Comment 1 Ángel 2011-02-08 11:47:46 UTC
Created attachment 23276 [details]
gcc 4.3.3 assembler
Comment 2 Ángel 2011-02-08 11:48:37 UTC
Created attachment 23277 [details]
gcc 4.2 assembler
Comment 3 Georg-Johann Lay 2012-10-21 20:54:12 UTC
Duplicate of PR52278

*** This bug has been marked as a duplicate of bug 52278 ***