Fix some subtle issues handling immediate values. This fixes
authorChris Lattner <sabre@nondot.org>
Tue, 15 May 2007 01:33:58 +0000 (01:33 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 15 May 2007 01:33:58 +0000 (01:33 +0000)
test/CodeGen/ARM/2007-05-14-InlineAsmCstCrash.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37069 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

index 075a9c4a464f795fda31e4950f190bef924ecdec..19f10ebf2aff62cff968ed4a1ec8f0db048a4b83 100644 (file)
@@ -3448,7 +3448,8 @@ void SelectionDAGLowering::visitInlineAsm(CallInst &I) {
 
         // Add information to the INLINEASM node to know about this output.
         unsigned ResOpType = 4/*MEM*/ | (1 << 3);
-        AsmNodeOperands.push_back(DAG.getConstant(ResOpType, MVT::i32));
+        AsmNodeOperands.push_back(DAG.getTargetConstant(ResOpType, 
+                                                        TLI.getPointerTy()));
         AsmNodeOperands.push_back(OpInfo.CallOperand);
         break;
       }
@@ -3540,7 +3541,8 @@ void SelectionDAGLowering::visitInlineAsm(CallInst &I) {
         
         // Add information to the INLINEASM node to know about this input.
         unsigned ResOpType = 3 /*IMM*/ | (1 << 3);
-        AsmNodeOperands.push_back(DAG.getConstant(ResOpType, MVT::i32));
+        AsmNodeOperands.push_back(DAG.getTargetConstant(ResOpType, 
+                                                        TLI.getPointerTy()));
         AsmNodeOperands.push_back(InOperandVal);
         break;
       } else if (OpInfo.ConstraintType == TargetLowering::C_Memory) {
@@ -3550,7 +3552,8 @@ void SelectionDAGLowering::visitInlineAsm(CallInst &I) {
                
         // Add information to the INLINEASM node to know about this input.
         unsigned ResOpType = 4/*MEM*/ | (1 << 3);
-        AsmNodeOperands.push_back(DAG.getConstant(ResOpType, MVT::i32));
+        AsmNodeOperands.push_back(DAG.getTargetConstant(ResOpType,
+                                                        TLI.getPointerTy()));
         AsmNodeOperands.push_back(InOperandVal);
         break;
       }