diff --git a/llvm/lib/Transforms/Utils/CloneFunction.cpp b/llvm/lib/Transforms/Utils/CloneFunction.cpp index e58585705e82f..9387797019023 100644 --- a/llvm/lib/Transforms/Utils/CloneFunction.cpp +++ b/llvm/lib/Transforms/Utils/CloneFunction.cpp @@ -928,7 +928,7 @@ void llvm::CloneAndPruneIntoFromInst(Function *NewFunc, const Function *OldFunc, } BasicBlock *Dest = BI->getSuccessor(0); - if (!Dest->getSinglePredecessor()) { + if (!Dest->getSinglePredecessor() || Dest->hasAddressTaken()) { ++I; continue; }