From: Simon Pilgrim Date: Wed, 2 Oct 2019 13:09:04 +0000 (+0000) Subject: MemorySSA tryOptimizePhi - assert that we've found a DefChainEnd. NFCI. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=180ce8cfdab359da2c0fac3d12672e3b06517554;p=llvm MemorySSA tryOptimizePhi - assert that we've found a DefChainEnd. NFCI. Silences static analyzer null dereference warning. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373466 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/MemorySSA.cpp b/lib/Analysis/MemorySSA.cpp index cc3bca1c231..cfb8b7e7dcb 100644 --- a/lib/Analysis/MemorySSA.cpp +++ b/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.