[llvm] r366778 - [DAGCombiner] Use SDNode::isOperandOf to simplify some code. NFCI
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 22 22:13:35 PDT 2019
Author: ctopper
Date: Mon Jul 22 22:13:35 2019
New Revision: 366778
URL: http://llvm.org/viewvc/llvm-project?rev=366778&view=rev
Log:
[DAGCombiner] Use SDNode::isOperandOf to simplify some code. NFCI
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=366778&r1=366777&r2=366778&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Mon Jul 22 22:13:35 2019
@@ -14829,13 +14829,7 @@ CheckForMaskedLoad(SDValue V, SDValue Pt
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.
More information about the llvm-commits
mailing list