Bug 20010 - *arm_extendqisi appears to never be matched
Summary: *arm_extendqisi appears to never be matched
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.0.0
: P2 normal
Target Milestone: 4.1.0
Assignee: Richard Earnshaw
URL:
Keywords: missed-optimization
Depends on:
Blocks:
 
Reported: 2005-02-16 16:30 UTC by nico
Modified: 2005-11-13 06:39 UTC (History)
1 user (show)

See Also:
Host:
Target: arm-unknown-linux
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nico 2005-02-16 16:30:46 UTC
It appears that the *arm_extendqisi pattern never match anything for
reasons I can't find.  This means that on ARMv4 and ARMv5, this code:

int foo(signed char *x) { return *x; }

produces:

        ldrb    r0, [r0, #4]
        mov     r0, r0, asl #24
        mov     r0, r0, asr #24
        mov     pc, lr

instead of the expected:

        ldrsb   r0, [r0, #4]
        mov     pc, lr
Comment 1 Andrew Pinski 2005-02-16 19:50:33 UTC
TARGET_ARM && arm_arch4 && !arm_arch6
Comment 2 nico 2005-09-07 18:24:26 UTC
I just tested with HEAD today and the problem doesn't appear to be there any
longer.  Therefore gcc 4.1.0 should be OK.