[Bug target/9760] [arm] Combine cannot do its job because immediate operand is used instead of register
steven at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Mon Feb 8 16:11:00 GMT 2010
------- 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
More information about the Gcc-bugs
mailing list