-
Notifications
You must be signed in to change notification settings - Fork 750
/
Copy pathMaxByteOffsetId.spvasm
33 lines (28 loc) · 1.1 KB
/
MaxByteOffsetId.spvasm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
; REQUIRES: spirv-as
; RUN: spirv-as %s --target-env spv1.2 -o %t.spv
; RUN: spirv-val %t.spv
; RUN: llvm-spirv -r -o %t.rev.bc %t.spv
; RUN: llvm-dis %t.rev.bc -o - | FileCheck %s
; CHECK: define spir_kernel void @testMaxByteOffsetId(
; CHECK-SAME: ptr addrspace(1) dereferenceable(24) %p,
; CHECK-SAME: ptr addrspace(1) dereferenceable(48) %q)
OpCapability Addresses
OpCapability Kernel
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %fn "testMaxByteOffsetId"
OpName %p "p"
OpName %q "q"
OpDecorateId %p MaxByteOffsetId %mbo
OpDecorateId %q MaxByteOffsetId %spec
%void = OpTypeVoid
%i32 = OpTypeInt 32 0
%ptr = OpTypePointer CrossWorkgroup %i32
%fnTy = OpTypeFunction %void %ptr %ptr
%mbo = OpConstant %i32 24
%spec = OpSpecConstantOp %i32 IAdd %mbo %mbo
%fn = OpFunction %void None %fnTy
%p = OpFunctionParameter %ptr
%q = OpFunctionParameter %ptr
%entry = OpLabel
OpReturn
OpFunctionEnd