[Bug target/36992] Very stange code for _mm_move_epi64

hjl dot tools at gmail dot com gcc-bugzilla@gcc.gnu.org
Fri Aug 1 13:27:00 GMT 2008



------- Comment #7 from hjl dot tools at gmail dot com  2008-08-01 13:25 -------
(In reply to comment #6)
> with -march=core2 it uses
> 
>         movd    %xmm0, %rax
>         movq    %rax, %xmm0
>

Even this isn't necessary. We should just use

movq %xmm0,%xmm0

> with -march=opteron (and -march=generic) it uses
> 
>         movhps  .LC0(%rip), %xmm0
> 
> ISTR there is some penalty for using movq on opteron?

Opteron doesn't like inter-unit move, like

movd    %xmm0, %rax

But it isn't necessary at all. We should use

movq %xmm0,%xmm0

anyway.


-- 


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



More information about the Gcc-bugs mailing list