diff options
author | Chris Lattner <sabre@nondot.org> | 2010-04-25 05:30:43 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-04-25 05:30:43 +0000 |
commit | 044698b39a5360f6132cdbecf484f78ae76cb6e1 (patch) | |
tree | 3c3209dc9e867f234fa2d2a5d5ee8dd31ee423bd /test/CodeGen/X86/alignment.ll | |
parent | 73382423f2b1f4735941dcffff2f31d0c25876b4 (diff) | |
download | llvm-044698b39a5360f6132cdbecf484f78ae76cb6e1.tar.gz llvm-044698b39a5360f6132cdbecf484f78ae76cb6e1.tar.bz2 llvm-044698b39a5360f6132cdbecf484f78ae76cb6e1.tar.xz |
Fix PR6921: globals were not getting correctly rounded up to their
preferred alignment unless they were common or some other special
case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102300 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/alignment.ll')
-rw-r--r-- | test/CodeGen/X86/alignment.ll | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/CodeGen/X86/alignment.ll b/test/CodeGen/X86/alignment.ll new file mode 100644 index 0000000000..e4ac2a072c --- /dev/null +++ b/test/CodeGen/X86/alignment.ll @@ -0,0 +1,16 @@ +; RUN: llc %s -o - -mtriple=x86_64-linux-gnu | FileCheck %s + +; This can get rounded up to the preferred alignment (16). +; PR6921 +@GlobalA = global { [384 x i8] } zeroinitializer, align 8 + +; CHECK: .bss +; CHECK: .globl GlobalA +; CHECK: .align 16 +; CHECK: GlobalA: +; CHECK: .zero 384 + +; Common variables should also get rounded up to the preferred alignment (16). +@GlobalB = common global { [384 x i8] } zeroinitializer, align 8 + +; CHECK: .comm GlobalB,384,16
\ No newline at end of file |