aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/Scalar/ADCE.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/ADCE.cpp b/lib/Transforms/Scalar/ADCE.cpp
index e1f228d6fa..22b4c347dc 100644
--- a/lib/Transforms/Scalar/ADCE.cpp
+++ b/lib/Transforms/Scalar/ADCE.cpp
@@ -233,8 +233,9 @@ bool ADCE::doADCE() {
markInstructionLive(I);
}
} else if (I->mayWriteToMemory() || isa<ReturnInst>(I) ||
- isa<UnwindInst>(I)) {
- // Unreachable instructions are not marked intrinsically live here.
+ isa<UnwindInst>(I) || isa<UnreachableInst>(I)) {
+ // FIXME: Unreachable instructions should not be marked intrinsically
+ // live here.
markInstructionLive(I);
} else if (isInstructionTriviallyDead(I)) {
// Remove the instruction from it's basic block...