1 ; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv64-unknown-unknown %s -o - | FileCheck %s
2 ; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv64-unknown-unknown %s -o - -filetype=obj | spirv-val %}
4 ; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s
5 ; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv32-unknown-unknown %s -o - -filetype=obj | spirv-val %}
7 ; CHECK: OpName %[[#Var:]] "var"
8 ; CHECK-DAG: %[[#Char:]] = OpTypeInt 8 0
9 ; CHECK-DAG: %[[#Vec2Char:]] = OpTypeVector %[[#Char]] 2
10 ; CHECK-DAG: %[[#PtrVec2Char:]] = OpTypePointer CrossWorkgroup %[[#Vec2Char]]
11 ; CHECK-DAG: %[[#ConstNull:]] = OpConstantNull %[[#Vec2Char]]
12 ; CHECK: %[[#]] = OpVariable %[[#PtrVec2Char]] CrossWorkgroup %[[#ConstNull]]
13 ; As an option: %[[#C0:]] = OpConstant %[[#Char]] 0
14 ; %[[#VecZero:]] = OpConstantComposite %[[#Vec2Char]] %[[#C0]] %[[#C0]]
15 ; %[[#]] = OpVariable %[[#PtrVec2Char]] CrossWorkgroup %[[#VecZero]]
18 @var = addrspace(1) global <2 x i8> zeroinitializer
20 define spir_kernel void @foo() {
22 %addr = load <2 x i8>, ptr addrspace(1) @var, align 2