summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-05-15 01:33:58 +0000
committerChris Lattner <sabre@nondot.org>2007-05-15 01:33:58 +0000
commitc7596efdad5003af70eb4d4848dc79d4a9107190 (patch)
treef61ed59fb86690d9f06d7e5753f70201794e2b15 /llvm/lib
parenta7a37a107e5f753c971df99ae3dc5b8d7983f96c (diff)
downloadbcm5719-llvm-c7596efdad5003af70eb4d4848dc79d4a9107190.tar.gz
bcm5719-llvm-c7596efdad5003af70eb4d4848dc79d4a9107190.zip
Fix some subtle issues handling immediate values. This fixes
test/CodeGen/ARM/2007-05-14-InlineAsmCstCrash.ll llvm-svn: 37069
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index 075a9c4a464..19f10ebf2af 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -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;
}
OpenPOWER on IntegriCloud