[PATCH] D62783: [DAG] isBitwiseNot / isConstOrConstSplat - add support for build vector undefs + truncation (PR41020)

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 1 13:13:21 PDT 2019


RKSimon created this revision.
RKSimon added reviewers: lebedev.ri, nikic, spatel, craig.topper, t.p.northover, efriedma.
Herald added a subscriber: javed.absar.
Herald added a project: LLVM.

Add (opt-in) support for implicit truncation to isConstOrConstSplat, which allows us to match truncated 'all ones' cases in isBitwiseNot.

PR41020 compares against using ISD::isBuildVectorAllOnes() instead, but that predicate silently accepts any UNDEF elements in the build vector which might not be what we want in isBitwiseNot - so I've added an opt-in 'AllowUndefs' flag that is set to false by default but will allow us to enable it on individual cases where its safe.


Repository:
  rL LLVM

https://reviews.llvm.org/D62783

Files:
  include/llvm/CodeGen/SelectionDAGNodes.h
  lib/CodeGen/SelectionDAG/SelectionDAG.cpp
  test/CodeGen/AArch64/sat-add.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62783.202566.patch
Type: text/x-patch
Size: 8073 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190601/11e46774/attachment.bin>


More information about the llvm-commits mailing list