[X86] Add custom type legalization for v2i32/v4i16/v8i8->mmx bitcasts to avoid a...
authorCraig Topper <craig.topper@intel.com>
Sun, 2 Dec 2018 05:46:50 +0000 (05:46 +0000)
committerCraig Topper <craig.topper@intel.com>
Sun, 2 Dec 2018 05:46:50 +0000 (05:46 +0000)
commit4bb077910aab43e9f4905475e66faa1f2bd75d24
tree5d80df98bca9aa5d0748275dca639d36d10f2ab5
parentec096a1dae80ef3ea128095416f62b2caeaefd60
[X86] Add custom type legalization for v2i32/v4i16/v8i8->mmx bitcasts to avoid a store/load to/from the stack.

Widen the input to a 128 bit vector by padding with undef elements. Then use a movdq2q to convert from xmm register to mmx register.

llvm-svn: 348086
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/3dnow-intrinsics.ll
llvm/test/CodeGen/X86/mmx-arith.ll
llvm/test/CodeGen/X86/vec_insert-7.ll