; REQUIRES: spirv-as
; RUN: spirv-as --target-env spv1.0 -o %t.spv %s
; RUN: spirv-val %t.spv
; RUN: llvm-spirv -r -o - %t.spv | llvm-dis | FileCheck %s
               OpCapability Addresses
               OpCapability Kernel
               OpCapability Int16
               OpMemoryModel Physical32 OpenCL
               OpEntryPoint Kernel %1 "testWideningUToPtr"
               OpName %a "a"
               OpName %entry "entry"
       %uint = OpTypeInt 32 0
     %uint_0 = OpConstant %uint 0
     %ushort = OpTypeInt 16 0
       %void = OpTypeVoid
%_ptr_CrossWorkgroup_uint = OpTypePointer CrossWorkgroup %uint
          %9 = OpTypeFunction %void %ushort
          %1 = OpFunction %void None %9
          %a = OpFunctionParameter %ushort
      %entry = OpLabel
         %10 = OpConvertUToPtr %_ptr_CrossWorkgroup_uint %a
               OpStore %10 %uint_0 Aligned 4
               OpReturn
               OpFunctionEnd

; CHECK: inttoptr i16 %a to ptr addrspace(1)
