forked from OSchip/llvm-project
[DAG] reassociateOpsCommutative - test getNode result directly. NFC
Matches the clean code style we use directly above
This commit is contained in:
parent
8188484daa
commit
010b09b0c5
|
@ -1076,10 +1076,9 @@ SDValue DAGCombiner::reassociateOpsCommutative(unsigned Opc, const SDLoc &DL,
|
||||||
if (N0.hasOneUse()) {
|
if (N0.hasOneUse()) {
|
||||||
// Reassociate: (op (op x, c1), y) -> (op (op x, y), c1)
|
// Reassociate: (op (op x, c1), y) -> (op (op x, y), c1)
|
||||||
// iff (op x, c1) has one use
|
// iff (op x, c1) has one use
|
||||||
SDValue OpNode = DAG.getNode(Opc, SDLoc(N0), VT, N00, N1);
|
if (SDValue OpNode = DAG.getNode(Opc, SDLoc(N0), VT, N00, N1))
|
||||||
if (!OpNode.getNode())
|
return DAG.getNode(Opc, DL, VT, OpNode, N01);
|
||||||
return SDValue();
|
return SDValue();
|
||||||
return DAG.getNode(Opc, DL, VT, OpNode, N01);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return SDValue();
|
return SDValue();
|
||||||
|
|
Loading…
Reference in New Issue