r274791 - [AArch64] Change the preferred alignment for char and short.
Chad Rosier via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 7 13:02:25 PDT 2016
Author: mcrosier
Date: Thu Jul 7 15:02:25 2016
New Revision: 274791
URL: http://llvm.org/viewvc/llvm-project?rev=274791&view=rev
Log:
[AArch64] Change the preferred alignment for char and short.
This reinstates commits r273280 and r273289.
Original Review: http://reviews.llvm.org/D21414.
Modified:
cfe/trunk/lib/Basic/Targets.cpp
cfe/trunk/test/CodeGen/aarch64-type-sizes.c
cfe/trunk/test/CodeGen/target-data.c
Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=274791&r1=274790&r2=274791&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Thu Jul 7 15:02:25 2016
@@ -5994,7 +5994,7 @@ class AArch64leTargetInfo : public AArch
if (getTriple().isOSBinFormatMachO())
resetDataLayout("e-m:o-i64:64-i128:128-n32:64-S128");
else
- resetDataLayout("e-m:e-i64:64-i128:128-n32:64-S128");
+ resetDataLayout("e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128");
}
public:
@@ -6012,7 +6012,7 @@ public:
class AArch64beTargetInfo : public AArch64TargetInfo {
void setDataLayout() override {
assert(!getTriple().isOSBinFormatMachO());
- resetDataLayout("E-m:e-i64:64-i128:128-n32:64-S128");
+ resetDataLayout("E-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128");
}
public:
Modified: cfe/trunk/test/CodeGen/aarch64-type-sizes.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/aarch64-type-sizes.c?rev=274791&r1=274790&r2=274791&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/aarch64-type-sizes.c (original)
+++ cfe/trunk/test/CodeGen/aarch64-type-sizes.c Thu Jul 7 15:02:25 2016
@@ -1,8 +1,7 @@
-// RUN: %clang_cc1 -triple aarch64_be-none-linux-gnu -emit-llvm -w -o - %s | FileCheck --check-prefix=CHECK --check-prefix=CHECK-BE %s
+// RUN: %clang_cc1 -triple aarch64_be-none-linux-gnu -emit-llvm -w -o - %s | FileCheck --check-prefix=CHECK %s
// char by definition has size 1
-// CHECK-LE: target datalayout = "e-m:e-i64:64-i128:128-n32:64-S128"
-// CHECK-BE: target datalayout = "E-m:e-i64:64-i128:128-n32:64-S128"
+// CHECK: target datalayout = "E-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
int check_short() {
return sizeof(short);
@@ -89,4 +88,3 @@ int foo() {
return sizeof(enum Small);
// CHECK: ret i32 4
}
-
Modified: cfe/trunk/test/CodeGen/target-data.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/target-data.c?rev=274791&r1=274790&r2=274791&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/target-data.c (original)
+++ cfe/trunk/test/CodeGen/target-data.c Thu Jul 7 15:02:25 2016
@@ -141,7 +141,7 @@
// RUN: %clang_cc1 -triple arm64-unknown -o - -emit-llvm %s | \
// RUN: FileCheck %s -check-prefix=AARCH64
-// AARCH64: target datalayout = "e-m:e-i64:64-i128:128-n32:64-S128"
+// AARCH64: target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
// RUN: %clang_cc1 -triple thumb-unknown-gnueabi -o - -emit-llvm %s | \
// RUN: FileCheck %s -check-prefix=THUMB
More information about the cfe-commits
mailing list