forked from KhronosGroup/SPIRV-LLVM-Translator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
OpLogicalOr.spvasm
25 lines (24 loc) · 1003 Bytes
/
OpLogicalOr.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
; REQUIRES: spirv-as
; RUN: spirv-as --target-env spv1.0 -o %t.spv %s
; RUN: spirv-val %t.spv
; RUN: llvm-spirv -r -emit-opaque-pointers -o - %t.spv | llvm-dis | FileCheck %s
OpCapability Addresses
OpCapability Kernel
OpMemoryModel Physical32 OpenCL
OpEntryPoint Kernel %1 "testLogicalOr"
OpName %a "a"
OpName %b "b"
%void = OpTypeVoid
%bool = OpTypeBool
%_ptr_CrossWorkgroup_bool = OpTypePointer CrossWorkgroup %bool
%7 = OpTypeFunction %void %_ptr_CrossWorkgroup_bool %_ptr_CrossWorkgroup_bool
%1 = OpFunction %void None %7
%8 = OpFunctionParameter %_ptr_CrossWorkgroup_bool
%9 = OpFunctionParameter %_ptr_CrossWorkgroup_bool
%10 = OpLabel
%a = OpLoad %bool %8 Aligned 8
%b = OpLoad %bool %9 Aligned 8
%11 = OpLogicalOr %bool %a %b
OpReturn
OpFunctionEnd
; CHECK: or i1 {{%a, %b|%b, %a}}