[LLVMdev] LLVM 2.8 and MMX
eli.friedman at gmail.com
Wed Sep 8 09:24:08 CDT 2010
On Wed, Sep 8, 2010 at 12:35 AM, Nicolas Capens
<nicolas.capens at gmail.com> wrote:
> Hi Chris,
> It's not broken, but the performance is crippled.
> I noticed that the code still contains some MMX instructions, but several
> operations get expanded (apparently swizzling and such get expanded to a
> large number of byte moves).
I think some changes related to MMX landed before 2.8 branched which
shouldn't have... please file a bug.
> I could use intrinsics, but they wouldn't be optimized like other vector
> operations. I could use SSE operations, but they would increase SSE register
> pressure while MMX registers are left unused.
> So ideally I would like to inform LLVM that selecting MMX instructions is
> fine. I'm inserting emms instructions in the right spots myself.
I think the direction going forward we're going to prefer is that
64-bit vectors get widened to 128-bit vectors, which might not be
quite ideal in some situations, but will avoid situations where MMX
instructions are incorrectly generated. That said, the work isn't
finished, so it shouldn't be in 2.8.
More information about the LLVMdev