aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/CodeGen/SPIRV/transcoding/printf.ll
blob: 338f0a52248e5d178e8bcd149dfd45faaac101ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
; RUN: llc -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s --check-prefix=CHECK-SPIRV
; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv32-unknown-unknown %s -o - -filetype=obj | spirv-val %}

@.str = private unnamed_addr addrspace(2) constant [12 x i8] c"Hello World\00", align 1

; CHECK-SPIRV: %[[#]] = OpExtInst %[[#]] %[[#]] printf %[[#]]

define dso_local spir_kernel void @BuiltinPrintf() {
entry:
  %call = tail call i32 (ptr addrspace(2), ...) @printf(ptr addrspace(2) noundef @.str)
  ret void
}

declare noundef i32 @printf(ptr addrspace(2) nocapture noundef readonly, ...)