blob: be775cf9292f39ce08d3b8f4bbc33952a1047ade [file] [log] [blame]
Tom Stellard49f8bfd2015-01-06 18:00:21 +00001; RUN: llc -march=amdgcn -mcpu=SI -verify-machineinstrs < %s | FileCheck -check-prefix=SI %s
Marek Olsak75170772015-01-27 17:27:15 +00002; RUN: llc -march=amdgcn -mcpu=tonga -verify-machineinstrs < %s | FileCheck -check-prefix=SI %s
Matt Arsenault8c4fb7c2014-10-21 21:08:36 +00003
4; Make sure the GlobalDirective isn't merged with the function name
5
6; SI: .globl foo
7; SI: {{^}}foo:
8define void @foo(i32 addrspace(1)* %out, i32 addrspace(1)* %in) {
David Blaikie79e6c742015-02-27 19:29:02 +00009 %b_ptr = getelementptr i32, i32 addrspace(1)* %in, i32 1
David Blaikiea79ac142015-02-27 21:17:42 +000010 %a = load i32, i32 addrspace(1)* %in
11 %b = load i32, i32 addrspace(1)* %b_ptr
Matt Arsenault8c4fb7c2014-10-21 21:08:36 +000012 %result = add i32 %a, %b
13 store i32 %result, i32 addrspace(1)* %out
14 ret void
15}