diff options
author | Dan Gohman <gohman@apple.com> | 2009-09-14 23:39:10 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-09-14 23:39:10 +0000 |
commit | 264d245851173bbace9281a2378a6cc51162b030 (patch) | |
tree | dabb1141b0c57693d16f4653eb6c7232320cb3bb /lib/Transforms/Scalar/MemCpyOptimizer.cpp | |
parent | 46262684285cd7baf74425610228ac8b4547dab1 (diff) | |
download | external_llvm-264d245851173bbace9281a2378a6cc51162b030.zip external_llvm-264d245851173bbace9281a2378a6cc51162b030.tar.gz external_llvm-264d245851173bbace9281a2378a6cc51162b030.tar.bz2 |
When extending a memset range past the front, set the alignment of the
memset region to the alignment of the new start address.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81810 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/MemCpyOptimizer.cpp')
-rw-r--r-- | lib/Transforms/Scalar/MemCpyOptimizer.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Transforms/Scalar/MemCpyOptimizer.cpp b/lib/Transforms/Scalar/MemCpyOptimizer.cpp index 389b3b7..b131384 100644 --- a/lib/Transforms/Scalar/MemCpyOptimizer.cpp +++ b/lib/Transforms/Scalar/MemCpyOptimizer.cpp @@ -273,6 +273,7 @@ void MemsetRanges::addStore(int64_t Start, StoreInst *SI) { if (Start < I->Start) { I->Start = Start; I->StartPtr = SI->getPointerOperand(); + I->Alignment = SI->getAlignment(); } // Now we know that Start <= I->End and Start >= I->Start (so the startpoint |