1 ; Test that global values with explicit sections are placed into unique sections.
3 ; RUN: llc < %s | FileCheck %s
4 ; RUN: llc -separate-named-sections < %s | FileCheck %s --check-prefix=SEPARATE
5 target triple="x86_64-unknown-unknown-elf"
7 define i32 @f() section "custom_text" {
12 define i32 @g() section "custom_text" {
17 ; CHECK: .section custom_text,"ax",@progbits{{$}}
21 ; SEPARATE: .section custom_text,"ax",@progbits,unique,1{{$}}
23 ; SEPARATE: .section custom_text,"ax",@progbits,unique,2{{$}}
26 @i = global i32 0, section "custom_data", align 8
27 @j = global i32 0, section "custom_data", align 8
29 ; CHECK: .section custom_data,"aw",@progbits{{$}}
33 ; SEPARATE: .section custom_data,"aw",@progbits,unique,3{{$}}
35 ; SEPARATE: .section custom_data,"aw",@progbits,unique,4{{$}}