Index: llvm/lib/Transforms/Utils/BasicBlockUtils.cpp =================================================================== --- llvm/lib/Transforms/Utils/BasicBlockUtils.cpp +++ llvm/lib/Transforms/Utils/BasicBlockUtils.cpp @@ -501,8 +501,8 @@ unsigned Depth = 0; while (BB && Depth++ < MaxDeoptOrUnreachableSuccessorCheckDepth && VisitedBlocks.insert(BB).second) { - if (BB->getTerminatingDeoptimizeCall() || - isa(BB->getTerminator())) + if (isa(BB->getTerminator() || + BB->getTerminatingDeoptimizeCall())) return true; BB = BB->getUniqueSuccessor(); }