Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions llvm/lib/Target/SystemZ/SystemZOperands.td
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,8 @@ def UIMM16 : SDNodeXForm<imm, [{

// Truncate an immediate to a 32-bit signed quantity.
def SIMM32 : SDNodeXForm<imm, [{
return CurDAG->getTargetConstant(int32_t(N->getZExtValue()), SDLoc(N),
MVT::i64);
return CurDAG->getSignedTargetConstant(int32_t(N->getZExtValue()), SDLoc(N),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return CurDAG->getSignedTargetConstant(int32_t(N->getZExtValue()), SDLoc(N),
return CurDAG->getSignedTargetConstant(int32_t(N->getSExtValue()), SDLoc(N),

Shouldn't make a difference here, but I think this would be more obvious...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. This should be done for all the SIMM variants then, I think. @redstar would you mind doing this in a follow-on PR?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I'll do that.

MVT::i64);
}]>;

// Negate and then truncate an immediate to a 32-bit unsigned quantity.
Expand Down
Loading