1 ; RUN: llc -mtriple=amdgcn-amd-unknown -mcpu=gfx802 --amdhsa-code-object-version=2 < %s | FileCheck --check-prefix=OSABI-UNK %s
2 ; RUN: llc -mtriple=amdgcn-amd-unknown -mcpu=iceland --amdhsa-code-object-version=2 < %s | FileCheck --check-prefix=OSABI-UNK %s
3 ; RUN: llc -mtriple=amdgcn-amd-unknown -mcpu=gfx802 -filetype=obj --amdhsa-code-object-version=2 < %s | llvm-readelf --notes - | FileCheck --check-prefix=OSABI-UNK-ELF %s
4 ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx802 --amdhsa-code-object-version=2 < %s | FileCheck --check-prefix=OSABI-HSA %s
5 ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=iceland --amdhsa-code-object-version=2 < %s | FileCheck --check-prefix=OSABI-HSA %s
6 ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx802 -filetype=obj --amdhsa-code-object-version=2 < %s | llvm-readelf --notes - | FileCheck --check-prefix=OSABI-HSA-ELF %s
7 ; RUN: llc -mtriple=amdgcn-amd-amdpal -mcpu=gfx802 --amdhsa-code-object-version=2 < %s | FileCheck --check-prefix=OSABI-PAL %s
8 ; RUN: llc -mtriple=amdgcn-amd-amdpal -mcpu=iceland --amdhsa-code-object-version=2 < %s | FileCheck --check-prefix=OSABI-PAL %s
9 ; RUN: llc -mtriple=amdgcn-amd-amdpal -mcpu=gfx802 -filetype=obj --amdhsa-code-object-version=2 < %s | llvm-readelf --notes - | FileCheck --check-prefix=OSABI-PAL-ELF %s
10 ; RUN: llc -march=r600 < %s | FileCheck --check-prefix=R600 %s
12 ; OSABI-UNK-NOT: .hsa_code_object_version
13 ; OSABI-UNK-NOT: .hsa_code_object_isa
14 ; OSABI-UNK: .amd_amdgpu_isa "amdgcn-amd-unknown--gfx802"
15 ; OSABI-UNK-NOT: .amd_amdgpu_hsa_metadata
16 ; OSABI-UNK-NOT: .amd_amdgpu_pal_metadata
18 ; OSABI-UNK-ELF-NOT: Unknown note type
19 ; OSABI-UNK-ELF: NT_AMD_HSA_ISA_NAME (AMD HSA ISA Name)
20 ; OSABI-UNK-ELF: AMD HSA ISA Name:
21 ; OSABI-UNK-ELF: amdgcn-amd-unknown--gfx802
22 ; OSABI-UNK-ELF-NOT: Unknown note type
23 ; OSABI-UNK-ELF-NOT: NT_AMD_HSA_METADATA (AMD HSA Metadata)
24 ; OSABI-UNK-ELF-NOT: Unknown note type
25 ; OSABI-UNK-ELF-NOT: NT_AMD_PAL_METADATA (AMD PAL Metadata)
26 ; OSABI-UNK-ELF-NOT: Unknown note type
28 ; OSABI-HSA: .hsa_code_object_version
29 ; OSABI-HSA: .hsa_code_object_isa
30 ; OSABI-HSA: .amd_amdgpu_isa "amdgcn-amd-amdhsa--gfx802"
31 ; OSABI-HSA: .amd_amdgpu_hsa_metadata
32 ; OSABI-HSA-NOT: .amd_amdgpu_pal_metadata
34 ; OSABI-HSA-ELF: NT_AMD_HSA_CODE_OBJECT_VERSION (AMD HSA Code Object Version)
35 ; OSABI-HSA-ELF: NT_AMD_HSA_ISA_VERSION (AMD HSA ISA Version)
36 ; OSABI-HSA-ELF: NT_AMD_HSA_ISA_NAME (AMD HSA ISA Name)
37 ; OSABI-HSA-ELF: AMD HSA ISA Name:
38 ; OSABI-HSA-ELF: amdgcn-amd-amdhsa--gfx802
39 ; OSABI-HSA-ELF: NT_AMD_HSA_METADATA (AMD HSA Metadata)
40 ; OSABI-HSA-ELF: HSA Metadata:
42 ; OSABI-HSA-ELF: Version: [ 1, 0 ]
43 ; OSABI-HSA-ELF: Kernels:
44 ; OSABI-HSA-ELF: - Name: elf_notes
45 ; OSABI-HSA-ELF: SymbolName: 'elf_notes@kd'
46 ; OSABI-HSA-ELF: CodeProps:
47 ; OSABI-HSA-ELF: KernargSegmentSize: 0
48 ; OSABI-HSA-ELF: GroupSegmentFixedSize: 0
49 ; OSABI-HSA-ELF: PrivateSegmentFixedSize: 0
50 ; OSABI-HSA-ELF: KernargSegmentAlign: 4
51 ; OSABI-HSA-ELF: WavefrontSize: 64
52 ; OSABI-HSA-ELF: NumSGPRs: 96
54 ; OSABI-HSA-ELF-NOT: NT_AMD_PAL_METADATA (AMD PAL Metadata)
56 ; OSABI-PAL-NOT: .hsa_code_object_version
57 ; OSABI-PAL: .hsa_code_object_isa
58 ; OSABI-PAL: .amd_amdgpu_isa "amdgcn-amd-amdpal--gfx802"
59 ; OSABI-PAL-NOT: .amd_amdgpu_hsa_metadata
61 ; OSABI-PAL-ELF: NT_AMD_HSA_ISA_VERSION (AMD HSA ISA Version)
62 ; OSABI-PAL-ELF: NT_AMD_HSA_ISA_NAME (AMD HSA ISA Name)
63 ; OSABI-PAL-ELF: AMD HSA ISA Name:
64 ; OSABI-PAL-ELF: amdgcn-amd-amdpal--gfx802
65 ; OSABI-PAL-ELF-NOT: NT_AMD_HSA_METADATA (AMD HSA Metadata)
66 ; OSABI-PAL-ELF: NT_AMDGPU_METADATA (AMDGPU Metadata)
67 ; OSABI-PAL-ELF: AMDGPU Metadata:
68 ; OSABI-PAL-ELF: amdpal.pipelines:
69 ; OSABI-PAL-ELF: - .hardware_stages:
71 ; OSABI-PAL-ELF: .entry_point: elf_notes
72 ; OSABI-PAL-ELF: .scratch_memory_size: 0
73 ; OSABI-PAL-ELF: .sgpr_count: 96
74 ; OSABI-PAL-ELF: .vgpr_count: 1
75 ; OSABI-PAL-ELF: .registers:
76 ; OSABI-PAL-ELF: 11794: 11469504
77 ; OSABI-PAL-ELF: 11795: 128
78 ; OSABI-PAL: amdpal.pipelines:
79 ; OSABI-PAL: - .hardware_stages:
81 ; OSABI-PAL: .entry_point: elf_notes
82 ; OSABI-PAL: .scratch_memory_size: 0
83 ; OSABI-PAL: .sgpr_count: 0x60
84 ; OSABI-PAL: .vgpr_count: 0x1
85 ; OSABI-PAL: .registers:
86 ; OSABI-PAL: 0x2e12 (COMPUTE_PGM_RSRC1): 0xaf02c0
87 ; OSABI-PAL: 0x2e13 (COMPUTE_PGM_RSRC2): 0x80
89 ; R600-NOT: .hsa_code_object_version
90 ; R600-NOT: .hsa_code_object_isa
91 ; R600-NOT: .amd_amdgpu_isa
92 ; R600-NOT: .amd_amdgpu_hsa_metadata
93 ; R600-NOT: .amd_amdgpu_pal_metadata
95 define amdgpu_kernel void @elf_notes() {