Skip to content

Commit 0cb1cca

Browse files
committed
[XCore] Use getSignedConstant()
1 parent 7b61ff2 commit 0cb1cca

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/Target/XCore/XCoreISelLowering.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,8 @@ LowerGlobalAddress(SDValue Op, SelectionDAG &DAG) const
282282
GA = getGlobalAddressWrapper(GA, GV, DAG);
283283
// Handle the rest of the offset.
284284
if (Offset != FoldedOffset) {
285-
SDValue Remaining = DAG.getConstant(Offset - FoldedOffset, DL, MVT::i32);
285+
SDValue Remaining =
286+
DAG.getSignedConstant(Offset - FoldedOffset, DL, MVT::i32);
286287
GA = DAG.getNode(ISD::ADD, DL, MVT::i32, GA, Remaining);
287288
}
288289
return GA;

0 commit comments

Comments
 (0)