[X86] combineShiftRightArithmetic - break if-else chain as they all return (style). NFC.

This commit is contained in:
Simon Pilgrim 2022-02-07 09:54:34 +00:00
parent 5d3a86489f
commit d7be2bff16
1 changed files with 3 additions and 4 deletions

View File

@ -45588,12 +45588,11 @@ static SDValue combineShiftRightArithmetic(SDNode *N, SelectionDAG &DAG,
SarConst = SarConst - (Size - ShiftSize);
if (SarConst == 0)
return NN;
else if (SarConst.isNegative())
if (SarConst.isNegative())
return DAG.getNode(ISD::SHL, DL, VT, NN,
DAG.getConstant(-SarConst, DL, CVT));
else
return DAG.getNode(ISD::SRA, DL, VT, NN,
DAG.getConstant(SarConst, DL, CVT));
return DAG.getNode(ISD::SRA, DL, VT, NN,
DAG.getConstant(SarConst, DL, CVT));
}
return SDValue();
}