1 ; RUN: llc -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s
3 ;; OpenCL global memory
4 define ptr addrspace(1) @getConstant1() {
5 ret ptr addrspace(1) null
8 ;; OpenCL constant memory
9 define ptr addrspace(2) @getConstant2() {
10 ret ptr addrspace(2) null
13 ;; OpenCL local memory
14 define ptr addrspace(3) @getConstant3() {
15 ret ptr addrspace(3) null
18 ; CHECK: [[INT:%.+]] = OpTypeInt 8
20 ; CHECK-DAG: [[PTR_AS1:%.+]] = OpTypePointer CrossWorkgroup [[INT]]
21 ; CHECK-DAG: OpConstantNull [[PTR_AS1]]
23 ; CHECK-DAG: [[PTR_AS2:%.+]] = OpTypePointer UniformConstant [[INT]]
24 ; CHECK-DAG: OpConstantNull [[PTR_AS2]]
26 ; CHECK-DAG: [[PTR_AS3:%.+]] = OpTypePointer Workgroup [[INT]]
27 ; CHECK-DAG: OpConstantNull [[PTR_AS3]]