[LLVMdev] Generating movq2dq using IRBuilder

Stefanus Du Toit stefanus.dutoit at rapidmind.com
Fri Aug 1 08:03:44 PDT 2008

On 31-Jul-08, at 10:53 PM, Nicolas Capens wrote:
> I'm not if using MMX instructions when doing operations on 64-bit  
> vectors is
> so terrible? With x86-64 you have double the registers, but it comes  
> at the
> cost of longer instruction encodings. So there's probably no benefit  
> using
> SSE. Or am I missing something?

The main reason is that, if you're using SSE also to do 128 bit  
operations (which is not unlikely), and you're moving data back and  
forth between 64 bit and 128 bit work, you need to insert moves  
between XMM and MMX registers.

Furthermore, it's another set of registers that may need to be  
restored by the function. This depends on your ABI and what exactly  
you're doing.


Stefanus Du Toit <stefanus.dutoit at rapidmind.com>
   RapidMind Inc.
   phone: +1 519 885 5455 x116 -- fax: +1 519 885 1463

More information about the llvm-dev mailing list