X86: Fold EXTRACT_SUBVECTORs of a BUILD_VECTOR into a smaller BUILD_VECTOR.
authorBenjamin Kramer <benny.kra@googlemail.com>
Thu, 7 Mar 2013 18:48:40 +0000 (18:48 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Thu, 7 Mar 2013 18:48:40 +0000 (18:48 +0000)
commit2c3d0df8ee7a0c8cfb663a0830dfeed9da775fe1
treed29ea7de5d3718677663c6ca356d9b81543bd2da
parent4185a92b9da21bf4d0b96a58ee3a3e7ade54e7b0
X86: Fold EXTRACT_SUBVECTORs of a BUILD_VECTOR into a smaller BUILD_VECTOR.

That can usually be lowered efficiently and is common in sandybridge code.
It would be nice to do this in DAGCombiner but we can't insert arbitrary
BUILD_VECTORs this late.

Fixes PR15462.

llvm-svn: 176634
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/avx-shift.ll
llvm/test/CodeGen/X86/avx-vinsertf128.ll
llvm/test/CodeGen/X86/avx-vpermil.ll