mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
Remove a dangling reference to a deleted instruction. Fixes PR13185!
llvm-svn: 159096
This commit is contained in:
parent
27cd6c8b19
commit
e4f20af5c4
@ -1478,6 +1478,7 @@ void Reassociate::EraseInst(Instruction *I) {
|
||||
SmallVector<Value*, 8> Ops(I->op_begin(), I->op_end());
|
||||
// Erase the dead instruction.
|
||||
ValueRankMap.erase(I);
|
||||
RedoInsts.remove(I);
|
||||
I->eraseFromParent();
|
||||
// Optimize its operands.
|
||||
SmallPtrSet<Instruction *, 8> Visited; // Detect self-referential nodes.
|
||||
|
@ -108,3 +108,14 @@ unreachable4:
|
||||
%z4 = add i32 %y4, %y4
|
||||
ret void
|
||||
}
|
||||
|
||||
; PR13185
|
||||
define void @pr13185(i16 %p) {
|
||||
entry:
|
||||
br label %for.cond
|
||||
|
||||
for.cond: ; preds = %for.cond, %entry
|
||||
%x.0 = phi i32 [ undef, %entry ], [ %conv, %for.cond ]
|
||||
%conv = zext i16 %p to i32
|
||||
br label %for.cond
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user