summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/GVN.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-02-24 08:48:04 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-02-24 08:48:04 +0000
commit693ea8921479261b313e49f232d7110da66da126 (patch)
treec67fba90032976b001b37fb624d26ed5d1c8e820 /llvm/lib/Transforms/Scalar/GVN.cpp
parent8bf8ac0775061ac395c81a559fde024b5b09e128 (diff)
downloadbcm5719-llvm-693ea8921479261b313e49f232d7110da66da126.tar.gz
bcm5719-llvm-693ea8921479261b313e49f232d7110da66da126.zip
Reapply r97010, the speculative revert failed.
llvm-svn: 97036
Diffstat (limited to 'llvm/lib/Transforms/Scalar/GVN.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/GVN.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/llvm/lib/Transforms/Scalar/GVN.cpp b/llvm/lib/Transforms/Scalar/GVN.cpp
index 164730c3ca0..eb6b901e929 100644
--- a/llvm/lib/Transforms/Scalar/GVN.cpp
+++ b/llvm/lib/Transforms/Scalar/GVN.cpp
@@ -1633,13 +1633,8 @@ bool GVN::processNonLocalLoad(LoadInst *LI,
LoadPtr = Address.PHITranslateWithInsertion(LoadBB, UnavailablePred,
*DT, NewInsts);
} else {
- Address.PHITranslateValue(LoadBB, UnavailablePred);
+ Address.PHITranslateValue(LoadBB, UnavailablePred, DT);
LoadPtr = Address.getAddr();
-
- // Make sure the value is live in the predecessor.
- if (Instruction *Inst = dyn_cast_or_null<Instruction>(LoadPtr))
- if (!DT->dominates(Inst->getParent(), UnavailablePred))
- LoadPtr = 0;
}
// If we couldn't find or insert a computation of this phi translated value,
OpenPOWER on IntegriCloud