Teach DAG combine to fold (extract_subvec (concat v1, ..) i) to v_i
authorMichael Liao <michael.liao@intel.com>
Wed, 17 Oct 2012 20:48:33 +0000 (20:48 +0000)
committerMichael Liao <michael.liao@intel.com>
Wed, 17 Oct 2012 20:48:33 +0000 (20:48 +0000)
commit13429e224cb165dae658ae4ea3ef67d69c1860fa
tree164e93d1a25c9e48fef4c1aac0360e18bb0fe9f7
parent4b1aa961fdbb75035a963f8c6a01c8c5f1dc3f16
Teach DAG combine to fold (extract_subvec (concat v1, ..) i) to v_i

- If the extracted vector has the same type of all vectored being concatenated
  together, it should be simplified directly into v_i, where i is the index of
  the element being extracted.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166125 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
test/CodeGen/X86/extract-concat.ll [new file with mode: 0644]