@@ -220,7 +220,7 @@ def NEGLF32 : SDNodeXForm<imm, [{
220
220
221
221
// Truncate an immediate to a 8-bit signed quantity.
222
222
def SIMM8 : SDNodeXForm<imm, [{
223
- return CurDAG->getSignedTargetConstant(int8_t(N->getZExtValue ()), SDLoc(N),
223
+ return CurDAG->getSignedTargetConstant(int8_t(N->getSExtValue ()), SDLoc(N),
224
224
MVT::i64);
225
225
}]>;
226
226
@@ -244,13 +244,13 @@ def UIMM12 : SDNodeXForm<imm, [{
244
244
245
245
// Truncate an immediate to a 16-bit signed quantity.
246
246
def SIMM16 : SDNodeXForm<imm, [{
247
- return CurDAG->getSignedTargetConstant(int16_t(N->getZExtValue ()), SDLoc(N),
247
+ return CurDAG->getSignedTargetConstant(int16_t(N->getSExtValue ()), SDLoc(N),
248
248
MVT::i64);
249
249
}]>;
250
250
251
251
// Negate and then truncate an immediate to a 16-bit signed quantity.
252
252
def NEGSIMM16 : SDNodeXForm<imm, [{
253
- return CurDAG->getSignedTargetConstant(int16_t(-N->getZExtValue ()), SDLoc(N),
253
+ return CurDAG->getSignedTargetConstant(int16_t(-N->getSExtValue ()), SDLoc(N),
254
254
MVT::i64);
255
255
}]>;
256
256
@@ -262,13 +262,13 @@ def UIMM16 : SDNodeXForm<imm, [{
262
262
263
263
// Truncate an immediate to a 32-bit signed quantity.
264
264
def SIMM32 : SDNodeXForm<imm, [{
265
- return CurDAG->getSignedTargetConstant(int32_t(N->getZExtValue ()), SDLoc(N),
265
+ return CurDAG->getSignedTargetConstant(int32_t(N->getSExtValue ()), SDLoc(N),
266
266
MVT::i64);
267
267
}]>;
268
268
269
269
// Negate and then truncate an immediate to a 32-bit unsigned quantity.
270
270
def NEGSIMM32 : SDNodeXForm<imm, [{
271
- return CurDAG->getSignedTargetConstant(int32_t(-N->getZExtValue ()), SDLoc(N),
271
+ return CurDAG->getSignedTargetConstant(int32_t(-N->getSExtValue ()), SDLoc(N),
272
272
MVT::i64);
273
273
}]>;
274
274
0 commit comments