| 1 |
; RUN: llvm-as %s -o %t.bc |
| 2 |
; RUN: llvm-spirv -spirv-text %t.bc -o - | FileCheck %s --check-prefix=CHECK-SPIRV |
| 3 |
; RUN: llvm-spirv %t.bc -o %t.spv |
| 4 |
; RUN: spirv-val %t.spv |
| 5 |
; RUN: llvm-spirv -r -emit-opaque-pointers %t.spv -o - | llvm-dis -o - | FileCheck %s --check-prefix=CHECK-LLVM |
| 6 |
|
| 7 |
; CHECK-SPIRV: Decorate [[PARAM:[0-9]+]] FuncParamAttr 6 |
| 8 |
; CHECK-SPIRV: FunctionParameter {{.*}} [[PARAM]] |
| 9 |
|
| 10 |
; ModuleID = 'readonly.bc' |
| 11 |
source_filename = "readonly.cpp" |
| 12 |
target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-n8:16:32:64" |
| 13 |
target triple = "spir64-unknown-unknown" |
| 14 |
|
| 15 |
; CHECK-LLVM: spir_kernel void @_ZTSZ4mainE15kernel_function(ptr addrspace(1) readonly %{{.*}}) |
| 16 |
; Function Attrs: norecurse nounwind readonly willreturn |
| 17 |
define dso_local spir_kernel void @_ZTSZ4mainE15kernel_function(i32 addrspace(1)* readonly %_arg_) local_unnamed_addr #0 { |
| 18 |
entry: |
| 19 |
ret void |
| 20 |
} |
| 21 |
|
| 22 |
attributes #0 = { norecurse nounwind } |
| 23 |
|
| 24 |
!llvm.module.flags = !{!0} |
| 25 |
!opencl.spir.version = !{!1} |
| 26 |
!spirv.Source = !{!2} |
| 27 |
!llvm.ident = !{!3} |
| 28 |
|
| 29 |
!0 = !{i32 1, !"wchar_size", i32 4} |
| 30 |
!1 = !{i32 1, i32 2} |
| 31 |
!2 = !{i32 4, i32 100000} |
| 32 |
!3 = !{!"clang version 13.0.0 (https://github.com/intel/llvm.git)"} |