[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
Chris Lattner
sabre at nondot.org
Fri Apr 27 23:08:31 PDT 2007
Changes in directory llvm/lib/CodeGen/SelectionDAG:
SelectionDAGISel.cpp updated: 1.432 -> 1.433
---
Log message:
Fix CodeGen/Generic/2007-04-27-LargeMemObject.ll and
CodeGen/Generic/2007-04-27-InlineAsm-X-Dest.ll
---
Diffs of the changes: (+10 -4)
SelectionDAGISel.cpp | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.432 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.433
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.432 Fri Apr 27 23:05:59 2007
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Sat Apr 28 01:08:13 2007
@@ -3210,16 +3210,22 @@
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 @@
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.
More information about the llvm-commits
mailing list