[X86][SSE] Combine UNPCKL with vector_shuffle into UNPCKH to save one instruction...
authorCong Hou <congh@google.com>
Fri, 13 Nov 2015 19:47:43 +0000 (19:47 +0000)
committerCong Hou <congh@google.com>
Fri, 13 Nov 2015 19:47:43 +0000 (19:47 +0000)
commit59f2cd8a68a089597686cdf470d14eee026261fa
treec28edc7b94386d3ad302866cf5d6b698ee3daf9f
parent6c420832f338b413ac671cd7f4ee43429bfe2226
[X86][SSE] Combine UNPCKL with vector_shuffle into UNPCKH to save one instruction for sext from v16i8 to v16i16 and v8i16 to v8i32.

This patch is enabling combining UNPCKL with vector_shuffle that moves the upper
half of a vector into the lower half, into a UNPCKH instruction. For example:

t2: v16i8 = vector_shuffle<8,9,10,11,12,13,14,15,u,u,u,u,u,u,u,u> t1, undef:v16i8
t3: v16i8 = X86ISD::UNPCKL undef:v16i8, t2

will be combined to:

t3: v16i8 = X86ISD::UNPCKH undef:v16i8, t1

Differential revision: http://reviews.llvm.org/D14399

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253067 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/vec_int_to_fp.ll
test/CodeGen/X86/vector-sext.ll