1 ; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s
2 ; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv32-unknown-unknown %s -o - -filetype=obj | spirv-val %}
4 ; CHECK-DAG: %[[#INT:]] = OpTypeInt 32
5 ; CHECK-DAG: %[[#GLOBAL_PTR_INT:]] = OpTypePointer CrossWorkgroup %[[#INT]]
7 define i32 @foo(i32 %a, ptr addrspace(1) %p) {
8 store i32 %a, i32 addrspace(1)* %p
9 %b = load i32, i32 addrspace(1)* %p
13 ; CHECK: %[[#A:]] = OpFunctionParameter %[[#INT]]
14 ; CHECK: %[[#CorP:]] = {{OpBitcast|OpFunctionParameter}}{{.*}}%[[#GLOBAL_PTR_INT]]{{.*}}
15 ; CHECK: OpStore %[[#CorP]] %[[#A]]
16 ; CHECK: %[[#B:]] = OpLoad %[[#INT]] %[[#CorP]]