brintos

brintos / llvm-project-archived public Read only

0
0
Text · 934 B · 18efc20 Raw
37 lines · plain
1; Test that global values with explicit sections are placed into unique sections.2 3; RUN: llc < %s | FileCheck %s4; RUN: llc -separate-named-sections < %s | FileCheck %s --check-prefix=SEPARATE5target triple="x86_64-unknown-unknown-elf"6 7define i32 @f() section "custom_text" {8    entry:9    ret i32 010}11 12define i32 @g() section "custom_text" {13    entry:14    ret i32 015}16 17; CHECK: .section custom_text,"ax",@progbits{{$}}18; CHECK: f:19; CHECK: g:20 21; SEPARATE: .section custom_text,"ax",@progbits,unique,1{{$}}22; SEPARATE: f:23; SEPARATE: .section custom_text,"ax",@progbits,unique,2{{$}}24; SEPARATE: g:25 26@i = global i32 0, section "custom_data", align 827@j = global i32 0, section "custom_data", align 828 29; CHECK: .section custom_data,"aw",@progbits{{$}}30; CHECK: i:31; CHECK: j:32 33; SEPARATE: .section custom_data,"aw",@progbits,unique,3{{$}}34; SEPARATE: i:35; SEPARATE: .section custom_data,"aw",@progbits,unique,4{{$}}36; SEPARATE: j:37