[X86][MMX] Improve handling of 64-bit MMX constants
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 1 Mar 2018 22:22:31 +0000 (22:22 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 1 Mar 2018 22:22:31 +0000 (22:22 +0000)
commit90fd0622b63d2c7addb8b97d98e134ea63d3f037
tree02450a7498214fb83d32a755a80ff54b3f98a58a
parent05ce1d3944394be8bba20d50c8da77ff3a1b657e
[X86][MMX] Improve handling of 64-bit MMX constants

64-bit MMX constant generation usually ends up lowering into SSE instructions before being spilled/reloaded as a MMX type.

This patch bitcasts the constant to a double value to allow correct loading directly to the MMX register.

I've added MMX constant asm comment support to improve testing, it's better to always print the double values as hex constants as MMX is mainly an integer unit (and even with 3DNow! its just floats).

Differential Revision: https://reviews.llvm.org/D43616

llvm-svn: 326497
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/lib/Target/X86/X86MCInstLower.cpp
llvm/test/CodeGen/X86/fast-isel-bc.ll
llvm/test/CodeGen/X86/vector-shuffle-mmx.ll