From 65e115098821925055d6e78312862bf2513f8996 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Wed, 2 Oct 2019 13:09:04 +0000 Subject: [PATCH] MemorySSA tryOptimizePhi - assert that we've found a DefChainEnd. NFCI. Silences static analyzer null dereference warning. llvm-svn: 373466 --- llvm/lib/Analysis/MemorySSA.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/llvm/lib/Analysis/MemorySSA.cpp b/llvm/lib/Analysis/MemorySSA.cpp index cc3bca1c2318..cfb8b7e7dcb5 100644 --- a/llvm/lib/Analysis/MemorySSA.cpp +++ b/llvm/lib/Analysis/MemorySSA.cpp @@ -873,6 +873,7 @@ template class ClobberWalker { if (!DefChainEnd) for (auto *MA : def_chain(const_cast(Target))) DefChainEnd = MA; + assert(DefChainEnd && "Failed to find dominating phi/liveOnEntry"); // If any of the terminated paths don't dominate the phi we'll try to // optimize, we need to figure out what they are and quit.