[llvm] d7be2bf - [X86] combineShiftRightArithmetic - break if-else chain as they all return (style). NFC.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 7 01:54:50 PST 2022
Author: Simon Pilgrim
Date: 2022-02-07T09:54:34Z
New Revision: d7be2bff16eaf40b9d6783ada839fe7447e6957b
URL: https://github.com/llvm/llvm-project/commit/d7be2bff16eaf40b9d6783ada839fe7447e6957b
DIFF: https://github.com/llvm/llvm-project/commit/d7be2bff16eaf40b9d6783ada839fe7447e6957b.diff
LOG: [X86] combineShiftRightArithmetic - break if-else chain as they all return (style). NFC.
Added:
Modified:
llvm/lib/Target/X86/X86ISelLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index a7736b9d09079..bb84f071d92a2 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -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();
}
More information about the llvm-commits
mailing list