Matt Arsenault | f28683c | 2017-06-26 17:53:59 +0000 | [diff] [blame^] | 1 | ; 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 |
| 7 | define 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 |
| 21 | define void @callee_with_stack() #0 { |
| 22 | %alloca = alloca i32 |
| 23 | store volatile i32 0, i32* %alloca |
| 24 | ret void |
| 25 | } |
| 26 | |
| 27 | attributes #0 = { nounwind } |