Skip to content

Commit f524724

Browse files
committed
[DAGCombiner] Use SDNode::isOperandOf to simplify some code. NFCI
llvm-svn: 366778
1 parent fcf3c55 commit f524724

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14829,13 +14829,7 @@ CheckForMaskedLoad(SDValue V, SDValue Ptr, SDValue Chain) {
1482914829
else if (Chain->getOpcode() == ISD::TokenFactor &&
1483014830
SDValue(LD, 1).hasOneUse()) {
1483114831
// LD has only 1 chain use so they are no indirect dependencies.
14832-
bool isOk = false;
14833-
for (const SDValue &ChainOp : Chain->op_values())
14834-
if (ChainOp.getNode() == LD) {
14835-
isOk = true;
14836-
break;
14837-
}
14838-
if (!isOk)
14832+
if (!LD->isOperandOf(Chain.getNode()))
1483914833
return Result;
1484014834
} else
1484114835
return Result; // Fail.

0 commit comments

Comments
 (0)