1 ; RUN: llc -data-sections=1 -mtriple x86_64-pc-linux-gnu < %s | FileCheck %s
2 ; RUN: llc -data-sections=0 -mtriple x86_64-pc-linux-gnu < %s | FileCheck %s
5 @b = global i32 2, !associated !0
7 ; CHECK-DAG: .section .data.b,"awo",@progbits,a
9 ; Loop is OK. Also, normally -data-sections=0 would place @c and @d in the same section. !associated prevents that.
10 @c = global i32 2, !associated !2
11 @d = global i32 2, !associated !1
14 ; CHECK-DAG: .section .data.c,"awo",@progbits,d
15 ; CHECK-DAG: .section .data.d,"awo",@progbits,c
19 @f = global i32 0, !associated !3
20 @g = global i32 1, !associated !3
22 ; CHECK-DAG: .section .bss.f,"awo",@nobits,e
23 ; CHECK-DAG: .section .data.g,"awo",@progbits,e
26 @h = global i32 1, section "aaa"
27 @i = global i32 1, section "bbb", !associated !4
28 @j = global i32 1, section "bbb", !associated !4
29 @k = global i32 1, !associated !4
31 ; CHECK-DAG: .section aaa,"aw",@progbits
32 ; CHECK-DAG: .section bbb,"awo",@progbits,h,unique,1
33 ; CHECK-DAG: .section bbb,"awo",@progbits,h,unique,2
34 ; CHECK-DAG: .section .data.k,"awo",@progbits,h
36 ; Non-GlobalValue metadata.
37 @l = global i32 1, section "ccc", !associated !5
39 ; CHECK-DAG: .section ccc,"aw",@progbits
42 @m = global i32 1, section "ddd", !associated !6
44 ; CHECK-DAG: .section ddd,"aw",@progbits
47 @n = alias i32, i32* inttoptr (i64 add (i64 ptrtoint (i32* @a to i64), i64 1297036692682702848) to i32*)
48 @o = global i32 1, section "eee", !associated !7
50 ; CHECK-DAG: .section eee,"awo",@progbits,n,unique,3