summaryrefslogtreecommitdiff
path: root/lib/Transforms/Scalar/GVN.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-12-10 00:11:45 +0000
committerChris Lattner <sabre@nondot.org>2009-12-10 00:11:45 +0000
commit16f244e9822ffca7818d202df90cd2049f5b6cf6 (patch)
tree0866d5997770bb343ac5b959393840b1cdaa7e3b /lib/Transforms/Scalar/GVN.cpp
parent3728e96a6c0f68f4f5b656c2372e9cbbe6e74d86 (diff)
downloadllvm-16f244e9822ffca7818d202df90cd2049f5b6cf6.tar.gz
llvm-16f244e9822ffca7818d202df90cd2049f5b6cf6.tar.bz2
llvm-16f244e9822ffca7818d202df90cd2049f5b6cf6.tar.xz
Fix PR5744, a case where we were getting the pointer size instead of the
value size. This only manifested when memdep inprecisely returns clobber, which is do to a caching issue in the PR5744 testcase. We can 'efficiently emulate' this by using '-no-aa' git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91004 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/GVN.cpp')
-rw-r--r--lib/Transforms/Scalar/GVN.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/GVN.cpp b/lib/Transforms/Scalar/GVN.cpp
index e4e3488a60..dcc9dd4f49 100644
--- a/lib/Transforms/Scalar/GVN.cpp
+++ b/lib/Transforms/Scalar/GVN.cpp
@@ -1084,7 +1084,7 @@ static int AnalyzeLoadFromClobberingStore(const Type *LoadTy, Value *LoadPtr,
return -1;
Value *StorePtr = DepSI->getPointerOperand();
- uint64_t StoreSize = TD.getTypeSizeInBits(StorePtr->getType());
+ uint64_t StoreSize = TD.getTypeSizeInBits(DepSI->getOperand(0)->getType());
return AnalyzeLoadFromClobberingWrite(LoadTy, LoadPtr,
StorePtr, StoreSize, TD);
}