1 ; RUN: llc -mtriple=amdgcn-amd-unknown -mcpu=gfx802 < %s | FileCheck --check-prefix=OSABI-UNK %s
2 ; RUN: llc -mtriple=amdgcn-amd-unknown -mcpu=iceland < %s | FileCheck --check-prefix=OSABI-UNK %s
3 ; RUN: llc -mtriple=amdgcn-amd-unknown -mcpu=gfx802 -filetype=obj < %s | llvm-readelf --notes - | FileCheck --check-prefix=OSABI-UNK-ELF %s
4 ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx802 < %s| FileCheck --check-prefix=OSABI-HSA %s
5 ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=iceland < %s | FileCheck --check-prefix=OSABI-HSA %s
6 ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx802 -filetype=obj < %s | llvm-readelf --notes - | FileCheck --check-prefix=OSABI-HSA-ELF %s
7 ; RUN: llc -mtriple=amdgcn-amd-amdpal -mcpu=gfx802 < %s | FileCheck --check-prefix=OSABI-PAL %s
8 ; RUN: llc -mtriple=amdgcn-amd-amdpal -mcpu=iceland < %s | FileCheck --check-prefix=OSABI-PAL %s
9 ; RUN: llc -mtriple=amdgcn-amd-amdpal -mcpu=gfx802 -filetype=obj < %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: amdhsa.target: amdgcn-amd-amdhsa--gfx802
29 ; OSABI-HSA: amdhsa.version:
30 ; OSABI-HSA: .end_amdgpu_metadata
31 ; OSABI-HSA-NOT: .amd_amdgpu_pal_metadata
33 ; OSABI-HSA-ELF: NT_AMDGPU_METADATA (AMDGPU Metadata)
35 ; OSABI-HSA-ELF: amdhsa.kernels:
36 ; OSABI-HSA-ELF: - .args: []
37 ; OSABI-HSA-ELF: .group_segment_fixed_size: 0
38 ; OSABI-HSA-ELF: .kernarg_segment_align: 4
39 ; OSABI-HSA-ELF: .kernarg_segment_size: 0
40 ; OSABI-HSA-ELF: .max_flat_workgroup_size: 1024
41 ; OSABI-HSA-ELF: .name: elf_notes
42 ; OSABI-HSA-ELF: .private_segment_fixed_size: 0
43 ; OSABI-HSA-ELF: .sgpr_count: 96
44 ; OSABI-HSA-ELF: .sgpr_spill_count: 0
45 ; OSABI-HSA-ELF: .symbol: elf_notes.kd
46 ; OSABI-HSA-ELF: .vgpr_count: 0
47 ; OSABI-HSA-ELF: .vgpr_spill_count: 0
48 ; OSABI-HSA-ELF: .wavefront_size: 64
49 ; OSABI-HSA-ELF: amdhsa.target: amdgcn-amd-amdhsa--gfx802
50 ; OSABI-HSA-ELF: amdhsa.version:
54 ; OSABI-HSA-ELF-NOT: NT_AMD_PAL_METADATA (AMD PAL Metadata)
56 ; OSABI-PAL: .amd_amdgpu_isa "amdgcn-amd-amdpal--gfx802"
57 ; OSABI-PAL: .amdgpu_pal_metadata
58 ; OSABI-PAL-NOT: .amd_amdgpu_hsa_metadata
60 ; OSABI-PAL-ELF: NT_AMD_HSA_ISA_NAME (AMD HSA ISA Name)
61 ; OSABI-PAL-ELF: AMD HSA ISA Name:
62 ; OSABI-PAL-ELF: amdgcn-amd-amdpal--gfx802
63 ; OSABI-PAL-ELF-NOT: NT_AMD_HSA_METADATA (AMD HSA Metadata)
64 ; OSABI-PAL-ELF: NT_AMDGPU_METADATA (AMDGPU Metadata)
65 ; OSABI-PAL-ELF: AMDGPU Metadata:
66 ; OSABI-PAL-ELF: amdpal.pipelines:
67 ; OSABI-PAL-ELF: - .hardware_stages:
69 ; OSABI-PAL-ELF: .entry_point: elf_notes
70 ; OSABI-PAL-ELF: .scratch_memory_size: 0
71 ; OSABI-PAL-ELF: .sgpr_count: 96
72 ; OSABI-PAL-ELF: .vgpr_count: 1
73 ; OSABI-PAL-ELF: .registers:
74 ; OSABI-PAL-ELF: 11794: 11469504
75 ; OSABI-PAL-ELF: 11795: 128
77 ; R600-NOT: .hsa_code_object_version
78 ; R600-NOT: .hsa_code_object_isa
79 ; R600-NOT: .amd_amdgpu_isa
80 ; R600-NOT: .amd_amdgpu_hsa_metadata
81 ; R600-NOT: .amd_amdgpu_pal_metadata
83 define amdgpu_kernel void @elf_notes() {
87 !llvm.module.flags = !{!0}
88 !0 = !{i32 1, !"amdgpu_code_object_version", i32 400}