1 ; RUN: opt -S -mtriple=amdgcn-amd-amdhsa -codegenprepare %s | FileCheck %s
3 define internal fastcc void @callee(ptr nocapture %p, i32 %a) #0 {
4 store volatile i32 %a, ptr %p, align 4
8 ; CHECK-LABEL: @func_caller(
9 ; CHECK: tail call fastcc void @callee(
10 ; CHECK-NEXT: ret void
12 define void @func_caller(ptr nocapture %p, i32 %a, i32 %b) #0 {
14 %cmp = icmp eq i32 %b, 0
15 br i1 %cmp, label %bb, label %ret
18 tail call fastcc void @callee(ptr %p, i32 %a)
25 ; CHECK-LABEL: @kernel_caller(
26 ; CHECK: tail call fastcc void @callee(
27 ; CHECK-NEXT: br label %ret
30 define amdgpu_kernel void @kernel_caller(ptr nocapture %p, i32 %a, i32 %b) #0 {
32 %cmp = icmp eq i32 %b, 0
33 br i1 %cmp, label %bb, label %ret
36 tail call fastcc void @callee(ptr %p, i32 %a)
43 attributes #0 = { nounwind }