[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 &&
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.