diff options
Diffstat (limited to 'test/CodeGen/R600/empty-function.ll')
-rw-r--r-- | test/CodeGen/R600/empty-function.ll | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/CodeGen/R600/empty-function.ll b/test/CodeGen/R600/empty-function.ll new file mode 100644 index 0000000..d4ff803 --- /dev/null +++ b/test/CodeGen/R600/empty-function.ll @@ -0,0 +1,20 @@ +; RUN: llc -march=r600 -mcpu=SI -verify-machineinstrs < %s | FileCheck -check-prefix=SI %s + +; Make sure we don't assert on empty functions + +; SI-LABEL: {{^}}empty_function_ret: +; SI: .text +; SI: s_endpgm +; SI: codeLenInByte = 4 +define void @empty_function_ret() #0 { + ret void +} + +; SI-LABEL: {{^}}empty_function_unreachable: +; SI: .text +; SI: codeLenInByte = 0 +define void @empty_function_unreachable() #0 { + unreachable +} + +attributes #0 = { nounwind } |