aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Scalar/ObjCARC.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2012-04-05 20:27:21 +0000
committerDan Gohman <gohman@apple.com>2012-04-05 20:27:21 +0000
commit036ebfd87434bc30a0e51f4b9a3d55ab49ee5509 (patch)
treeaad70b9348ac41844d59c9a7a13e6d0d0025348c /lib/Transforms/Scalar/ObjCARC.cpp
parent703bf84d324718b6af0a8818b4515193b2a71020 (diff)
Fix accidentally inverted logic from r152803, and make the
testcase slightly less trivial. This fixes rdar://11171718. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154118 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/ObjCARC.cpp')
-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;