forked from KhronosGroup/SPIRV-LLVM-Translator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOpConvertUToPtr_narrowing.spvasm
More file actions
25 lines (24 loc) · 945 Bytes
/
OpConvertUToPtr_narrowing.spvasm
File metadata and controls
25 lines (24 loc) · 945 Bytes
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
; REQUIRES: spirv-as
; RUN: spirv-as --target-env spv1.0 -o %t.spv %s
; RUN: llvm-spirv -r -o - %t.spv | llvm-dis | FileCheck %s
OpCapability Addresses
OpCapability Kernel
OpCapability Int64
OpMemoryModel Physical32 OpenCL
OpEntryPoint Kernel %1 "testNarrowingUToPtr"
OpName %a "a"
OpName %entry "entry"
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%ulong = OpTypeInt 64 0
%void = OpTypeVoid
%_ptr_CrossWorkgroup_uint = OpTypePointer CrossWorkgroup %uint
%9 = OpTypeFunction %void %ulong
%1 = OpFunction %void None %9
%a = OpFunctionParameter %ulong
%entry = OpLabel
%10 = OpConvertUToPtr %_ptr_CrossWorkgroup_uint %a
OpStore %10 %uint_0 Aligned 4
OpReturn
OpFunctionEnd
; CHECK: inttoptr i64 %a to i32 addrspace(1)*