OSDN Git Service

Don't combine a shuffle of two BUILD_VECTORs with duplicate elements.
authorEli Friedman <efriedma@codeaurora.org>
Thu, 15 Dec 2016 21:36:59 +0000 (21:36 +0000)
committerEli Friedman <efriedma@codeaurora.org>
Thu, 15 Dec 2016 21:36:59 +0000 (21:36 +0000)
commit259f5fb7829884ad8eab1db6066ffca741e03370
tree72f2700df5a2b5ccd6d472ca243785aa1fc3aa31
parent8cf1000f92e4667ae67de25429287a869369bd8d
Don't combine a shuffle of two BUILD_VECTORs with duplicate elements.

Targets can't handle this case well in general; we often transform
a shuffle of two cheap BUILD_VECTORs to element-by-element insertion,
which is very inefficient.

Fixes https://llvm.org/bugs/show_bug.cgi?id=31364 . Partially
fixes https://llvm.org/bugs/show_bug.cgi?id=31301.

Differential Revision: https://reviews.llvm.org/D27787

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289874 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
test/CodeGen/ARM/vtrn.ll
test/CodeGen/ARM/vzip.ll
test/CodeGen/X86/oddshuffles.ll
test/CodeGen/X86/vector-shuffle-128-v16.ll