| 1 |
; RUN: llc -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s --check-prefix=CHECK-SPIRV |
| 2 |
; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv32-unknown-unknown %s -o - -filetype=obj | spirv-val %} |
| 3 |
|
| 4 |
@.str = private unnamed_addr addrspace(2) constant [12 x i8] c"Hello World\00", align 1 |
| 5 |
|
| 6 |
; CHECK-SPIRV: %[[#]] = OpExtInst %[[#]] %[[#]] printf %[[#]] |
| 7 |
|
| 8 |
define dso_local spir_kernel void @BuiltinPrintf() { |
| 9 |
entry: |
| 10 |
%call = tail call i32 (ptr addrspace(2), ...) @printf(ptr addrspace(2) noundef @.str) |
| 11 |
ret void |
| 12 |
} |
| 13 |
|
| 14 |
declare noundef i32 @printf(ptr addrspace(2) nocapture noundef readonly, ...) |