[llvm] r373466 - MemorySSA tryOptimizePhi - assert that we've found a DefChainEnd. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 2 06:09:04 PDT 2019
Author: rksimon
Date: Wed Oct 2 06:09:04 2019
New Revision: 373466
URL: http://llvm.org/viewvc/llvm-project?rev=373466&view=rev
Log:
MemorySSA tryOptimizePhi - assert that we've found a DefChainEnd. NFCI.
Silences static analyzer null dereference warning.
Modified:
llvm/trunk/lib/Analysis/MemorySSA.cpp
Modified: llvm/trunk/lib/Analysis/MemorySSA.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/MemorySSA.cpp?rev=373466&r1=373465&r2=373466&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/MemorySSA.cpp (original)
+++ llvm/trunk/lib/Analysis/MemorySSA.cpp Wed Oct 2 06:09:04 2019
@@ -873,6 +873,7 @@ template <class AliasAnalysisType> class
if (!DefChainEnd)
for (auto *MA : def_chain(const_cast<MemoryAccess *>(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.
More information about the llvm-commits
mailing list