mirror of
https://github.com/RPCS3/llvm.git
synced 2024-11-26 05:00:39 +00:00
simplify this code, return only ever has zero or one operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97408 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
165e96bd25
commit
25d5837889
@ -849,14 +849,12 @@ void SelectionDAGBuilder::visitRet(ReturnInst &I) {
|
||||
|
||||
Chain = DAG.getNode(ISD::TokenFactor, getCurDebugLoc(),
|
||||
MVT::Other, &Chains[0], NumValues);
|
||||
} else {
|
||||
for (unsigned i = 0, e = I.getNumOperands(); i != e; ++i) {
|
||||
SmallVector<EVT, 4> ValueVTs;
|
||||
ComputeValueVTs(TLI, I.getOperand(i)->getType(), ValueVTs);
|
||||
unsigned NumValues = ValueVTs.size();
|
||||
if (NumValues == 0) continue;
|
||||
|
||||
SDValue RetOp = getValue(I.getOperand(i));
|
||||
} else if (I.getNumOperands() != 0) {
|
||||
SmallVector<EVT, 4> ValueVTs;
|
||||
ComputeValueVTs(TLI, I.getOperand(0)->getType(), ValueVTs);
|
||||
unsigned NumValues = ValueVTs.size();
|
||||
if (NumValues) {
|
||||
SDValue RetOp = getValue(I.getOperand(0));
|
||||
for (unsigned j = 0, f = NumValues; j != f; ++j) {
|
||||
EVT VT = ValueVTs[j];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user