Home | History | Annotate | Download | only in AMDGPU
      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 
     15 define void @test() {
     16   ret void
     17 }
     18 
     19 ; ASM: .amdgpu_hsa_module_global internal_global
     20 ; ASM: .hsadata_global_program
     21 ; ASM: internal_global_program:
     22 ; ASM: .long 0
     23 
     24 ; ASM: .amdgpu_hsa_module_global common_global
     25 ; ASM: .hsadata_global_program
     26 ; ASM: common_global_program:
     27 ; ASM: .long 0
     28 
     29 ; ASM: .amdgpu_hsa_program_global external_global
     30 ; ASM: .hsadata_global_program
     31 ; ASM: external_global_program:
     32 ; ASM: .long 0
     33 
     34 ; ASM: .amdgpu_hsa_module_global internal_global
     35 ; ASM: .hsadata_global_agent
     36 ; ASM: internal_global_agent:
     37 ; ASM: .long 0
     38 
     39 ; ASM: .amdgpu_hsa_module_global common_global
     40 ; ASM: .hsadata_global_agent
     41 ; ASM: common_global_agent:
     42 ; ASM: .long 0
     43 
     44 ; ASM: .amdgpu_hsa_program_global external_global
     45 ; ASM: .hsadata_global_agent
     46 ; ASM: external_global_agent:
     47 ; ASM: .long 0
     48 
     49 ; ASM: .amdgpu_hsa_module_global internal_readonly
     50 ; ASM: .hsatext
     51 ; ASM: internal_readonly:
     52 ; ASM: .long 0
     53 
     54 ; ASM: .amdgpu_hsa_program_global external_readonly
     55 ; ASM: .hsatext
     56 ; ASM: external_readonly:
     57 ; ASM: .long 0
     58 
     59 ; ELF: Section {
     60 ; ELF: Name: .hsadata_global_program
     61 ; ELF: Type: SHT_PROGBITS (0x1)
     62 ; ELF: Flags [ (0x100003)
     63 ; ELF: SHF_ALLOC (0x2)
     64 ; ELF: SHF_AMDGPU_HSA_GLOBAL (0x100000)
     65 ; ELF: SHF_WRITE (0x1)
     66 ; ELF: ]
     67 ; ELF: }
     68 
     69 ; ELF: Section {
     70 ; ELF: Name: .hsadata_global_agent
     71 ; ELF: Type: SHT_PROGBITS (0x1)
     72 ; ELF: Flags [ (0x900003)
     73 ; ELF: SHF_ALLOC (0x2)
     74 ; ELF: SHF_AMDGPU_HSA_AGENT (0x800000)
     75 ; ELF: SHF_AMDGPU_HSA_GLOBAL (0x100000)
     76 ; ELF: SHF_WRITE (0x1)
     77 ; ELF: ]
     78 ; ELF: }
     79 
     80 ; ELF: Symbol {
     81 ; ELF: Name: common_global_agent
     82 ; ELF: Binding: Local
     83 ; ELF: Section: .hsadata_global_agent
     84 ; ELF: }
     85 
     86 ; ELF: Symbol {
     87 ; ELF: Name: common_global_program
     88 ; ELF: Binding: Local
     89 ; ELF: Section: .hsadata_global_program
     90 ; ELF: }
     91 
     92 ; ELF: Symbol {
     93 ; ELF: Name: internal_global_agent
     94 ; ELF: Binding: Local
     95 ; ELF: Type: Object
     96 ; ELF: Section: .hsadata_global_agent
     97 ; ELF: }
     98 
     99 ; ELF: Symbol {
    100 ; ELF: Name: internal_global_program
    101 ; ELF: Binding: Local
    102 ; ELF: Type: Object
    103 ; ELF: Section: .hsadata_global_program
    104 ; ELF: }
    105 
    106 ; ELF: Symbol {
    107 ; ELF: Name: internal_readonly
    108 ; ELF: Binding: Local
    109 ; ELF: Type: Object
    110 ; ELF: Section: .hsatext
    111 ; ELF: }
    112 
    113 ; ELF: Symbol {
    114 ; ELF: Name: external_global_agent
    115 ; ELF: Binding: Global
    116 ; ELF: Type: Object
    117 ; ELF: Section: .hsadata_global_agent
    118 ; ELF: }
    119 
    120 ; ELF: Symbol {
    121 ; ELF: Name: external_global_program
    122 ; ELF: Binding: Global
    123 ; ELF: Type: Object
    124 ; ELF: Section: .hsadata_global_program
    125 ; ELF: }
    126 
    127 ; ELF: Symbol {
    128 ; ELF: Name: external_readonly
    129 ; ELF: Binding: Global
    130 ; ELF: Type: Object
    131 ; ELF: Section: .hsatext
    132 ; ELF: }
    133