Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / ELF / amdgpu-globals.s
blob603006604522a27ff7c7ed9a81a00b9dc6e9a98b
1 # REQUIRES: amdgpu
2 # RUN: llvm-mc -filetype=obj -triple amdgcn--amdhsa -mcpu=kaveri %s -o %t.o
3 # RUN: ld.lld -shared %t.o -o %t
4 # RUN: llvm-readobj --sections --symbols -l %t | FileCheck %s
6 .type glob0, @object
7 .data
8 .globl glob0
9 glob0:
10 .long 1
11 .size glob0, 4
13 .type glob1, @object
14 .section .rodata, #alloc
15 .globl glob1
16 glob1:
17 .long 2
18 .size glob1, 4
20 # CHECK: Section {
21 # CHECK: Name: .rodata
22 # CHECK: Type: SHT_PROGBITS
23 # CHECK: Flags [ (0x2)
24 # CHECK: SHF_ALLOC (0x2)
25 # CHECK: ]
26 # CHECK: Address: [[RODATA_ADDR:[0-9xa-f]+]]
27 # CHECK: }
29 # CHECK: Section {
30 # CHECK: Name: .data
31 # CHECK: Type: SHT_PROGBITS
32 # CHECK: Flags [ (0x3)
33 # CHECK: SHF_ALLOC (0x2)
34 # CHECK: SHF_WRITE (0x1)
35 # CHECK: ]
36 # CHECK: Address: [[DATA_ADDR:[0-9xa-f]+]]
37 # CHECK: }
39 # CHECK: ProgramHeader {
40 # CHECK: Type: PT_LOAD
41 # CHECK: ProgramHeader {
42 # CHECK: Type: PT_LOAD
44 # CHECK: Symbol {
45 # CHECK: Name: glob0
46 # CHECK: Value: [[DATA_ADDR]]
47 # CHECK: Size: 4
48 # CHECK: Type: Object
49 # CHECK: Section: .data
50 # CHECK: }
52 # CHECK: Symbol {
53 # CHECK: Name: glob1
54 # CHECK: Value: [[RODATA_ADDR]]
55 # CHECK: Size: 4
56 # CHECK: Type: Object
57 # CHECK: Section: .rodata
58 # CHECK: }