summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-12-18 00:51:32 +0000
committerChris Lattner <sabre@nondot.org>2008-12-18 00:51:32 +0000
commitb6372933b530affed1aa74bd96a95be34a858f04 (patch)
tree9f202191611f7f8f3e6912338795f60d3e6904e7 /llvm
parent7ecf7742623114555faa2078acd91bc165f4fe83 (diff)
downloadbcm5719-llvm-b6372933b530affed1aa74bd96a95be34a858f04.tar.gz
bcm5719-llvm-b6372933b530affed1aa74bd96a95be34a858f04.zip
reapply this hunk from Bill's reversion in r61169, it is conservative
and safe and orthogonal from turning off load pre. llvm-svn: 61177
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Transforms/Scalar/GVN.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/GVN.cpp b/llvm/lib/Transforms/Scalar/GVN.cpp
index 36624249238..6e532630c7b 100644
--- a/llvm/lib/Transforms/Scalar/GVN.cpp
+++ b/llvm/lib/Transforms/Scalar/GVN.cpp
@@ -956,6 +956,11 @@ bool GVN::processNonLocalLoad(LoadInst *LI,
// it will be too expensive.
if (Deps.size() > 100)
return false;
+
+ // If we had a phi translation failure, we'll have a single entry which is a
+ // clobber in the current block. Reject this early.
+ if (Deps.size() == 1 && Deps[0].second.isClobber())
+ return false;
// Filter out useless results (non-locals, etc). Keep track of the blocks
// where we have a value available in repl, also keep track of whether we see
OpenPOWER on IntegriCloud