Skip to content

Commit 79ff204

Browse files
committed
[MemorySSA] Remove restrictive asserts.
The verification I added has overly restrictive asserts. Unreachable blocks can have any incoming value in practice, after an update due to a "replaceAllUses" call when the repalced entry is LiveOnEntry. llvm-svn: 369050
1 parent 9be6d7e commit 79ff204

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

llvm/lib/Analysis/MemorySSA.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1886,8 +1886,6 @@ void MemorySSA::verifyPrevDefInPhis(Function &F) const {
18861886
}
18871887
DTNode = DTNode->getIDom();
18881888
}
1889-
assert((DTNode || IncAcc == getLiveOnEntryDef()) &&
1890-
"Expected LoE inc");
18911889
} else if (auto *DefList = getBlockDefs(Pred)) {
18921890
// If Pred has unreachable predecessors, but has at least a Def, the
18931891
// incoming access can be the last Def in Pred, or it could have been
@@ -1897,8 +1895,7 @@ void MemorySSA::verifyPrevDefInPhis(Function &F) const {
18971895
"Incorrect incoming access into phi.");
18981896
} else {
18991897
// If Pred has unreachable predecessors and no Defs, incoming access
1900-
// should be LoE.
1901-
assert(IncAcc == getLiveOnEntryDef() && "Expected LoE inc");
1898+
// should be LoE; In practice, after an update, it may be any access.
19021899
}
19031900
}
19041901
}

0 commit comments

Comments
 (0)