OSDN Git Service

[X86][MMX] Support MMX build vectors to avoid SSE usage (PR29222)
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 11 Mar 2018 19:22:13 +0000 (19:22 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 11 Mar 2018 19:22:13 +0000 (19:22 +0000)
commit3c0783d97578ca86a229e9a83ed52fd1d8d0e8f2
tree328a8226c9b9339efcbf1153ba26de9b2c9b67f8
parent1635c635cc513e91e3b392cade923000d4465983
[X86][MMX] Support MMX build vectors to avoid SSE usage (PR29222)

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

This patch creates a MMX vector from MMX source values, taking the lowest element from each source and constructing broadcasts/build_vectors with direct calls to the MMX PUNPCKL/PSHUFW intrinsics.

We're missing a few consecutive load combines that could be handled in a future patch if that would be useful - my main interest here is just avoiding a lot of the MMX/SSE crossover.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@327247 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/3dnow-intrinsics.ll
test/CodeGen/X86/mmx-build-vector.ll
test/CodeGen/X86/pr29222.ll
test/CodeGen/X86/vec_insert-mmx.ll