Skip to content

Commit 50896e7

Browse files
committed
[ARM] Use getSignedConstant. NFC
1 parent 6effab9 commit 50896e7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

llvm/lib/Target/ARM/ARMISelLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6051,7 +6051,7 @@ static SDValue LowerFP_TO_INT_SAT(SDValue Op, SelectionDAG &DAG,
60516051
DAG.getConstant((1 << BW) - 1, DL, VT));
60526052
if (IsSigned)
60536053
Max = DAG.getNode(ISD::SMAX, DL, VT, Max,
6054-
DAG.getConstant(-(1 << BW), DL, VT));
6054+
DAG.getSignedConstant(-(1 << BW), DL, VT));
60556055
return Max;
60566056
}
60576057

llvm/lib/Target/ARM/ARMInstrThumb2.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ def t2_so_imm_not_XFORM : SDNodeXForm<imm, [{
7777

7878
// t2_so_imm_neg_XFORM - Return the negation of a t2_so_imm value
7979
def t2_so_imm_neg_XFORM : SDNodeXForm<imm, [{
80-
return CurDAG->getTargetConstant(-((int)N->getZExtValue()), SDLoc(N),
81-
MVT::i32);
80+
return CurDAG->getSignedConstant(-((int)N->getZExtValue()), SDLoc(N),
81+
MVT::i32, /*isTarget=*/true);
8282
}]>;
8383

8484
// so_imm_notSext_XFORM - Return a so_imm value packed into the format

0 commit comments

Comments
 (0)