This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/1532] [3.3/3.4 Regression] -O3 generates (obviously) redundant tests and jumps


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]