xref: /llvm-project/llvm/test/CodeGen/AMDGPU/global-directive.ll (revision 9e9907f1cfa424366fba58d9520f9305b537cec9)
1; RUN: llc -mtriple=amdgcn -verify-machineinstrs < %s | FileCheck -check-prefix=SI %s
2; RUN: llc -mtriple=amdgcn -mcpu=tonga -verify-machineinstrs < %s | FileCheck -check-prefix=SI %s
3
4; Make sure the GlobalDirective isn't merged with the function name
5
6; SI:	.globl	foo
7; SI: {{^}}foo:
8define amdgpu_kernel void @foo(ptr addrspace(1) %out, ptr addrspace(1) %in) {
9  %b_ptr = getelementptr i32, ptr addrspace(1) %in, i32 1
10  %a = load i32, ptr addrspace(1) %in
11  %b = load i32, ptr addrspace(1) %b_ptr
12  %result = add i32 %a, %b
13  store i32 %result, ptr addrspace(1) %out
14  ret void
15}
16