danielcdh added a comment. The bug is fixed: The assumption "From->isSuccessor(To)" is untrue before calling MBPI->getEdgeProbability(From, To). Add check to make sure From->To edge exists before checking edge probability. https://reviews.llvm.org/D24818