aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Scalar/Reassociate.cpp
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2012-06-24 01:44:08 +0000
committerNick Lewycky <nicholas@mxc.ca>2012-06-24 01:44:08 +0000
commit917f99354fa558e50d17191f593f81155b4ab2c3 (patch)
treefe4b559f299164c6da2d8358b418d934e83c91cf /lib/Transforms/Scalar/Reassociate.cpp
parent6e2db65266c238368f744bbc42b8f4239fd1e76e (diff)
Remove a dangling reference to a deleted instruction. Fixes PR13185!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159096 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/Reassociate.cpp')
-rw-r--r--lib/Transforms/Scalar/Reassociate.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Transforms/Scalar/Reassociate.cpp b/lib/Transforms/Scalar/Reassociate.cpp
index 2b0d406c15..b572f4eb07 100644
--- a/lib/Transforms/Scalar/Reassociate.cpp
+++ b/lib/Transforms/Scalar/Reassociate.cpp
@@ -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.