aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/InstructionSimplify.cpp
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2016-08-03 20:01:01 +0000
committerReid Kleckner <rnk@google.com>2016-08-03 20:01:01 +0000
commita6be60871f3ea2ff7778d8289a0bb867fcceac76 (patch)
tree85350165e717c9089bc78de43f57ba37f797d1f1 /llvm/lib/Analysis/InstructionSimplify.cpp
parentf7672854f0910d032dd791ba063694b61ae3eaf2 (diff)
downloadllvm-a6be60871f3ea2ff7778d8289a0bb867fcceac76.zip
llvm-a6be60871f3ea2ff7778d8289a0bb867fcceac76.tar.gz
llvm-a6be60871f3ea2ff7778d8289a0bb867fcceac76.tar.bz2
Revert "[CloneFunction] Don't remove side effecting calls"
This reverts commit r277611 and the followup r277614. Bootstrap builds and chromium builds are crashing during inlining after this change. llvm-svn: 277642
Diffstat (limited to 'llvm/lib/Analysis/InstructionSimplify.cpp')
-rw-r--r--llvm/lib/Analysis/InstructionSimplify.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Analysis/InstructionSimplify.cpp b/llvm/lib/Analysis/InstructionSimplify.cpp
index ac03fdc..5b723e5 100644
--- a/llvm/lib/Analysis/InstructionSimplify.cpp
+++ b/llvm/lib/Analysis/InstructionSimplify.cpp
@@ -4356,8 +4356,7 @@ static bool replaceAndRecursivelySimplifyImpl(Instruction *I, Value *SimpleV,
// Gracefully handle edge cases where the instruction is not wired into any
// parent block.
- if (I->getParent() && !I->isEHPad() && !isa<TerminatorInst>(I) &&
- !I->mayHaveSideEffects())
+ if (I->getParent())
I->eraseFromParent();
} else {
Worklist.insert(I);
@@ -4385,8 +4384,7 @@ static bool replaceAndRecursivelySimplifyImpl(Instruction *I, Value *SimpleV,
// Gracefully handle edge cases where the instruction is not wired into any
// parent block.
- if (I->getParent() && !I->isEHPad() && !isa<TerminatorInst>(I) &&
- !I->mayHaveSideEffects())
+ if (I->getParent())
I->eraseFromParent();
}
return Simplified;