This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/26276] remove condition check code BUG with -O2
- From: "inaoka dot kazuhiro at renesas dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Feb 2006 09:10:44 -0000
- Subject: [Bug c/26276] remove condition check code BUG with -O2
- References: <bug-26276-5993@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from inaoka dot kazuhiro at renesas dot com 2006-02-14 09:10 -------
Created an attachment (id=10843)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10843&action=view)
Sample NG output
This is a sample output.
m32r-linux-gnu-gcc -S -O2 omm_kill.i
beqz r5,.L101
ld r5,@(12,r8)
.balign 4
.L69:
and3 r4,r5,#0x8
bnez r4,.L71
ldi r10,#-1 ; 0xffffffff
.balign 4
<=== Fall through is NG!
Removed compare r10 with -1 and jump to .L79.
.L81:
ld r8,@(172,r10)
add3 r9,r10,#172
beq r8,r9,.L83
.balign 4
.L94:
add3 r0,r8,#-180
ld r5,@(120,r0)
ld r4,@(120,r10)
beq r5,r4,.L85
bl oom_kill_task
mv r12,r0
bnez r0,.L79
.balign 4
.L85:
ld r8,@(r8)
bne r8,r9,.L94
.balign 4
.L83:
mv r0,r10
bl oom_kill_task
mv r12,r0
beqz r0,.L62
.balign 4
.L79:
ld24 r0,#tasklist_lock
bl _read_unlock
beqz r12,.L87
mv r0,r12
bl mmput
bra .L87
.balign 4
.L76:
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26276