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 | dc64b9d379ecf64d8d989dc1d737d4f3c80146cc (patch) | |
| tree | 1d420d9a43872e871c4a5f57c7c960834fdf8124 /llvm/lib | |
| parent | e19f84cf2883e388823108584f86d7c09a785c1c (diff) | |
| download | bcm5719-llvm-dc64b9d379ecf64d8d989dc1d737d4f3c80146cc.tar.gz bcm5719-llvm-dc64b9d379ecf64d8d989dc1d737d4f3c80146cc.zip | |
Fix CodeGen/PowerPC/2007-02-16-AlignPacked.ll
llvm-svn: 34356
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/TargetData.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/TargetData.cpp b/llvm/lib/Target/TargetData.cpp index b53ac562379..9bab6f94ea3 100644 --- a/llvm/lib/Target/TargetData.cpp +++ b/llvm/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. |

