Skip to content

Commit 77d5662

Browse files
committed
[AArch64] Use getNegative instead of manually sub with 0 (NFC)
1 parent 7dd2f1c commit 77d5662

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Target/AArch64/AArch64ISelLowering.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7312,8 +7312,8 @@ SDValue AArch64TargetLowering::LowerABS(SDValue Op, SelectionDAG &DAG) const {
73127312
return LowerToPredicatedOp(Op, DAG, AArch64ISD::ABS_MERGE_PASSTHRU);
73137313

73147314
SDLoc DL(Op);
7315-
SDValue Neg = DAG.getNode(ISD::SUB, DL, VT, DAG.getConstant(0, DL, VT),
7316-
Op.getOperand(0));
7315+
SDValue Neg = DAG.getNegative(Op.getOperand(0), DL, VT);
7316+
73177317
// Generate SUBS & CSEL.
73187318
SDValue Cmp = DAG.getNode(AArch64ISD::SUBS, DL, DAG.getVTList(VT, FlagsVT),
73197319
Op.getOperand(0), DAG.getConstant(0, DL, VT));

0 commit comments

Comments
 (0)