aboutsummaryrefslogblamecommitdiff
path: root/test/CodeGen/AMDGPU/empty-function.ll
blob: 1231cb4d1de2b482e91f86447181f0896eb7b056 (plain) (tree)
1
2
3
4
5
6
7
8
9
                                                                                            
                                                                                               


                                              
           
                                    

                       
                                                    


          
           
                                            
                       
                                                            



                            
; 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 amdgpu_kernel void @empty_function_ret() #0 {
  ret void
}

; SI: .text
; SI-LABEL: {{^}}empty_function_unreachable:
; SI: codeLenInByte = 0
define amdgpu_kernel void @empty_function_unreachable() #0 {
  unreachable
}

attributes #0 = { nounwind }