xref: /aosp_15_r20/external/llvm/test/CodeGen/X86/alignment.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc %s -o - -mtriple=x86_64-linux-gnu | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Worker; This cannot get rounded up to the preferred alignment (16) if they have an
4*9880d681SAndroid Build Coastguard Worker; explicit alignment specified.
5*9880d681SAndroid Build Coastguard Worker@GlobalA = global { [384 x i8] } zeroinitializer, align 8
6*9880d681SAndroid Build Coastguard Worker
7*9880d681SAndroid Build Coastguard Worker; CHECK:	.bss
8*9880d681SAndroid Build Coastguard Worker; CHECK:	.globl	GlobalA
9*9880d681SAndroid Build Coastguard Worker; CHECK:	.p2align	3
10*9880d681SAndroid Build Coastguard Worker; CHECK: GlobalA:
11*9880d681SAndroid Build Coastguard Worker; CHECK:	.zero	384
12*9880d681SAndroid Build Coastguard Worker
13*9880d681SAndroid Build Coastguard Worker; Common variables should not get rounded up to the preferred alignment (16) if
14*9880d681SAndroid Build Coastguard Worker; they have an explicit alignment specified.
15*9880d681SAndroid Build Coastguard Worker; PR6921
16*9880d681SAndroid Build Coastguard Worker@GlobalB = common global { [384 x i8] } zeroinitializer, align 8
17*9880d681SAndroid Build Coastguard Worker
18*9880d681SAndroid Build Coastguard Worker; CHECK: 	.comm	GlobalB,384,8
19*9880d681SAndroid Build Coastguard Worker
20*9880d681SAndroid Build Coastguard Worker
21*9880d681SAndroid Build Coastguard Worker@GlobalC = common global { [384 x i8] } zeroinitializer, align 2
22*9880d681SAndroid Build Coastguard Worker
23*9880d681SAndroid Build Coastguard Worker; CHECK: 	.comm	GlobalC,384,2
24*9880d681SAndroid Build Coastguard Worker
25*9880d681SAndroid Build Coastguard Worker
26*9880d681SAndroid Build Coastguard Worker
27*9880d681SAndroid Build Coastguard Worker; This cannot get rounded up to the preferred alignment (16) if they have an
28*9880d681SAndroid Build Coastguard Worker; explicit alignment specified *and* a section specified.
29*9880d681SAndroid Build Coastguard Worker@GlobalAS = global { [384 x i8] } zeroinitializer, align 8, section "foo"
30*9880d681SAndroid Build Coastguard Worker
31*9880d681SAndroid Build Coastguard Worker; CHECK:	.globl	GlobalAS
32*9880d681SAndroid Build Coastguard Worker; CHECK:	.p2align	3
33*9880d681SAndroid Build Coastguard Worker; CHECK: GlobalAS:
34*9880d681SAndroid Build Coastguard Worker; CHECK:	.zero	384
35*9880d681SAndroid Build Coastguard Worker
36*9880d681SAndroid Build Coastguard Worker; Common variables should not get rounded up to the preferred alignment (16) if
37*9880d681SAndroid Build Coastguard Worker; they have an explicit alignment specified and a section specified.
38*9880d681SAndroid Build Coastguard Worker; PR6921
39*9880d681SAndroid Build Coastguard Worker@GlobalBS = common global { [384 x i8] } zeroinitializer, align 8, section "foo"
40*9880d681SAndroid Build Coastguard Worker; CHECK: 	.comm	GlobalBS,384,8
41*9880d681SAndroid Build Coastguard Worker
42*9880d681SAndroid Build Coastguard Worker@GlobalCS = common global { [384 x i8] } zeroinitializer, align 2, section "foo"
43*9880d681SAndroid Build Coastguard Worker; CHECK: 	.comm	GlobalCS,384,2
44