OSDN Git Service

[X86][SSE] Combine shuffle nodes with multiple uses if all the users are being combined.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 6 Feb 2017 13:44:45 +0000 (13:44 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 6 Feb 2017 13:44:45 +0000 (13:44 +0000)
commit0aca40051b03f86a952cdec20db7d6af714a6d6f
tree61107f8320c1674db6c0df8e513d11c539aaddc9
parent16291a2e6d89d9cbc51eb097dae5ec5712eac67e
[X86][SSE] Combine shuffle nodes with multiple uses if all the users are being combined.

Currently we only combine shuffle nodes if they have a single user to prevent us from causing code bloat by splitting the shuffles into several different combines.

We don't take into account that in some cases we will already have combined all the users during recursively calling up the shuffle tree.

This patch keeps a list of all the shuffle nodes that have been combined so far and permits combining of further shuffle nodes if all its users are in that list.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294183 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/SelectionDAGNodes.h
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/clear_upper_vector_element_bits.ll
test/CodeGen/X86/select.ll
test/CodeGen/X86/vector-shuffle-combining-avx2.ll
test/CodeGen/X86/vector-shuffle-combining-ssse3.ll