summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2019-07-23 05:13:35 +0000
committerCraig Topper <craig.topper@intel.com>2019-07-23 05:13:35 +0000
commitf5247244f29340e00f5457da7a06234533f7173c (patch)
tree03899342bb0abe51b8df06eb2dd7b889d04cdc7b /llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
parentfcf3c55a8cd2b00c54bc08652f8b8ad517abab43 (diff)
downloadbcm5719-llvm-f5247244f29340e00f5457da7a06234533f7173c.tar.gz
bcm5719-llvm-f5247244f29340e00f5457da7a06234533f7173c.zip
[DAGCombiner] Use SDNode::isOperandOf to simplify some code. NFCI
llvm-svn: 366778
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index eabbef573f2..00a4c0685cc 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -14829,13 +14829,7 @@ CheckForMaskedLoad(SDValue V, SDValue Ptr, SDValue Chain) {
else if (Chain->getOpcode() == ISD::TokenFactor &&
SDValue(LD, 1).hasOneUse()) {
// LD has only 1 chain use so they are no indirect dependencies.
- bool isOk = false;
- for (const SDValue &ChainOp : Chain->op_values())
- if (ChainOp.getNode() == LD) {
- isOk = true;
- break;
- }
- if (!isOk)
+ if (!LD->isOperandOf(Chain.getNode()))
return Result;
} else
return Result; // Fail.
OpenPOWER on IntegriCloud