brintos

brintos / llvm-project-archived public Read only

0
0
Text · 655 B · 22740a0 Raw
21 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt -mtriple=amdgcn-- -passes=amdgpu-printf-runtime-binding -mcpu=fiji -S < %s | FileCheck --check-prefix=GCN %s3 4@format.str = private unnamed_addr addrspace(4) constant [8 x i8] c"arst %d\00", align 15 6define i32 @printf(ptr addrspace(4), ...) {7; GCN-LABEL: @printf(8; GCN-NEXT:    ret i32 09;10  ret i32 011}12 13define void @printf_caller(i32 %n) {14; GCN-LABEL: @printf_caller(15; GCN-NEXT:    [[CALL:%.*]] = call i32 @printf(ptr addrspace(4) @format.str, i32 [[N:%.*]])16; GCN-NEXT:    ret void17;18  %call = call i32 @printf(ptr addrspace(4) @format.str, i32 %n)19  ret void20}21