[DAGCombiner] Use SDNode::isOperandOf to simplify some code. NFCI

llvm-svn: 366778
This commit is contained in:
Craig Topper 2019-07-23 05:13:35 +00:00
parent fcf3c55a8c
commit f5247244f2
1 changed files with 1 additions and 7 deletions

View File

@ -14829,13 +14829,7 @@ CheckForMaskedLoad(SDValue V, SDValue Ptr, SDValue Chain) {
else if (Chain->getOpcode() == ISD::TokenFactor && else if (Chain->getOpcode() == ISD::TokenFactor &&
SDValue(LD, 1).hasOneUse()) { SDValue(LD, 1).hasOneUse()) {
// LD has only 1 chain use so they are no indirect dependencies. // LD has only 1 chain use so they are no indirect dependencies.
bool isOk = false; if (!LD->isOperandOf(Chain.getNode()))
for (const SDValue &ChainOp : Chain->op_values())
if (ChainOp.getNode() == LD) {
isOk = true;
break;
}
if (!isOk)
return Result; return Result;
} else } else
return Result; // Fail. return Result; // Fail.