Skip to content

Commit

Permalink
MemorySSA tryOptimizePhi - assert that we've found a DefChainEnd. NFCI.
Browse files Browse the repository at this point in the history
Silences static analyzer null dereference warning.

llvm-svn: 373466
  • Loading branch information
RKSimon committed Oct 2, 2019
1 parent e2ded3d commit 65e1150
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions llvm/lib/Analysis/MemorySSA.cpp
Expand Up @@ -873,6 +873,7 @@ template <class AliasAnalysisType> class ClobberWalker {
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.
Expand Down

0 comments on commit 65e1150

Please sign in to comment.