blob: 6c3594bb44ebf8f0caf82df37431b1663f64fcfa [file] [log] [blame]
Matt Arsenaultf28683c2017-06-26 17:53:59 +00001; RUN: llc -march=amdgcn -mcpu=hawaii -verify-machineinstrs < %s | FileCheck -enable-var-scope -check-prefix=GCN -check-prefix=CI %s
2
3; GCN-LABEL: {{^}}callee_no_stack:
4; GCN: ; BB#0:
5; GCN-NEXT: s_waitcnt
6; GCN-NEXT: s_setpc_b64
7define void @callee_no_stack() #0 {
8 ret void
9}
10
11; Requires frame pointer for access to local regular object.
12
13; GCN-LABEL: {{^}}callee_with_stack:
14; GCN: ; BB#0:
15; GCN-NEXT: s_waitcnt
16; GCN-NEXT: s_mov_b32 s5, s32
17; GCN-NEXT: v_mov_b32_e32 v0, 0{{$}}
18; GCN-NEXT: buffer_store_dword v0, off, s[0:3], s5 offset:4{{$}}
19; GCN-NEXT: s_waitcnt
20; GCN-NEXT: s_setpc_b64
21define void @callee_with_stack() #0 {
22 %alloca = alloca i32
23 store volatile i32 0, i32* %alloca
24 ret void
25}
26
27attributes #0 = { nounwind }