Ebin-McW 09a6a255bd
[SPIRV] Ported tests to transcoding directory from the translator (#151662)
- Checks for printf calls
- Handling of convert_* builtins and fallback
- Generation of nan and shuffle OpExtInst
2025-08-03 20:49:23 +02:00

15 lines
595 B
LLVM

; 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, ...)