diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-06-04 23:37:54 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-06-04 23:37:54 +0000 |
commit | fb4db316d835fa9774d608ac58336a24c7867192 (patch) | |
tree | dd84e845d53ad6928fbf8c01beef6adf3d22869a /lib | |
parent | 10a05bfff08deb739abe11d05e794440c3ab543f (diff) | |
download | external_llvm-fb4db316d835fa9774d608ac58336a24c7867192.zip external_llvm-fb4db316d835fa9774d608ac58336a24c7867192.tar.gz external_llvm-fb4db316d835fa9774d608ac58336a24c7867192.tar.bz2 |
Fix a memcpy lowering bug. Even though the memcpy alignment is smaller than the desired alignment, the frame destination alignment may still be larger than the desired alignment. Don't change its alignment to something smaller.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51970 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index a9b7381..8d0d344 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -2633,8 +2633,9 @@ bool MeetsMaxMemopRequirement(std::vector<MVT::ValueType> &MemOps, if (AllowUnalign) VT = MVT::iAny; } else { - // Give the stack frame object a larger alignment. - MFI->setObjectAlignment(FI, NewAlign); + // Give the stack frame object a larger alignment if needed. + if (MFI->getObjectAlignment(FI) < NewAlign) + MFI->setObjectAlignment(FI, NewAlign); Align = NewAlign; } } |