summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorRoman Lebedev <lebedev.ri@gmail.com>2019-06-26 12:19:39 +0000
committerRoman Lebedev <lebedev.ri@gmail.com>2019-06-26 12:19:39 +0000
commitb0ecc1cc6b896cff8f44dfc370277e0bb84eadbf (patch)
tree1bd3ed8a5065bc72543b63d3523d87210bd487e3 /llvm/lib/CodeGen
parent8b9a03973aae23b2e32cea3b72582123a16ef9e0 (diff)
downloadbcm5719-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.cpp6
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,
OpenPOWER on IntegriCloud