Canonicalize splats as build_vectors (PR22283)
authorSanjay Patel <spatel@rotateright.com>
Tue, 17 Feb 2015 16:54:32 +0000 (16:54 +0000)
committerSanjay Patel <spatel@rotateright.com>
Tue, 17 Feb 2015 16:54:32 +0000 (16:54 +0000)
commit1115b2c27ea7eab0fa9fd91e6a3fdd61e33deba0
tree4f90683023b41228ab996ae714fd4dc8ec084bb3
parent7a7153e5ee65fc06452f10f6fbe541a6c5401268
Canonicalize splats as build_vectors (PR22283)

This is a follow-on patch to:
http://reviews.llvm.org/D7093

That patch canonicalized constant splats as build_vectors,
and this patch removes the constant check so we can canonicalize
all splats as build_vectors.

This fixes the 2nd test case in PR22283:
http://llvm.org/bugs/show_bug.cgi?id=22283

The unfortunate code duplication between SelectionDAG and DAGCombiner
is discussed in the earlier patch review. At least this patch is just
removing code...

This improves an existing x86 AVX test and changes codegen in an ARM test.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229511 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
test/CodeGen/ARM/vdup.ll
test/CodeGen/X86/vector-shuffle-256-v4.ll