[PATCH] D55819: [SelectionDAG] Optional handling of UNDEF elements in matchUnaryPredicate

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 18 06:02:07 PST 2018


RKSimon created this revision.
RKSimon added reviewers: andreadb, spatel, craig.topper.

Now that SimplifyDemandedBits/SimplifyDemandedVectorElts is simplifying vector elements, we're seeing more constant BUILD_VECTOR containing UNDEFs.

This patch provides opt-in handling of UNDEF elements in matchUnaryPredicate, passing NULL instead of the result ConstantSDNode* argument.

I've updated SelectionDAG::simplifyShift to demonstrate its use.

An equivalent matchBinaryPredicate patch is in progress.


Repository:
  rL LLVM

https://reviews.llvm.org/D55819

Files:
  include/llvm/CodeGen/SelectionDAGNodes.h
  lib/CodeGen/SelectionDAG/SelectionDAG.cpp
  test/CodeGen/X86/combine-shl.ll
  test/CodeGen/X86/combine-sra.ll
  test/CodeGen/X86/combine-srl.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55819.178649.patch
Type: text/x-patch
Size: 4696 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181218/6eb30dfc/attachment.bin>


More information about the llvm-commits mailing list