This is the mail archive of the gcc-patches@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]

Re: [PATCH] pr53138 - miscompilation of spaceship operator


On Fri, Apr 27, 2012 at 11:49 AM, Paolo Bonzini <bonzini@gnu.org> wrote:
> The testcase is miscompiled to this:
>
> ? ? ? ?...
> ? ? ? ?movl ? ?(%rsi), %ecx
> ? ? ? ?cmpl ? ?%ecx, (%rdi)
> ? ? ? ?sbbl ? ?%edx, %edx
> ? ? ? ?cmovbe ?%edx, %eax
> ? ? ? ?ret
>
> but sbbl only preserves the carry flag, not the zero flag. ?I suppose
> one could use different patterns with different CC modes, but this is
> the safest fix.
>
> Bootstrapped/regtested x86_64-pc-linux-gnu, ok for mainline?

OK.

> I also reproduced this at least on 4.7; help would be welcome on
> committing it to the branches.  Thanks in advance!

I can take care of this, but I won' be able to do this until Monday.

Thanks,
Uros.


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