[llvm] [SystemZ] SIMM32 is a signed constant (PR #118634)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 4 06:15:58 PST 2024


================
@@ -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),
----------------
nikic wrote:

```suggestion
  return CurDAG->getSignedTargetConstant(int32_t(N->getSExtValue()), SDLoc(N),
```
Shouldn't make a difference here, but I think this would be more obvious...

https://github.com/llvm/llvm-project/pull/118634


More information about the llvm-commits mailing list