diff options
author | Dan Gohman <gohman@apple.com> | 2010-04-02 03:04:37 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-04-02 03:04:37 +0000 |
commit | f860db2398b39ed4602b595b9b352fd3f9556107 (patch) | |
tree | c46f1b1e7a1c636246d07f7377a16114624145ec /lib/Target/TargetData.cpp | |
parent | db8771af286bc84267e7b5bd17eab51cd4ea552f (diff) | |
download | external_llvm-f860db2398b39ed4602b595b9b352fd3f9556107.tar.gz external_llvm-f860db2398b39ed4602b595b9b352fd3f9556107.tar.bz2 external_llvm-f860db2398b39ed4602b595b9b352fd3f9556107.zip |
Revert the recent alignment changes. They're broken for -Os because,
in particular, they end up aligning strings at 16-byte boundaries, and
there's no way for GlobalOpt to check OptForSize.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100172 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/TargetData.cpp')
-rw-r--r-- | lib/Target/TargetData.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/TargetData.cpp b/lib/Target/TargetData.cpp index 652fc184bf..643b397746 100644 --- a/lib/Target/TargetData.cpp +++ b/lib/Target/TargetData.cpp @@ -651,7 +651,7 @@ unsigned TargetData::getPreferredAlignment(const GlobalVariable *GV) const { if (Alignment < 16) { // If the global is not external, see if it is large. If so, give it a // larger alignment. - if (getTypeSizeInBits(ElemType) >= 128) + if (getTypeSizeInBits(ElemType) > 128) Alignment = 16; // 16-byte alignment. } } |