OSDN Git Service

[DAGCombine] Slightly improve lowering of BUILD_VECTOR into a shuffle.
authorMichael Kuperstein <michael.m.kuperstein@intel.com>
Wed, 17 Dec 2014 12:32:17 +0000 (12:32 +0000)
committerMichael Kuperstein <michael.m.kuperstein@intel.com>
Wed, 17 Dec 2014 12:32:17 +0000 (12:32 +0000)
commitfd350586f5047c093ea5c7861ea0d575fc539b28
tree60524c47af19dfd1edd2541806d911b70cabac0b
parent73fb93cfaf45fa3deb6c58fe32ff2feb4eef9760
[DAGCombine] Slightly improve lowering of BUILD_VECTOR into a shuffle.

This handles the case of a BUILD_VECTOR being constructed out of elements extracted from a vector twice the size of the result vector. Previously this was always scalarized. Now, we try to construct a shuffle node that feeds on extract_subvectors.

This fixes PR15872 and provides a partial fix for PR21711.

Differential Revision: http://reviews.llvm.org/D6678

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224429 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Target/TargetLowering.h
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
lib/Target/X86/X86ISelLowering.cpp
lib/Target/X86/X86ISelLowering.h
test/CodeGen/X86/vec_extract-avx.ll [new file with mode: 0644]
test/CodeGen/X86/vector-shuffle-combining.ll