http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27139

Marc Glisse <marc.glisse at normalesup dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marc.glisse at normalesup
                   |                            |dot org

--- Comment #2 from Marc Glisse <marc.glisse at normalesup dot org> 2012-04-24 
06:35:43 UTC ---
(In reply to comment #0)
> int test (int a)
> {
>         return (double) a;
> }

I just wrote the very same testcase today, extracted from my code...

> Produces:
> 
>         cvtsi2sd        %edi, %xmm0
>         cvttsd2si       %xmm0, %eax
>         ret

Still does. Did you have any idea how to handle it?

> However, following code does the same (at least for -ffast-math):
>         movl    %edi, %eax
>         ret

I don't think -ffast-math is relevant here, on x86 the int->double conversion
is exact hence the reverse has to be as well.

(In reply to comment #1)
> Confirmed, I doubt this shows up that much anyways.

Just posting to mention that it does show up...

Reply via email to