]> granicus.if.org Git - llvm/commit
[X86] In lowerVectorShuffle, instead of creating a new node to canonicalize the shuff...
authorCraig Topper <craig.topper@intel.com>
Tue, 23 Jul 2019 18:46:15 +0000 (18:46 +0000)
committerCraig Topper <craig.topper@intel.com>
Tue, 23 Jul 2019 18:46:15 +0000 (18:46 +0000)
commitefb39ecd789de13280ea63d328b77fc0c98fdfe4
tree9e005f1468b17ab485505ab6b4ad4245124da170
parent04599fe58ecdd58b26f08e85c65d9d546b32cd8d
[X86] In lowerVectorShuffle, instead of creating a new node to canonicalize the shuffle mask by commuting, just commute the mask and swap V1/V2.

LegalizeDAG tries to legal the DAG by legalizing nodes before
their operands.

If we create a new node, we end up legalizing it after its operands.
This prevents some of the optimizations that can be done when the
operand is a build_vector since the build_vector will have been
legalized to something else.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366835 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/oddshuffles.ll
test/CodeGen/X86/vector-shift-ashr-sub128.ll
test/CodeGen/X86/vector-shuffle-128-v2.ll
test/CodeGen/X86/vector-zext-widen.ll
test/CodeGen/X86/vector-zext.ll