brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · 33e9e43 Raw
46 lines · plain
1; RUN: llc -data-sections=1 -mtriple x86_64-pc-linux-gnu < %s | FileCheck %s2; RUN: llc -data-sections=0 -mtriple x86_64-pc-linux-gnu < %s | FileCheck %s3 4@a = global i32 15@b = global i32 2, !associated !06!0 = !{ptr @a}7; CHECK-DAG: .section .data.b,"awo",@progbits,a8 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 !211@d = global i32 2, !associated !112!1 = !{ptr @c}13!2 = !{ptr @d}14; CHECK-DAG: .section .data.c,"awo",@progbits,d15; CHECK-DAG: .section .data.d,"awo",@progbits,c16 17; BSS is OK.18@e = global i32 019@f = global i32 0, !associated !320@g = global i32 1, !associated !321!3 = !{ptr @e}22; CHECK-DAG: .section .bss.f,"awo",@nobits,e23; CHECK-DAG: .section .data.g,"awo",@progbits,e24 25; Explicit sections.26@h = global i32 1, section "aaa"27@i = global i32 1, section "bbb", !associated !428@j = global i32 1, section "bbb", !associated !429@k = global i32 1, !associated !430!4 = !{ptr @h}31; CHECK-DAG: .section	aaa,"aw",@progbits32; CHECK-DAG: .section	bbb,"awo",@progbits,h,unique,133; CHECK-DAG: .section	bbb,"awo",@progbits,h,unique,234; CHECK-DAG: .section	.data.k,"awo",@progbits,h35 36; Non-GlobalValue metadata.37@l = global i32 1, section "ccc", !associated !538!5 = !{ptr null}39; CHECK-DAG: .section	ccc,"awo",@progbits,0,unique,340 41; Aliases are OK.42@n = alias i32, ptr inttoptr (i64 add (i64 ptrtoint (ptr @a to i64), i64 1297036692682702848) to ptr)43@o = global i32 1, section "eee", !associated !744!7 = !{ptr @n}45; CHECK-DAG: .section	eee,"awo",@progbits,n,unique,446