| 1 |
; Example of token usage is from https://llvm.org/docs/LangRef.html (Preallocated Operand Bundles) |
| 2 |
|
| 3 |
; RUN: not llc -O0 -mtriple=spirv64-unknown-unknown %s -o - 2>&1 | FileCheck %s |
| 4 |
|
| 5 |
; CHECK: A token is encountered but SPIR-V without extensions does not support token type |
| 6 |
|
| 7 |
%foo = type { i64, i32 } |
| 8 |
|
| 9 |
define dso_local spir_func void @test() { |
| 10 |
entry: |
| 11 |
%tok = call token @llvm.call.preallocated.setup(i32 1) |
| 12 |
%a = call ptr @llvm.call.preallocated.arg(token %tok, i32 0) preallocated(%foo) |
| 13 |
ret void |
| 14 |
} |
| 15 |
|
| 16 |
declare token @llvm.call.preallocated.setup(i32 %num_args) |
| 17 |
declare ptr @llvm.call.preallocated.arg(token %setup_token, i32 %arg_index) |