
This patch adds support for TargetExtType/target(...) representing SPIR-V builtin types. After D135202, target(...) is the preferred way for representing SPIR-V builtin types in LLVM IR and the only working in the opaque pointer mode. In order to maintain compatibility with LLVM IR generated by older versions of Clang and LLVM/SPIR-V Translator, pointers-to-opaque-structs denoting SPIR-V/OpenCL builtin types will be translated to equivalent SPIR-V target extension types. This translation is only available in the typed pointer mode (-opaque-pointers=0). The relevant LIT tests with SPIR-V builtins were converted to use the new target(...) notation. Differential Revision: https://reviews.llvm.org/D144494
10 lines
261 B
LLVM
10 lines
261 B
LLVM
; RUN: llc -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s --check-prefix=CHECK-SPIRV
|
|
|
|
; CHECK-SPIRV: OpCapability DeviceEnqueue
|
|
; CHECK-SPIRV: OpTypeQueue
|
|
|
|
define spir_func void @enqueue_simple_block(target("spirv.Queue") %q) {
|
|
entry:
|
|
ret void
|
|
}
|