diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 888d4605bd57..7e8b61465ad4 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -3789,10 +3789,8 @@ 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) { - if (isa(OpInfo.CallOperandVal)) - OpInfo.CallOperand = - DAG.getBasicBlock(FuncInfo.MBBMap[cast( - OpInfo.CallOperandVal)]); + if (BasicBlock *BB = dyn_cast(OpInfo.CallOperandVal)) + OpInfo.CallOperand = DAG.getBasicBlock(FuncInfo.MBBMap[BB]); else { OpInfo.CallOperand = getValue(OpInfo.CallOperandVal); const Type *OpTy = OpInfo.CallOperandVal->getType();