1; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1010 -asm-verbose=0 < %s | FileCheck -check-prefixes=GCN,GCN-ASM,GFX10END,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,GFX10END-OBJ %s
3; RUN: llc -mtriple=amdgcn-amd-amdpal -mcpu=gfx1010 -asm-verbose=0 < %s | FileCheck -check-prefixes=GCN,GCN-ASM,GFX10END,GFX10END-ASM %s
4; RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx1010 -asm-verbose=0 < %s | FileCheck -check-prefixes=GCN,GCN-ASM,GFX10NOEND,GFX10NOEND-ASM %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; GCN:            a_kernel1{{>?}}:
8; GCN:                    s_endpgm
9; GCN-ASM:        [[END_LABEL1:\.Lfunc_end.*]]:
10; GCN-ASM-NEXT:           .size   a_kernel1, [[END_LABEL1]]-a_kernel1
11
12; GCN-OBJ-NEXT:           s_nop 0
13
14define amdgpu_kernel void @a_kernel1() {
15  ret void
16}
17
18; GCN:            a_kernel2{{>?}}:
19; GCN:                    s_endpgm
20; GCN-ASM:        [[END_LABEL2:\.Lfunc_end.*]]:
21; GCN-ASM-NEXT:           .size   a_kernel2, [[END_LABEL2]]-a_kernel2
22
23; GCN-OBJ:   {{^$}}
24
25define amdgpu_kernel void @a_kernel2() {
26  ret void
27}
28
29; GCN-ASM:                .globl  a_function
30; GCN-ASM-NEXT:           .p2align        2
31; GCN-ASM-NEXT:           .type   a_function,@function
32
33; GCN-NEXT:       a_function{{>?}}:
34; GCN:                    s_setpc_b64
35; GCN-ASM-NEXT:   [[END_LABEL3:\.Lfunc_end.*]]:
36; GCN-ASM-NEXT:           .size   a_function, [[END_LABEL3]]-a_function
37; GFX10END-ASM:           .p2alignl 6, 3214868480
38; GFX10END-ASM-NEXT:      .fill 48, 4, 3214868480
39; GFX10NOEND-NOT:         .fill
40
41; GFX10NOEND-OBJ-NOT:     s_code_end
42; GFX10END-OBJ-NEXT:      s_code_end
43
44; GFX10END-OBJ:           s_code_end // 000000000140:
45; GFX10END-OBJ-COUNT-47:  s_code_end
46
47define void @a_function() {
48  ret void
49}
50