The type-legalizer often scalarizes code. One of the common patterns is extract-and...
authorNadav Rotem <nadav.rotem@intel.com>
Fri, 3 Feb 2012 13:18:25 +0000 (13:18 +0000)
committerNadav Rotem <nadav.rotem@intel.com>
Fri, 3 Feb 2012 13:18:25 +0000 (13:18 +0000)
commit7e413e9c94294f17daa64ac9fda09a738e20caa5
tree12f308bb55bb90e39616f35c56c49dda0597f793
parenta02556679e685280bd59e0197d9e4aa51d40480c
The type-legalizer often scalarizes code. One of the common patterns is extract-and-truncate.
In this patch we optimize this pattern and convert the sequence into extract op of a narrow type.
This allows the BUILD_VECTOR dag optimizations to construct efficient shuffle operations in many cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149692 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
test/CodeGen/X86/2011-12-8-bitcastintprom.ll
test/CodeGen/X86/avx-shuffle.ll