From: Alina Sbirlea Date: Fri, 29 Mar 2019 22:55:59 +0000 (+0000) Subject: [MemorySSA] Temporary fix assert when reaching 0 limit. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c8d6e0496dc3bd44e15d640cd2c465cbfd1a6b08;p=platform%2Fupstream%2Fllvm.git [MemorySSA] Temporary fix assert when reaching 0 limit. llvm-svn: 357327 --- diff --git a/llvm/lib/Analysis/MemorySSA.cpp b/llvm/lib/Analysis/MemorySSA.cpp index 7a3f2db..a810031 100644 --- a/llvm/lib/Analysis/MemorySSA.cpp +++ b/llvm/lib/Analysis/MemorySSA.cpp @@ -543,8 +543,11 @@ template class ClobberWalker { walkToPhiOrClobber(DefPath &Desc, const MemoryAccess *StopAt = nullptr, const MemoryAccess *SkipStopAt = nullptr) const { assert(!isa(Desc.Last) && "Uses don't exist in my world"); - assert(UpwardWalkLimit && *UpwardWalkLimit > 0 && - "Need a positive walk limit"); + assert(UpwardWalkLimit && "Need a valid walk limit"); + // This will not do any alias() calls. It returns in the first iteration in + // the loop below. + if (*UpwardWalkLimit == 0) + (*UpwardWalkLimit)++; for (MemoryAccess *Current : def_chain(Desc.Last)) { Desc.Last = Current;