diff --git a/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp b/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp index 480de5483358..9efc7d1ac500 100644 --- a/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp +++ b/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp @@ -269,7 +269,7 @@ public: // FIXME: add other heuristics to detect long running loops. if (SkipRetExitBlock) { for (auto BB : ExitBlocks) - if (dyn_cast(BB->getTerminator()) != nullptr) + if (isa(BB->getTerminator())) return false; } diff --git a/llvm/lib/Transforms/Instrumentation/PGOMemOPSizeOpt.cpp b/llvm/lib/Transforms/Instrumentation/PGOMemOPSizeOpt.cpp index 7acbdb9f55b7..55a93b6152dc 100644 --- a/llvm/lib/Transforms/Instrumentation/PGOMemOPSizeOpt.cpp +++ b/llvm/lib/Transforms/Instrumentation/PGOMemOPSizeOpt.cpp @@ -254,7 +254,7 @@ public: LibFunc Func; if (TLI.getLibFunc(CI, Func) && (Func == LibFunc_memcmp || Func == LibFunc_bcmp) && - !dyn_cast(CI.getArgOperand(2))) { + !isa(CI.getArgOperand(2))) { WorkList.push_back(MemOp(&CI)); } }