diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-02-24 06:55:22 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-02-24 06:55:22 +0000 |
commit | 8c0c99016b4348bf9cc294a0f2dd60a219d4506c (patch) | |
tree | 597aa1cfe7efd0ff4131ae5bcda3d45c47f1af5f /lib/Transforms | |
parent | e832693acbfc713bcaf44720efa8149e93a38027 (diff) |
Speculatively revert r97010, "Add an argument to PHITranslateValue to specify
the DominatorTree. ...", in hopes of restoring poor old PPC bootstrap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97027 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/Scalar/GVN.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/GVN.cpp b/lib/Transforms/Scalar/GVN.cpp index eb6b901e92..164730c3ca 100644 --- a/lib/Transforms/Scalar/GVN.cpp +++ b/lib/Transforms/Scalar/GVN.cpp @@ -1633,8 +1633,13 @@ bool GVN::processNonLocalLoad(LoadInst *LI, LoadPtr = Address.PHITranslateWithInsertion(LoadBB, UnavailablePred, *DT, NewInsts); } else { - Address.PHITranslateValue(LoadBB, UnavailablePred, DT); + Address.PHITranslateValue(LoadBB, UnavailablePred); 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, |