diff --git a/llvm/lib/Analysis/MemorySSA.cpp b/llvm/lib/Analysis/MemorySSA.cpp index c9ad9ffab16e71..e728a5f998f437 100644 --- a/llvm/lib/Analysis/MemorySSA.cpp +++ b/llvm/lib/Analysis/MemorySSA.cpp @@ -1779,8 +1779,8 @@ MemoryUseOrDef *MemorySSA::createNewAccess(Instruction *I, bool Def, Use; if (Template) { - Def = dyn_cast_or_null(Template) != nullptr; - Use = dyn_cast_or_null(Template) != nullptr; + Def = isa(Template); + Use = isa(Template); #if !defined(NDEBUG) ModRefInfo ModRef = AAP->getModRefInfo(I, None); bool DefCheck, UseCheck; diff --git a/llvm/lib/Target/BPF/BPFAdjustOpt.cpp b/llvm/lib/Target/BPF/BPFAdjustOpt.cpp index 6afd2d77485ddd..928b591b22740f 100644 --- a/llvm/lib/Target/BPF/BPFAdjustOpt.cpp +++ b/llvm/lib/Target/BPF/BPFAdjustOpt.cpp @@ -221,7 +221,7 @@ bool BPFAdjustOptImpl::avoidSpeculation(Instruction &I) { } } - if (!dyn_cast(&I) && !dyn_cast(&I)) + if (!isa(&I) && !isa(&I)) return false; // For: