mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-19 15:13:49 -04:00
[MemorySSA] Fix checkClobberSanity to skip Start only for Defs and Uses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340981 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -429,18 +429,23 @@ checkClobberSanity(const MemoryAccess *Start, MemoryAccess *ClobberAt,
|
||||
// We should never hit liveOnEntry, unless it's the clobber.
|
||||
assert(!MSSA.isLiveOnEntryDef(MA) && "Hit liveOnEntry before clobber?");
|
||||
|
||||
// If Start is a Def, skip self.
|
||||
if (MA == Start)
|
||||
continue;
|
||||
|
||||
if (const auto *MD = dyn_cast<MemoryDef>(MA)) {
|
||||
(void)MD;
|
||||
// If Start is a Def, skip self.
|
||||
if (MD == Start)
|
||||
continue;
|
||||
|
||||
assert(!instructionClobbersQuery(MD, MAP.second, Query.Inst, AA)
|
||||
.IsClobber &&
|
||||
"Found clobber before reaching ClobberAt!");
|
||||
continue;
|
||||
}
|
||||
|
||||
if (const auto *MU = dyn_cast<MemoryUse>(MA)) {
|
||||
assert (MU == Start &&
|
||||
"Can only find use in def chain if Start is a use");
|
||||
continue;
|
||||
}
|
||||
|
||||
assert(isa<MemoryPhi>(MA));
|
||||
Worklist.append(
|
||||
upward_defs_begin({const_cast<MemoryAccess *>(MA), MAP.second}),
|
||||
|
||||
Reference in New Issue
Block a user