diff options
author | Akira Hatanaka <ahatanaka@apple.com> | 2014-05-02 17:59:17 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanaka@apple.com> | 2014-05-02 17:59:17 +0000 |
commit | f76388dd7e387f3621c2e4de4816f7351ef36118 (patch) | |
tree | d38bef36d73b39fdaca12ce67bc237c500e07f19 /llvm/lib/Transforms/Scalar | |
parent | 25c4e67d69229601b90aac3c39ec2b1f74767305 (diff) | |
download | bcm5719-llvm-f76388dd7e387f3621c2e4de4816f7351ef36118.tar.gz bcm5719-llvm-f76388dd7e387f3621c2e4de4816f7351ef36118.zip |
[GVN] Pass the phi-translated address of a load instead of the untranslated
address to AnalyzeLoadFromClobberingLoad. This fixes a bug in load-PRE where
PRE is applied to a load that is not partially redundant.
<rdar://problem/16638765>.
llvm-svn: 207853
Diffstat (limited to 'llvm/lib/Transforms/Scalar')
-rw-r--r-- | llvm/lib/Transforms/Scalar/GVN.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/GVN.cpp b/llvm/lib/Transforms/Scalar/GVN.cpp index 06ee1f07f19..0a0d8678bdc 100644 --- a/llvm/lib/Transforms/Scalar/GVN.cpp +++ b/llvm/lib/Transforms/Scalar/GVN.cpp @@ -1421,8 +1421,7 @@ void GVN::AnalyzeLoadAvailability(LoadInst *LI, LoadDepVect &Deps, // If this is a clobber and L is the first instruction in its block, then // we have the first instruction in the entry block. if (DepLI != LI && Address && DL) { - int Offset = AnalyzeLoadFromClobberingLoad(LI->getType(), - LI->getPointerOperand(), + int Offset = AnalyzeLoadFromClobberingLoad(LI->getType(), Address, DepLI, *DL); if (Offset != -1) { |