Skip to content

Commit 5405f54

Browse files
committed
[Lanai] Use getSignedTargetConstant() for signed immediate
1 parent 86b69c3 commit 5405f54

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/Target/Lanai/LanaiInstrInfo.td

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ def HI16 : SDNodeXForm<imm, [{
7474
}]>;
7575

7676
def NEG : SDNodeXForm<imm, [{
77-
return CurDAG->getTargetConstant(-N->getSExtValue(), SDLoc(N), MVT::i32);
77+
return CurDAG->getSignedTargetConstant(-N->getSExtValue(), SDLoc(N),
78+
MVT::i32);
7879
}]>;
7980

8081
def LO21 : SDNodeXForm<imm, [{

0 commit comments

Comments
 (0)