Teach the DAGCombiner how to fold concat_vector nodes when the input is two
authorRobert Lougher <rob.lougher@gmail.com>
Tue, 11 Feb 2014 15:42:46 +0000 (15:42 +0000)
committerRobert Lougher <rob.lougher@gmail.com>
Tue, 11 Feb 2014 15:42:46 +0000 (15:42 +0000)
commita63585a8f5fab55a4cd412eec632a98392b640ea
treed834d3c267a85f7ccf4556a08fb08e4cf475f7bc
parent79ced8c5fa4e88394a9c4577537af4044d7a29f9
Teach the DAGCombiner how to fold concat_vector nodes when the input is two
BUILD_VECTOR nodes, e.g.:

(concat_vectors (BUILD_VECTOR a1, a2, a3, a4), (BUILD_VECTOR b1, b2, b3, b4))
->
(BUILD_VECTOR a1, a2, a3, a4, b1, b2, b3, b4)

This fixes an issue with AVX, where a sequence was not recognized as a 256-bit
vbroadcast due to the concat_vectors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201158 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
test/CodeGen/X86/avx-vbroadcast.ll
test/CodeGen/X86/avx2-vbroadcast.ll