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 | ade297d496e8daebf1dfea9c04a84977e75579e3 (patch) | |
tree | 6b046d8e5dd83ab0178aa391b109ea1b7af8816d /llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp | |
parent | 0d76d075e4a68fba52482be6a6c18ffc1abc7acb (diff) | |
download | bcm5719-llvm-ade297d496e8daebf1dfea9c04a84977e75579e3.tar.gz bcm5719-llvm-ade297d496e8daebf1dfea9c04a84977e75579e3.zip |
Move stripping of bitcasts in inline asm arguments
to a place where it affects everything. Occurs
only on calls AFAIK.
llvm-svn: 76502
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp index 05622f2d6c7..3fa6047ad54 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp @@ -5059,6 +5059,11 @@ void SelectionDAGLowering::visitInlineAsm(CallSite CS) { // If this is an input or an indirect output, process the call argument. // BasicBlocks are labels, currently appearing only in asm's. if (OpInfo.CallOperandVal) { + // Strip bitcasts, if any. This mostly comes up for functions. + ConstantExpr* CE = NULL; + while ((CE = dyn_cast<ConstantExpr>(OpInfo.CallOperandVal)) && + CE->getOpcode()==Instruction::BitCast) + OpInfo.CallOperandVal = CE->getOperand(0); if (BasicBlock *BB = dyn_cast<BasicBlock>(OpInfo.CallOperandVal)) { OpInfo.CallOperand = DAG.getBasicBlock(FuncInfo.MBBMap[BB]); } else { |