diff options
author | Chris Lattner <sabre@nondot.org> | 2007-02-16 23:11:51 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-02-16 23:11:51 +0000 |
commit | 3ebb2e00345df0065a7f5c624427e107139444ca (patch) | |
tree | c814c33315b3a729bfd07357a2195d4ace38edf5 /lib/Target/TargetData.cpp | |
parent | 6985dca2a0667ac024bc5784d52abfe3b37004ee (diff) |
Fix CodeGen/PowerPC/2007-02-16-AlignPacked.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34356 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/TargetData.cpp')
-rw-r--r-- | lib/Target/TargetData.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Target/TargetData.cpp b/lib/Target/TargetData.cpp index b53ac56237..9bab6f94ea 100644 --- a/lib/Target/TargetData.cpp +++ b/lib/Target/TargetData.cpp @@ -186,7 +186,7 @@ void TargetData::init(const std::string &TargetDescription) { setAlignment(FLOAT_ALIGN, 8, 8, 64); // double setAlignment(VECTOR_ALIGN, 8, 8, 64); // v2i32 setAlignment(VECTOR_ALIGN, 16, 16, 128); // v16i8, v8i16, v4i32, ... - setAlignment(AGGREGATE_ALIGN, 0, 0, 0); // struct, union, class, ... + setAlignment(AGGREGATE_ALIGN, 0, 8, 0); // struct, union, class, ... while (!temp.empty()) { std::string token = getToken(temp, "-"); @@ -458,7 +458,7 @@ unsigned char TargetData::getAlignment(const Type *Ty, bool abi_or_pref) const { case Type::StructTyID: { // Packed structure types always have an ABI alignment of one. - if (cast<StructType>(Ty)->isPacked()) + if (cast<StructType>(Ty)->isPacked() && abi_or_pref) return 1; // Get the layout annotation... which is lazily created on demand. |