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

via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 5 05:35:31 PST 2024


Author: Kai Nacke
Date: 2024-12-05T08:35:27-05:00
New Revision: f85be32613a3b7078d4a4618f0995bcab353d050

URL: https://github.com/llvm/llvm-project/commit/f85be32613a3b7078d4a4618f0995bcab353d050
DIFF: https://github.com/llvm/llvm-project/commit/f85be32613a3b7078d4a4618f0995bcab353d050.diff

LOG: [SystemZ] SIMM32 is a signed constant (#118634)

A follow-up to PR #117181: SIMM32 must use getSignedTargetConstant(),
too.

Added: 
    

Modified: 
    llvm/lib/Target/SystemZ/SystemZOperands.td

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/SystemZ/SystemZOperands.td b/llvm/lib/Target/SystemZ/SystemZOperands.td
index 64345ca3a1394e..5349e0d9a8512c 100644
--- a/llvm/lib/Target/SystemZ/SystemZOperands.td
+++ b/llvm/lib/Target/SystemZ/SystemZOperands.td
@@ -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),
+                                         MVT::i64);
 }]>;
 
 // Negate and then truncate an immediate to a 32-bit unsigned quantity.


        


More information about the llvm-commits mailing list