
This patch: - Adds SPIR-V backend's registered generator magic number to the emitted binary. The magic number consists of the generator ID (43) and LLVM major version. - Adds SPIR-V version to the binary. - Allows reading the expected (maximum supported) SPIR-V version from the target triple. - Uses VersionTuple for representing versions throughout the backend's codebase. - Registers v1.6 for spirv32 and spirv64 triple. See more: https://github.com/KhronosGroup/SPIRV-Headers/commit/7d500c
11 lines
421 B
LLVM
11 lines
421 B
LLVM
; RUN: llc -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s
|
|
; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv32-unknown-unknown %s -o - -filetype=obj | spirv-val %}
|
|
|
|
;; Ensure the required Capabilities are listed.
|
|
; CHECK-DAG: OpCapability Kernel
|
|
; CHECK-DAG: OpCapability Addresses
|
|
|
|
;; Ensure one, and only one, OpMemoryModel is defined.
|
|
; CHECK: OpMemoryModel Physical32 OpenCL
|
|
; CHECK-NOT: OpMemoryModel
|