forked from OSchip/llvm-project
[RISCV] Replace 'return ReplaceNode' with 'ReplaceNode; return;' NFC
ReplaceNode is a void function as is the function that we were doing this in. While this is valid code, it was a bit confusing.
This commit is contained in:
parent
6e36859a84
commit
9895285191
|
@ -411,7 +411,6 @@ void RISCVDAGToDAGISel::Select(SDNode *Node) {
|
||||||
}
|
}
|
||||||
ReplaceNode(Node, selectImm(CurDAG, DL, ConstNode->getSExtValue(), XLenVT));
|
ReplaceNode(Node, selectImm(CurDAG, DL, ConstNode->getSExtValue(), XLenVT));
|
||||||
return;
|
return;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
case ISD::FrameIndex: {
|
case ISD::FrameIndex: {
|
||||||
SDValue Imm = CurDAG->getTargetConstant(0, DL, XLenVT);
|
SDValue Imm = CurDAG->getTargetConstant(0, DL, XLenVT);
|
||||||
|
@ -925,11 +924,13 @@ void RISCVDAGToDAGISel::Select(SDNode *Node) {
|
||||||
SDValue RC = CurDAG->getTargetConstant(InRegClassID, DL, XLenVT);
|
SDValue RC = CurDAG->getTargetConstant(InRegClassID, DL, XLenVT);
|
||||||
SDNode *NewNode = CurDAG->getMachineNode(TargetOpcode::COPY_TO_REGCLASS,
|
SDNode *NewNode = CurDAG->getMachineNode(TargetOpcode::COPY_TO_REGCLASS,
|
||||||
DL, VT, SubV, RC);
|
DL, VT, SubV, RC);
|
||||||
return ReplaceNode(Node, NewNode);
|
ReplaceNode(Node, NewNode);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
SDValue Insert = CurDAG->getTargetInsertSubreg(SubRegIdx, DL, VT, V, SubV);
|
SDValue Insert = CurDAG->getTargetInsertSubreg(SubRegIdx, DL, VT, V, SubV);
|
||||||
return ReplaceNode(Node, Insert.getNode());
|
ReplaceNode(Node, Insert.getNode());
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
case ISD::EXTRACT_SUBVECTOR: {
|
case ISD::EXTRACT_SUBVECTOR: {
|
||||||
SDValue V = Node->getOperand(0);
|
SDValue V = Node->getOperand(0);
|
||||||
|
@ -968,11 +969,13 @@ void RISCVDAGToDAGISel::Select(SDNode *Node) {
|
||||||
SDValue RC = CurDAG->getTargetConstant(InRegClassID, DL, XLenVT);
|
SDValue RC = CurDAG->getTargetConstant(InRegClassID, DL, XLenVT);
|
||||||
SDNode *NewNode =
|
SDNode *NewNode =
|
||||||
CurDAG->getMachineNode(TargetOpcode::COPY_TO_REGCLASS, DL, VT, V, RC);
|
CurDAG->getMachineNode(TargetOpcode::COPY_TO_REGCLASS, DL, VT, V, RC);
|
||||||
return ReplaceNode(Node, NewNode);
|
ReplaceNode(Node, NewNode);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
SDValue Extract = CurDAG->getTargetExtractSubreg(SubRegIdx, DL, VT, V);
|
SDValue Extract = CurDAG->getTargetExtractSubreg(SubRegIdx, DL, VT, V);
|
||||||
return ReplaceNode(Node, Extract.getNode());
|
ReplaceNode(Node, Extract.getNode());
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue