aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/Scalar/ObjCARC.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/ObjCARC.cpp b/lib/Transforms/Scalar/ObjCARC.cpp
index 80c1dd166e..56e6c4c957 100644
--- a/lib/Transforms/Scalar/ObjCARC.cpp
+++ b/lib/Transforms/Scalar/ObjCARC.cpp
@@ -4073,7 +4073,7 @@ bool ObjCARCContract::runOnFunction(Function &F) {
if (!UserInst)
continue;
// FIXME: dominates should return true for unreachable UserInst.
- if (!DT->isReachableFromEntry(UserInst->getParent()) ||
+ if (DT->isReachableFromEntry(UserInst->getParent()) &&
DT->dominates(Inst, UserInst)) {
Changed = true;
Instruction *Replacement = Inst;