mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-26 17:57:07 +00:00
Verify MemorySSA after all updates.
Verify after completing all updates. Resolves PR46275.
This commit is contained in:
parent
10bd67c1bd
commit
519b019a0a
@ -622,11 +622,11 @@ void llvm::deleteDeadLoop(Loop *L, DominatorTree *DT, ScalarEvolution *SE,
|
||||
if (MSSA) {
|
||||
MSSAU->applyUpdates({{DominatorTree::Delete, Preheader, L->getHeader()}},
|
||||
*DT);
|
||||
if (VerifyMemorySSA)
|
||||
MSSA->verifyMemorySSA();
|
||||
SmallSetVector<BasicBlock *, 8> DeadBlockSet(L->block_begin(),
|
||||
L->block_end());
|
||||
MSSAU->removeBlocks(DeadBlockSet);
|
||||
if (VerifyMemorySSA)
|
||||
MSSA->verifyMemorySSA();
|
||||
}
|
||||
}
|
||||
|
||||
|
23
llvm/test/Analysis/MemorySSA/pr46275.ll
Normal file
23
llvm/test/Analysis/MemorySSA/pr46275.ll
Normal file
@ -0,0 +1,23 @@
|
||||
; RUN: opt -S -memoryssa -loop-deletion -loop-simplifycfg -verify-memoryssa < %s | FileCheck %s
|
||||
; REQUIRES: asserts
|
||||
|
||||
; CHECK-LABEL: @foo()
|
||||
define void @foo() {
|
||||
entry:
|
||||
br i1 false, label %for.body.lr.ph, label %for.end
|
||||
|
||||
for.body.lr.ph: ; preds = %entry
|
||||
br label %for.body
|
||||
|
||||
for.body: ; preds = %for.body, %for.body.lr.ph
|
||||
call void @foo()
|
||||
call void @foo()
|
||||
br i1 false, label %for.body, label %for.cond.for.end_crit_edge
|
||||
|
||||
for.cond.for.end_crit_edge: ; preds = %for.body
|
||||
unreachable
|
||||
|
||||
for.end: ; preds = %entry
|
||||
ret void
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user