diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/CodeGen/X86/alignment.ll | 16 | ||||
-rw-r--r-- | test/CodeGen/X86/unaligned-load.ll | 5 |
2 files changed, 19 insertions, 2 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 diff --git a/test/CodeGen/X86/unaligned-load.ll b/test/CodeGen/X86/unaligned-load.ll index e210531068..a99af0605b 100644 --- a/test/CodeGen/X86/unaligned-load.ll +++ b/test/CodeGen/X86/unaligned-load.ll @@ -28,8 +28,9 @@ return: declare void @llvm.memcpy.i64(i8* nocapture, i8* nocapture, i64, i32) nounwind -; CORE2: .align 3 +; CORE2: .section +; CORE2: .align 4 ; CORE2-NEXT: _.str1: ; CORE2-NEXT: .asciz "DHRYSTONE PROGRAM, SOME STRING" -; CORE2: .align 3 +; CORE2: .align 4 ; CORE2-NEXT: _.str3: |