source: icGREP/icgrep-devel/llvm-3.8.0.src/test/CodeGen/AMDGPU/hsa-globals.ll @ 5027

Last change on this file since 5027 was 5027, checked in by cameron, 3 years ago

Upgrade to llvm 3.8

File size: 3.7 KB
Line 
1; RUN: llc < %s -mtriple=amdgcn--amdhsa -mcpu=kaveri | FileCheck --check-prefix=ASM %s
2; RUN: llc < %s -mtriple=amdgcn--amdhsa -mcpu=kaveri | llvm-mc -filetype=obj -triple amdgcn--amdhsa -mcpu=kaveri | llvm-readobj -symbols -s | FileCheck %s --check-prefix=ELF
3
4@internal_global_program = internal addrspace(1) global i32 0
5@common_global_program = common addrspace(1) global i32 0
6@external_global_program = addrspace(1) global i32 0
7
8@internal_global_agent = internal addrspace(1) global i32 0, section ".hsadata_global_agent"
9@common_global_agent = common addrspace(1) global i32 0, section ".hsadata_global_agent"
10@external_global_agent = addrspace(1) global i32 0, section ".hsadata_global_agent"
11
12@internal_readonly = internal unnamed_addr addrspace(2) constant i32 0
13@external_readonly = unnamed_addr addrspace(2) constant i32 0
14
15define void @test() {
16  ret void
17}
18
19; ASM: .amdgpu_hsa_module_global internal_global
20; ASM: .size internal_global_program, 4
21; ASM: .hsadata_global_program
22; ASM: internal_global_program:
23; ASM: .long 0
24
25; ASM: .amdgpu_hsa_module_global common_global
26; ASM: .size common_global_program, 4
27; ASM: .hsadata_global_program
28; ASM: common_global_program:
29; ASM: .long 0
30
31; ASM: .amdgpu_hsa_program_global external_global
32; ASM: .size external_global_program, 4
33; ASM: .hsadata_global_program
34; ASM: external_global_program:
35; ASM: .long 0
36
37; ASM: .amdgpu_hsa_module_global internal_global
38; ASM: .size internal_global_agent, 4
39; ASM: .hsadata_global_agent
40; ASM: internal_global_agent:
41; ASM: .long 0
42
43; ASM: .amdgpu_hsa_module_global common_global
44; ASM: .size common_global_agent, 4
45; ASM: .hsadata_global_agent
46; ASM: common_global_agent:
47; ASM: .long 0
48
49; ASM: .amdgpu_hsa_program_global external_global
50; ASM: .size external_global_agent, 4
51; ASM: .hsadata_global_agent
52; ASM: external_global_agent:
53; ASM: .long 0
54
55; ASM: .amdgpu_hsa_module_global internal_readonly
56; ASM: .size internal_readonly, 4
57; ASM: .hsatext
58; ASM: internal_readonly:
59; ASM: .long 0
60
61; ASM: .amdgpu_hsa_program_global external_readonly
62; ASM: .size external_readonly, 4
63; ASM: .hsatext
64; ASM: external_readonly:
65; ASM: .long 0
66
67; ELF: Section {
68; ELF: Name: .hsadata_global_program
69; ELF: Type: SHT_PROGBITS (0x1)
70; ELF: Flags [ (0x100003)
71; ELF: SHF_ALLOC (0x2)
72; ELF: SHF_AMDGPU_HSA_GLOBAL (0x100000)
73; ELF: SHF_WRITE (0x1)
74; ELF: ]
75; ELF: }
76
77; ELF: Section {
78; ELF: Name: .hsadata_global_agent
79; ELF: Type: SHT_PROGBITS (0x1)
80; ELF: Flags [ (0x900003)
81; ELF: SHF_ALLOC (0x2)
82; ELF: SHF_AMDGPU_HSA_AGENT (0x800000)
83; ELF: SHF_AMDGPU_HSA_GLOBAL (0x100000)
84; ELF: SHF_WRITE (0x1)
85; ELF: ]
86; ELF: }
87
88; ELF: Symbol {
89; ELF: Name: common_global_agent
90; ELF: Size: 4
91; ELF: Binding: Local
92; ELF: Section: .hsadata_global_agent
93; ELF: }
94
95; ELF: Symbol {
96; ELF: Name: common_global_program
97; ELF: Size: 4
98; ELF: Binding: Local
99; ELF: Section: .hsadata_global_program
100; ELF: }
101
102; ELF: Symbol {
103; ELF: Name: internal_global_agent
104; ELF: Size: 4
105; ELF: Binding: Local
106; ELF: Type: Object
107; ELF: Section: .hsadata_global_agent
108; ELF: }
109
110; ELF: Symbol {
111; ELF: Name: internal_global_program
112; ELF: Size: 4
113; ELF: Binding: Local
114; ELF: Type: Object
115; ELF: Section: .hsadata_global_program
116; ELF: }
117
118; ELF: Symbol {
119; ELF: Name: internal_readonly
120; ELF: Size: 4
121; ELF: Binding: Local
122; ELF: Type: Object
123; ELF: Section: .hsatext
124; ELF: }
125
126; ELF: Symbol {
127; ELF: Name: external_global_agent
128; ELF: Size: 4
129; ELF: Binding: Global
130; ELF: Type: Object
131; ELF: Section: .hsadata_global_agent
132; ELF: }
133
134; ELF: Symbol {
135; ELF: Name: external_global_program
136; ELF: Size: 4
137; ELF: Binding: Global
138; ELF: Type: Object
139; ELF: Section: .hsadata_global_program
140; ELF: }
141
142; ELF: Symbol {
143; ELF: Name: external_readonly
144; ELF: Size: 4
145; ELF: Binding: Global
146; ELF: Type: Object
147; ELF: Section: .hsatext
148; ELF: }
Note: See TracBrowser for help on using the repository browser.