[llvm] 535b209 - [SelectionDAGISel] Use getSignedConstant for OPC_EmitInteger.

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 16 11:36:08 PDT 2024


Author: Craig Topper
Date: 2024-08-16T11:35:57-07:00
New Revision: 535b209cb3b485a66083d7c4386c16c2df0000a8

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

LOG: [SelectionDAGISel] Use getSignedConstant for OPC_EmitInteger.

Added: 
    

Modified: 
    llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index 3e517a51862de3..46c24299d1ae97 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -3784,7 +3784,9 @@ void SelectionDAGISel::SelectCodeCommon(SDNode *NodeToMatch,
       if (Opcode >= OPC_EmitInteger && Opcode <= OPC_EmitInteger64)
         Val = decodeSignRotatedValue(Val);
       RecordedNodes.push_back(std::pair<SDValue, SDNode *>(
-          CurDAG->getTargetConstant(Val, SDLoc(NodeToMatch), VT), nullptr));
+          CurDAG->getSignedConstant(Val, SDLoc(NodeToMatch), VT,
+                                    /*isTarget=*/true),
+          nullptr));
       continue;
     }
     case OPC_EmitRegister:


        


More information about the llvm-commits mailing list