Chris Lattner | 567dd1f | 2010-04-26 18:46:46 +0000 | [diff] [blame] | 1 | ; RUN: llc %s -o - -mtriple=x86_64-linux-gnu | FileCheck %s |
| 2 | |
| 3 | ; This cannot get rounded up to the preferred alignment (16) if they have an |
| 4 | ; explicit alignment specified. |
| 5 | @GlobalA = global { [384 x i8] } zeroinitializer, align 8 |
| 6 | |
| 7 | ; CHECK: .bss |
| 8 | ; CHECK: .globl GlobalA |
Cameron Zwarich | 1335022 | 2011-04-13 20:36:04 +0000 | [diff] [blame] | 9 | ; CHECK: .align 8 |
Chris Lattner | 567dd1f | 2010-04-26 18:46:46 +0000 | [diff] [blame] | 10 | ; CHECK: GlobalA: |
| 11 | ; CHECK: .zero 384 |
| 12 | |
| 13 | ; Common variables should not get rounded up to the preferred alignment (16) if |
| 14 | ; they have an explicit alignment specified. |
| 15 | ; PR6921 |
| 16 | @GlobalB = common global { [384 x i8] } zeroinitializer, align 8 |
| 17 | |
Cameron Zwarich | 1335022 | 2011-04-13 20:36:04 +0000 | [diff] [blame] | 18 | ; CHECK: .comm GlobalB,384,8 |
Chris Lattner | e87f7bb | 2010-04-28 19:58:07 +0000 | [diff] [blame] | 19 | |
| 20 | |
| 21 | @GlobalC = common global { [384 x i8] } zeroinitializer, align 2 |
| 22 | |
Cameron Zwarich | 1335022 | 2011-04-13 20:36:04 +0000 | [diff] [blame] | 23 | ; CHECK: .comm GlobalC,384,2 |
Chris Lattner | e87f7bb | 2010-04-28 19:58:07 +0000 | [diff] [blame] | 24 | |
| 25 | |
| 26 | |
| 27 | ; This cannot get rounded up to the preferred alignment (16) if they have an |
| 28 | ; explicit alignment specified *and* a section specified. |
| 29 | @GlobalAS = global { [384 x i8] } zeroinitializer, align 8, section "foo" |
| 30 | |
| 31 | ; CHECK: .globl GlobalAS |
| 32 | ; CHECK: .align 8 |
| 33 | ; CHECK: GlobalAS: |
| 34 | ; CHECK: .zero 384 |
| 35 | |
| 36 | ; Common variables should not get rounded up to the preferred alignment (16) if |
| 37 | ; they have an explicit alignment specified and a section specified. |
| 38 | ; PR6921 |
| 39 | @GlobalBS = common global { [384 x i8] } zeroinitializer, align 8, section "foo" |
| 40 | ; CHECK: .comm GlobalBS,384,8 |
| 41 | |
| 42 | @GlobalCS = common global { [384 x i8] } zeroinitializer, align 2, section "foo" |
| 43 | ; CHECK: .comm GlobalCS,384,2 |