Skip to content

Commit 3c621b1

Browse files
committed
[MSP430] Use getSignedTargetConstant()
The displacement is signed.
1 parent c11b6b1 commit 3c621b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ bool MSP430DAGToDAGISel::SelectAddr(SDValue N,
278278
Disp = CurDAG->getTargetBlockAddress(AM.BlockAddr, MVT::i32, 0,
279279
0/*AM.SymbolFlags*/);
280280
else
281-
Disp = CurDAG->getTargetConstant(AM.Disp, SDLoc(N), MVT::i16);
281+
Disp = CurDAG->getSignedTargetConstant(AM.Disp, SDLoc(N), MVT::i16);
282282

283283
return true;
284284
}

0 commit comments

Comments
 (0)