forked from OSchip/llvm-project
[DAGCombiner] Use SDNode::isOperandOf to simplify some code. NFCI
llvm-svn: 366778
This commit is contained in:
parent
fcf3c55a8c
commit
f5247244f2
|
@ -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.
|
||||||
|
|
Loading…
Reference in New Issue