summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2017-06-16 23:19:14 +0000
committerCraig Topper <craig.topper@intel.com>2017-06-16 23:19:14 +0000
commit288b3c9e69964496f4560f3efb7dac62949b1236 (patch)
tree8167df1fe6bd6cd5683d975861748ba352d26027 /llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
parentea5b8bc9efc8ea6c6a68caa53156ee661ce761b8 (diff)
downloadbcm5719-llvm-288b3c9e69964496f4560f3efb7dac62949b1236.tar.gz
bcm5719-llvm-288b3c9e69964496f4560f3efb7dac62949b1236.zip
[SelectionDAG] Use APInt::isSubsetOf. NFC
llvm-svn: 305606
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 159c680beb8..a7b411cecac 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -3685,7 +3685,7 @@ SDValue DAGCombiner::visitAND(SDNode *N) {
// fold (and (or x, C), D) -> D if (C & D) == D
if (N1C && N0.getOpcode() == ISD::OR)
if (ConstantSDNode *ORI = isConstOrConstSplat(N0.getOperand(1)))
- if ((ORI->getAPIntValue() & N1C->getAPIntValue()) == N1C->getAPIntValue())
+ if (N1C->getAPIntValue().isSubsetOf(ORI->getAPIntValue()))
return N1;
// fold (and (any_ext V), c) -> (zero_ext V) if 'and' only clears top bits.
if (N1C && N0.getOpcode() == ISD::ANY_EXTEND) {
OpenPOWER on IntegriCloud