[PATCH] D65132: [X86] In lowerVectorShuffle, instead of creating a new node to canonicalize the shuffle mask by commuting, just commute the mask and swap V1/V2.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 22 22:36:11 PDT 2019


craig.topper created this revision.
craig.topper added reviewers: RKSimon, spatel.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D65132

Files:
  llvm/lib/Target/X86/X86ISelLowering.cpp
  llvm/test/CodeGen/X86/oddshuffles.ll
  llvm/test/CodeGen/X86/vector-shift-ashr-sub128.ll
  llvm/test/CodeGen/X86/vector-shuffle-128-v2.ll
  llvm/test/CodeGen/X86/vector-zext-widen.ll
  llvm/test/CodeGen/X86/vector-zext.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65132.211250.patch
Type: text/x-patch
Size: 11864 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190723/ebb7b28e/attachment.bin>


More information about the llvm-commits mailing list