This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug optimization/10817] gcc does not optimize result=0;if(t!=0)result=t; to result=t;
- From: "pinskia at physics dot uc dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 May 2003 00:22:31 -0000
- Subject: [Bug optimization/10817] gcc does not optimize result=0;if(t!=0)result=t; to result=t;
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10817
------- Additional Comments From pinskia@physics.uc.edu 2003-05-25 00:22 -------
It also happens on i686-pc-linux-gnu:
.globl h
.type h, @function
h:
movl 4(%esp), %eax
xorl %edx, %edx
testl %eax, %eax
je .L1
movl %eax, %edx
.L1:
movl %edx, %eax
ret
.size h, .-h
.p2align 4,,15
.globl h1
.type h1, @function
h1:
movl 4(%esp), %eax
xorl %edx, %edx
testl %eax, %eax
je .L5
movl %eax, %edx
.L5:
movl %edx, %eax
ret
.size h1, .-h1
.ident "GCC: (GNU) 3.4 20030524 (experimental)"
So maybe the optimization is Alpha specific.
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.