This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/1532] [3.3/3.4 Regression] -O3 generates (obviously) redundant tests and jumps
- From: "ian at wasabisystems dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Jan 2004 01:11:57 -0000
- Subject: [Bug target/1532] [3.3/3.4 Regression] -O3 generates (obviously) redundant tests and jumps
- References: <20010101090600.1532.duchier@ps.uni-sb.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From ian at wasabisystems dot com 2004-01-24 01:11 -------
Subject: Re: [3.3/3.4 Regression] -O3 generates (obviously) redundant tests and jumps
"pinskia at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:
> ------- Additional Comments From pinskia at gcc dot gnu dot org 2004-01-23 22:50 -------
> Only now a 3.3/3.4 regression.
There are different aspects of this test case which are still 3.5
regressions.
At -O2, the generated code includes these lines:
cmpl $2, %eax
movl %ecx, %edx
je .L1
.L2:
.L1:
In other words, a jump to an immediately following label, which is
useless. Nothing comparable is seen in the code generated by the
2.95.3 compiler.
At -O3, the generated code includes these lines:
popl %ebx
movl %ecx, %edx
movl %edx, %eax
popl %ebp
ret
This is a useless register move. It should just be
movl %ecx, %eax
Again, nothing comparable is seen in the code generated by the 2.95.3
compiler.
Ian
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=1532