diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2015-06-21 13:59:01 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2015-06-21 13:59:01 +0000 |
commit | 3a0822f094b578157263e04114075ad7df81db41 (patch) | |
tree | bc48361fe2cd1ca5f93ac01b38b183774468fc79 /test/CodeGen/AMDGPU/empty-function.ll | |
parent | 85d8b2bbe386bcfe669575d05b61482d7be07e5d (diff) |
Diffstat (limited to 'test/CodeGen/AMDGPU/empty-function.ll')
-rw-r--r-- | test/CodeGen/AMDGPU/empty-function.ll | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/CodeGen/AMDGPU/empty-function.ll b/test/CodeGen/AMDGPU/empty-function.ll new file mode 100644 index 000000000000..a060900811ea --- /dev/null +++ b/test/CodeGen/AMDGPU/empty-function.ll @@ -0,0 +1,21 @@ +; RUN: llc -march=amdgcn -mcpu=SI -verify-machineinstrs < %s | FileCheck -check-prefix=SI %s +; RUN: llc -march=amdgcn -mcpu=tonga -verify-machineinstrs < %s | FileCheck -check-prefix=SI %s + +; Make sure we don't assert on empty functions + +; SI: .text +; SI-LABEL: {{^}}empty_function_ret: +; SI: s_endpgm +; SI: codeLenInByte = 4 +define void @empty_function_ret() #0 { + ret void +} + +; SI: .text +; SI-LABEL: {{^}}empty_function_unreachable: +; SI: codeLenInByte = 0 +define void @empty_function_unreachable() #0 { + unreachable +} + +attributes #0 = { nounwind } |