forked from OSchip/llvm-project
[X86] Use ReplaceAllUsesWith instead of ReplaceAllUsesOfValueWith to simplify some code. NFCI
This commit is contained in:
parent
695804508d
commit
69806808b9
|
@ -843,12 +843,7 @@ void X86DAGToDAGISel::PreprocessISelDAG() {
|
||||||
CurDAG->getNode(NewOpc, SDLoc(N), N->getValueType(0),
|
CurDAG->getNode(NewOpc, SDLoc(N), N->getValueType(0),
|
||||||
N->getOperand(0));
|
N->getOperand(0));
|
||||||
--I;
|
--I;
|
||||||
if (N->isStrictFPOpcode()) {
|
CurDAG->ReplaceAllUsesWith(N, Res.getNode());
|
||||||
SDValue From[] = {SDValue(N, 0), SDValue(N, 1)};
|
|
||||||
SDValue To[] = {Res.getValue(0), Res.getValue(1)};
|
|
||||||
CurDAG->ReplaceAllUsesOfValuesWith(From, To, 2);
|
|
||||||
} else
|
|
||||||
CurDAG->ReplaceAllUsesOfValueWith(SDValue(N, 0), Res);
|
|
||||||
++I;
|
++I;
|
||||||
CurDAG->DeleteNode(N);
|
CurDAG->DeleteNode(N);
|
||||||
continue;
|
continue;
|
||||||
|
@ -935,12 +930,7 @@ void X86DAGToDAGISel::PreprocessISelDAG() {
|
||||||
N->getOperand(0),
|
N->getOperand(0),
|
||||||
CurDAG->getTargetConstant(Imm, dl, MVT::i8));
|
CurDAG->getTargetConstant(Imm, dl, MVT::i8));
|
||||||
--I;
|
--I;
|
||||||
if (IsStrict) {
|
CurDAG->ReplaceAllUsesWith(N, Res.getNode());
|
||||||
SDValue From[] = {SDValue(N, 0), SDValue(N, 1)};
|
|
||||||
SDValue To[] = {Res.getValue(0), Res.getValue(1)};
|
|
||||||
CurDAG->ReplaceAllUsesOfValuesWith(From, To, 2);
|
|
||||||
} else
|
|
||||||
CurDAG->ReplaceAllUsesOfValueWith(SDValue(N, 0), Res);
|
|
||||||
++I;
|
++I;
|
||||||
CurDAG->DeleteNode(N);
|
CurDAG->DeleteNode(N);
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in New Issue