1; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1010 -asm-verbose=0 < %s | FileCheck -check-prefixes=GCN,GCN-ASM,GFX10END-ASM %s
2; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1010 -filetype=obj < %s | llvm-objdump --arch=amdgcn --mcpu=gfx1010 -d - | FileCheck --check-prefixes=GCN,GCN-OBJ,GFX10END-OBJ %s
3; RUN: llc -mtriple=amdgcn-amd-amdpal -mcpu=gfx1010 -asm-verbose=0 < %s | FileCheck -check-prefixes=GCN,GCN-ASM,GFX10END-ASM %s
4; RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx1010 -asm-verbose=0 < %s | FileCheck -check-prefixes=GCN,GCN-ASM,GFX10NOEND %s
5; RUN: llc -mtriple=amdgcn-- -mcpu=gfx1010 -filetype=obj < %s | llvm-objdump --arch=amdgcn --mcpu=gfx1010 -d - | FileCheck --check-prefixes=GCN,GCN-OBJ,GFX10NOEND,GFX10NOEND-OBJ %s
6
7; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx90a -asm-verbose=0 < %s | FileCheck -check-prefixes=GCN,GCN-ASM,GFX90AEND-ASM %s
8; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx90a -filetype=obj < %s | llvm-objdump --arch=amdgcn --mcpu=gfx90a --disassemble - | FileCheck -check-prefixes=GCN,GCN-OBJ,GFX90AEND-OBJ %s
9
10; GCN:            a_kernel1{{>?}}:
11; GCN:                    s_endpgm
12; GCN-ASM:        [[END_LABEL1:\.Lfunc_end.*]]:
13; GCN-ASM-NEXT:           .size   a_kernel1, [[END_LABEL1]]-a_kernel1
14
15; GCN-OBJ-NEXT:           s_nop 0
16
17define amdgpu_kernel void @a_kernel1() #0 {
18  ret void
19}
20
21; GCN:            a_kernel2{{>?}}:
22; GCN:                    s_endpgm
23; GCN-ASM:        [[END_LABEL2:\.Lfunc_end.*]]:
24; GCN-ASM-NEXT:           .size   a_kernel2, [[END_LABEL2]]-a_kernel2
25
26; GCN-OBJ:   {{^$}}
27
28define amdgpu_kernel void @a_kernel2() #0 {
29  ret void
30}
31
32; GCN-ASM:                .globl  a_function
33; GCN-ASM-NEXT:           .p2align        2
34; GCN-ASM-NEXT:           .type   a_function,@function
35
36; GCN-NEXT:       a_function{{>?}}:
37; GCN:                    s_setpc_b64
38; GCN-ASM-NEXT:   [[END_LABEL3:\.Lfunc_end.*]]:
39; GCN-ASM-NEXT:           .size   a_function, [[END_LABEL3]]-a_function
40; GFX10END-ASM:           .p2alignl 6, 3214868480
41; GFX90AEND-ASM:          .p2alignl 6, 3212836864
42; GFX10END-ASM-NEXT:      .fill 48, 4, 3214868480
43; GFX90AEND-ASM-NEXT:     .fill 256, 4, 3212836864
44; GFX10NOEND-NOT:         .fill
45
46; GFX10NOEND-OBJ-NOT:     s_code_end
47; GFX10END-OBJ-NEXT:      s_code_end
48; GFX90AEND-OBJ-NEXT:     s_nop 0
49
50; GFX10END-OBJ:           s_code_end // 000000000140:
51; GFX10END-OBJ-COUNT-47:  s_code_end
52; GFX90AEND-OBJ:           s_nop 0 // 000000000140:
53; GFX90AEND-OBJ-COUNT-255: s_nop 0
54
55define void @a_function() #0 {
56  ret void
57}
58
59attributes #0 = { "amdgpu-flat-work-group-size"="1,512" }
60