Files
clang-p2996/llvm/test/CodeGen/SPIRV/metadata-opencl.ll
Ilia Diachkov 153dee34f1 [SPIR-V](6/6) Add the module analysis pass and the simplest tests
This patch adds one SPIRV analysis pass and extends AsmPrinter. It is
essential for minimum SPIR-V output. Also it adds several simplest tests
to show that the target basically works.

Differential Revision: https://reviews.llvm.org/D116465

Authors: Aleksandr Bezzubikov, Lewis Crawford, Ilia Diachkov,
Michal Paszkowski, Andrey Tretyakov, Konrad Trifunovic

Co-authored-by: Aleksandr Bezzubikov <zuban32s@gmail.com>
Co-authored-by: Ilia Diachkov <iliya.diyachkov@intel.com>
Co-authored-by: Michal Paszkowski <michal.paszkowski@outlook.com>
Co-authored-by: Andrey Tretyakov <andrey1.tretyakov@intel.com>
Co-authored-by: Konrad Trifunovic <konrad.trifunovic@intel.com>
2022-04-20 01:10:25 +02:00

30 lines
954 B
LLVM

; RUN: split-file %s %t
; RUN: llc -O0 %t/metadata-opencl12.ll -o - | FileCheck %t/metadata-opencl12.ll
; RUN: llc -O0 %t/metadata-opencl20.ll -o - | FileCheck %t/metadata-opencl20.ll
; RUN: llc -O0 %t/metadata-opencl22.ll -o - | FileCheck %t/metadata-opencl22.ll
;--- metadata-opencl12.ll
target triple = "spirv32-unknown-unknown"
!opencl.ocl.version = !{!0}
!0 = !{i32 1, i32 2}
; We assume the SPIR-V 2.2 environment spec's version format: 0|Maj|Min|Rev|
; CHECK: OpSource OpenCL_C 66048
;--- metadata-opencl20.ll
target triple = "spirv32-unknown-unknown"
!opencl.ocl.version = !{!0}
!0 = !{i32 2, i32 0}
; We assume the SPIR-V 2.2 environment spec's version format: 0|Maj|Min|Rev|
; CHECK: OpSource OpenCL_C 131072
;--- metadata-opencl22.ll
target triple = "spirv32-unknown-unknown"
!opencl.ocl.version = !{!0}
!0 = !{i32 2, i32 2}
; We assume the SPIR-V 2.2 environment spec's version format: 0|Maj|Min|Rev|
; CHECK: OpSource OpenCL_C 131584