This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/47831] avoid if-conversion if the conditional instructions and following conditional branch has the same condition
- From: "ramana at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 10 Aug 2011 22:20:42 +0000
- Subject: [Bug target/47831] avoid if-conversion if the conditional instructions and following conditional branch has the same condition
- Auto-submitted: auto-generated
- References: <bug-47831-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47831
Ramana Radhakrishnan <ramana at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ramana at gcc dot gnu.org
--- Comment #3 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> 2011-08-10 22:20:42 UTC ---
trunk appears to generate :
ras_validate:
@ args = 0, pretend = 0, frame = 8
@ frame_needed = 0, uses_anonymous_args = 0
push {r0, r1, r2, r4, r5, lr}
movs r2, #4
add r1, sp, #4
mov r5, r0
bl foo
cmp r0, #0
blt .L5
subs r4, r0, #1
b .L3
.L4:
add r3, sp, #4
mov r0, r5
ldrb r1, [r3, r4] @ zero_extendqisi2
bl bar
adds r2, r0, #1
beq .L2
subs r4, r4, #1
.L3:
adds r3, r4, #1
bne .L4
movs r0, #0
b .L2
.L5:
mov r0, #-1
.L2:
pop {r1, r2, r3, r4, r5, pc}