diff options
author | Dale Johannesen <dalej@apple.com> | 2009-07-20 23:27:39 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2009-07-20 23:27:39 +0000 |
commit | 5339c551b508d8231672b417d9df1629e42af89b (patch) | |
tree | 962dccb3b3ad04cd5222fd96091a4c4a59fd9577 /lib/CodeGen/SelectionDAG/TargetLowering.cpp | |
parent | 0d5bae41fb86188d62dbc39de629ae0de71f93e0 (diff) |
Move stripping of bitcasts in inline asm arguments
to a place where it affects everything. Occurs
only on calls AFAIK.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76502 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/TargetLowering.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/TargetLowering.cpp | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/lib/CodeGen/SelectionDAG/TargetLowering.cpp index dc25041da6..1ee181fb69 100644 --- a/lib/CodeGen/SelectionDAG/TargetLowering.cpp +++ b/lib/CodeGen/SelectionDAG/TargetLowering.cpp @@ -2406,20 +2406,10 @@ void TargetLowering::ComputeConstraintToUse(AsmOperandInfo &OpInfo, // 'X' matches anything. if (OpInfo.ConstraintCode == "X" && OpInfo.CallOperandVal) { - // Look through bitcasts over functions. In the context of an asm - // argument we don't care about bitcasting function types; the parameters - // to the function, if any, will have been handled elsewhere. - Value *v = OpInfo.CallOperandVal; - ConstantExpr *CE = NULL; - while ((CE = dyn_cast<ConstantExpr>(v)) && - CE->getOpcode()==Instruction::BitCast) - v = CE->getOperand(0); - if (!isa<Function>(v)) - v = OpInfo.CallOperandVal; // Labels and constants are handled elsewhere ('X' is the only thing // that matches labels). For Functions, the type here is the type of - // the result, which is not what we want to look at; leave them alone - // (minus any bitcasts). + // the result, which is not what we want to look at; leave them alone. + Value *v = OpInfo.CallOperandVal; if (isa<BasicBlock>(v) || isa<ConstantInt>(v) || isa<Function>(v)) { OpInfo.CallOperandVal = v; return; |