This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/9760] [arm] Combine cannot do its job because immediate operand is used instead of register
- From: "steven at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Feb 2010 16:11:04 -0000
- Subject: [Bug target/9760] [arm] Combine cannot do its job because immediate operand is used instead of register
- References: <bug-9760-5458@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from steven at gcc dot gnu dot org 2010-02-08 16:11 -------
New test case is with func defined extern, as already mentioned in comment #5:
extern void func(char c, int t);
void foo(int u)
{
func ( 8, (u >> 24) & 0xffL );
func ( 8, (u >> 16) & 0xffL );
func ( 8, (u >> 8) & 0xffL );
}
Trunk today (r156595) produces this:
stmfd sp!, {r4, lr}
mov r4, r0
mov r1, r4, lsr #24
mov r0, #8
bl func
mov r1, r4, lsr #16
mov r0, #8
and r1, r1, #255
bl func
mov r1, r4, lsr #8
mov r0, #8
and r1, r1, #255
ldmfd sp!, {r4, lr}
b func
Can someone please explain what the expected code is?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9760