| ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py |
| ; RUN: opt -mtriple=amdgcn-- -passes=amdgpu-printf-runtime-binding -mcpu=fiji -S < %s | FileCheck --check-prefix=GCN %s |
| |
| @format.str = private unnamed_addr addrspace(4) constant [8 x i8] c"arst %d\00", align 1 |
| |
| define i32 @printf(ptr addrspace(4), ...) { |
| ; GCN-LABEL: @printf( |
| ; GCN-NEXT: ret i32 0 |
| ; |
| ret i32 0 |
| } |
| |
| define void @printf_caller(i32 %n) { |
| ; GCN-LABEL: @printf_caller( |
| ; GCN-NEXT: [[CALL:%.*]] = call i32 @printf(ptr addrspace(4) @format.str, i32 [[N:%.*]]) |
| ; GCN-NEXT: ret void |
| ; |
| %call = call i32 @printf(ptr addrspace(4) @format.str, i32 %n) |
| ret void |
| } |