[llvm] 2e07c2b - [AVR] Use getSignedConstant() for negative number

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 22 05:57:44 PST 2024


Author: Nikita Popov
Date: 2024-11-22T14:57:30+01:00
New Revision: 2e07c2b1bf2bde62eaefe85494a8d2740f4b5ae8

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

LOG: [AVR] Use getSignedConstant() for negative number

Added: 
    

Modified: 
    llvm/lib/Target/AVR/AVRISelLowering.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/AVR/AVRISelLowering.cpp b/llvm/lib/Target/AVR/AVRISelLowering.cpp
index e01ed133c3e365..3551c927e989ee 100644
--- a/llvm/lib/Target/AVR/AVRISelLowering.cpp
+++ b/llvm/lib/Target/AVR/AVRISelLowering.cpp
@@ -1111,7 +1111,7 @@ bool AVRTargetLowering::getPreIndexedAddressParts(SDNode *N, SDValue &Base,
     }
 
     Base = Op->getOperand(0);
-    Offset = DAG.getConstant(RHSC, DL, MVT::i8);
+    Offset = DAG.getSignedConstant(RHSC, DL, MVT::i8);
     AM = ISD::PRE_DEC;
 
     return true;


        


More information about the llvm-commits mailing list