blob: 1231cb4d1de2b482e91f86447181f0896eb7b056 [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 Arsenault6ef66142014-11-13 20:07:40 +00003
4; Make sure we don't assert on empty functions
5
Matt Arsenault6ef66142014-11-13 20:07:40 +00006; SI: .text
Rafael Espindolaec8da3d2015-03-17 14:34:42 +00007; SI-LABEL: {{^}}empty_function_ret:
Matt Arsenault6ef66142014-11-13 20:07:40 +00008; SI: s_endpgm
9; SI: codeLenInByte = 4
Matt Arsenault3dbeefa2017-03-21 21:39:51 +000010define amdgpu_kernel void @empty_function_ret() #0 {
Matt Arsenault6ef66142014-11-13 20:07:40 +000011 ret void
12}
13
Matt Arsenault6ef66142014-11-13 20:07:40 +000014; SI: .text
Rafael Espindolaec8da3d2015-03-17 14:34:42 +000015; SI-LABEL: {{^}}empty_function_unreachable:
Matt Arsenault6ef66142014-11-13 20:07:40 +000016; SI: codeLenInByte = 0
Matt Arsenault3dbeefa2017-03-21 21:39:51 +000017define amdgpu_kernel void @empty_function_unreachable() #0 {
Matt Arsenault6ef66142014-11-13 20:07:40 +000018 unreachable
19}
20
21attributes #0 = { nounwind }