diff options
author | Tim Northover <tnorthover@apple.com> | 2014-10-14 22:12:17 +0000 |
---|---|---|
committer | Tim Northover <tnorthover@apple.com> | 2014-10-14 22:12:17 +0000 |
commit | cf6ce0c8f750e8d62831f8058a9ee44f57a972cd (patch) | |
tree | dd0a00b39030d73c54ca5f1c7d102e2b6bd2fdbd /llvm/test/CodeGen/ARM/preferred-align.ll | |
parent | 9a4c043d675380904c76caa461741cc450c9831c (diff) | |
download | bcm5719-llvm-cf6ce0c8f750e8d62831f8058a9ee44f57a972cd.tar.gz bcm5719-llvm-cf6ce0c8f750e8d62831f8058a9ee44f57a972cd.zip |
ARM: remove ARM/Thumb distinction for preferred alignment.
Thumb1 has legitimate reasons for preferring 32-bit alignment of types
i1/i8/i16, since the 16-bit encoding of "add rD, sp, #imm" requires #imm to be
a multiple of 4. However, this is a trade-off betweem code size and RAM usage;
the DataLayout string is not the best place to represent it even if desired.
So this patch removes the extra Thumb requirements, hopefully making ARM and
Thumb completely compatible in this respect.
llvm-svn: 219734
Diffstat (limited to 'llvm/test/CodeGen/ARM/preferred-align.ll')
-rw-r--r-- | llvm/test/CodeGen/ARM/preferred-align.ll | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/ARM/preferred-align.ll b/llvm/test/CodeGen/ARM/preferred-align.ll new file mode 100644 index 00000000000..8cd4ef61546 --- /dev/null +++ b/llvm/test/CodeGen/ARM/preferred-align.ll @@ -0,0 +1,21 @@ +; RUN: llc -mtriple=armv7-linux-gnueabi %s -o - | FileCheck %s + +@var_agg = global {i8, i8} zeroinitializer + +; CHECK: .globl var_agg +; CHECK-NEXT: .align 2 + +@var1 = global i1 zeroinitializer + +; CHECK: .globl var1 +; CHECK-NOT: .align + +@var8 = global i8 zeroinitializer + +; CHECK: .globl var8 +; CHECK-NOT: .align + +@var16 = global i16 zeroinitializer + +; CHECK: .globl var16 +; CHECK-NEXT: .align 1
\ No newline at end of file |