summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-04-28 06:08:13 +0000
committerChris Lattner <sabre@nondot.org>2007-04-28 06:08:13 +0000
commitd102ed0ac69682c74d57510c2d14829dbfb3b7a7 (patch)
treeeb8dc9e4ce5d63dadaf0a7cb5d25d2532231eadf /llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
parent7141c393b6c0acea551971ba372b4c66c954cfe1 (diff)
downloadbcm5719-llvm-d102ed0ac69682c74d57510c2d14829dbfb3b7a7.tar.gz
bcm5719-llvm-d102ed0ac69682c74d57510c2d14829dbfb3b7a7.zip
Fix CodeGen/Generic/2007-04-27-LargeMemObject.ll and
CodeGen/Generic/2007-04-27-InlineAsm-X-Dest.ll llvm-svn: 36534
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index 4e57a7b36aa..829dae50d1f 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -3210,16 +3210,22 @@ void SelectionDAGLowering::visitInlineAsm(CallInst &I) {
switch (Constraints[i].Type) {
case InlineAsm::isOutput:
if (!Constraints[i].isIndirect) {
+ // The return value of the call is this value.
assert(I.getType() != Type::VoidTy && "Bad inline asm!");
OpVT = TLI.getValueType(I.getType());
} else {
const Type *OpTy = I.getOperand(OpNum)->getType();
- OpVT = TLI.getValueType(cast<PointerType>(OpTy)->getElementType());
+ OpVT = TLI.getValueType(cast<PointerType>(OpTy)->getElementType(),true);
OpNum++; // Consumes a call operand.
}
break;
case InlineAsm::isInput:
- OpVT = TLI.getValueType(I.getOperand(OpNum)->getType());
+ if (!Constraints[i].isIndirect) {
+ OpVT = TLI.getValueType(I.getOperand(OpNum)->getType());
+ } else {
+ const Type *OpTy = I.getOperand(OpNum)->getType();
+ OpVT = TLI.getValueType(cast<PointerType>(OpTy)->getElementType(),true);
+ }
OpNum++; // Consumes a call operand.
break;
case InlineAsm::isClobber:
@@ -3275,8 +3281,8 @@ void SelectionDAGLowering::visitInlineAsm(CallInst &I) {
if (ConstraintCode.size() == 1) // not a physreg name.
CTy = TLI.getConstraintType(ConstraintCode);
- if (CTy == TargetLowering::C_Memory) {
- // Memory output.
+ if (CTy != TargetLowering::C_RegisterClass) {
+ // Memory output, or 'other' output (e.g. 'X' constraint).
SDOperand InOperandVal = getValue(I.getOperand(OpNum));
// Check that the operand (the address to store to) isn't a float.
OpenPOWER on IntegriCloud