[LLVMdev] Generating movq2dq using IRBuilder

Bill Wendling isanbard at gmail.com
Thu Jul 31 16:07:45 PDT 2008


On Thu, Jul 31, 2008 at 2:50 PM, Stefanus Du Toit
<stefanus.dutoit at rapidmind.com> wrote:
> On 31-Jul-08, at 2:38 PM, Dan Gohman wrote:
>> On Jul 31, 2008, at 7:22 AM, Nicolas Capens wrote:
>>> In the same breath I'd also like to kindly ask if someone could have
>>> a look at the reverse operations, namely trunk from 128 to 64 bit
>>> using movdq2q, and 128 to 32 and 64 to 32 using movd. This also
>>> seems related to Bug 2585. Thanks again.
>>
>> The operations you're describing can be represented as insertelement
>> and extractelement in LLVM IR.
>>
>> I don't know of anyone actively working on MMX tuning for LLVM, so
>> if you'd like to see it improve, consider yourself encouraged to
>> get involved directly :-).
>
> I noticed that, when doing operations on 64-bit vectors, MMX
> instructions are often emitted even when SSE3 is available. Is this
> really the intent or is it just that SSE versions of certain patterns
> have not been added, and therefore it falls back to MMX versions? It's
> not really encouraged to use MMX (or x87 for that matter) on modern
> microarchitectures if you can get away with SSE.
>
Just off the top of my head, I'd say that the pattern probably hasn't
been added. You're right that we should use SSE whenever available.
Could you send an example of a program that's using MMX when the
equivalent SSE instruction is available?

-bw



More information about the llvm-dev mailing list