diff --git a/llvm/lib/Analysis/MemorySSAUpdater.cpp b/llvm/lib/Analysis/MemorySSAUpdater.cpp index 54184775e971..581fdf50d8b4 100644 --- a/llvm/lib/Analysis/MemorySSAUpdater.cpp +++ b/llvm/lib/Analysis/MemorySSAUpdater.cpp @@ -331,7 +331,7 @@ void MemorySSAUpdater::fixupDefs(const SmallVectorImpl &Vars) { auto DefIter = NewDef->getDefsIterator(); // The temporary Phi is being fixed, unmark it for not to optimize. - if (MemoryPhi *Phi = dyn_cast_or_null(NewDef)) + if (MemoryPhi *Phi = dyn_cast(NewDef)) NonOptPhis.erase(Phi); // If there is a local def after us, we only have to rename that. @@ -395,7 +395,7 @@ void MemorySSAUpdater::moveTo(MemoryUseOrDef *What, BasicBlock *BB, WhereType Where) { // Mark MemoryPhi users of What not to be optimized. for (auto *U : What->users()) - if (MemoryPhi *PhiUser = dyn_cast_or_null(U)) + if (MemoryPhi *PhiUser = dyn_cast(U)) NonOptPhis.insert(PhiUser); // Replace all our users with our defining access.