Skip to content

Commit d7be2bf

Browse files
committed
[X86] combineShiftRightArithmetic - break if-else chain as they all return (style). NFC.
1 parent 5d3a864 commit d7be2bf

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

llvm/lib/Target/X86/X86ISelLowering.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45588,12 +45588,11 @@ static SDValue combineShiftRightArithmetic(SDNode *N, SelectionDAG &DAG,
4558845588
SarConst = SarConst - (Size - ShiftSize);
4558945589
if (SarConst == 0)
4559045590
return NN;
45591-
else if (SarConst.isNegative())
45591+
if (SarConst.isNegative())
4559245592
return DAG.getNode(ISD::SHL, DL, VT, NN,
4559345593
DAG.getConstant(-SarConst, DL, CVT));
45594-
else
45595-
return DAG.getNode(ISD::SRA, DL, VT, NN,
45596-
DAG.getConstant(SarConst, DL, CVT));
45594+
return DAG.getNode(ISD::SRA, DL, VT, NN,
45595+
DAG.getConstant(SarConst, DL, CVT));
4559745596
}
4559845597
return SDValue();
4559945598
}

0 commit comments

Comments
 (0)