diff options
| author | Roman Lebedev <lebedev.ri@gmail.com> | 2019-06-26 12:19:39 +0000 |
|---|---|---|
| committer | Roman Lebedev <lebedev.ri@gmail.com> | 2019-06-26 12:19:39 +0000 |
| commit | b0ecc1cc6b896cff8f44dfc370277e0bb84eadbf (patch) | |
| tree | 1bd3ed8a5065bc72543b63d3523d87210bd487e3 /llvm/lib/CodeGen | |
| parent | 8b9a03973aae23b2e32cea3b72582123a16ef9e0 (diff) | |
| download | bcm5719-llvm-b0ecc1cc6b896cff8f44dfc370277e0bb84eadbf.tar.gz bcm5719-llvm-b0ecc1cc6b896cff8f44dfc370277e0bb84eadbf.zip | |
[X86] X86DAGToDAGISel::matchBitExtract(): pattern b: truncation awareness
Summary:
(Not so) boringly identical to pattern a (D62786)
Not yet sure how do deal with the last pattern c.
Reviewers: RKSimon, craig.topper, spatel
Reviewed By: RKSimon
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D62793
llvm-svn: 364418
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index a2eca91c67e..a69fe1d8e20 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -2244,6 +2244,12 @@ bool SelectionDAG::MaskedValueIsZero(SDValue V, const APInt &Mask, return Mask.isSubsetOf(computeKnownBits(V, DemandedElts, Depth).Zero); } +/// MaskedValueIsAllOnes - Return true if '(Op & Mask) == Mask'. +bool SelectionDAG::MaskedValueIsAllOnes(SDValue V, const APInt &Mask, + unsigned Depth) const { + return Mask.isSubsetOf(computeKnownBits(V, Depth).One); +} + /// isSplatValue - Return true if the vector V has the same value /// across all DemandedElts. bool SelectionDAG::isSplatValue(SDValue V, const APInt &DemandedElts, |

