File: OpMemberDecorateString_UserSemantic.spvasm

package info (click to toggle)
spirv-llvm-translator-14 14.0.11-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 15,640 kB
  • sloc: cpp: 47,664; lisp: 3,704; sh: 153; python: 43; makefile: 33
file content (37 lines) | stat: -rw-r--r-- 1,542 bytes parent folder | download
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
26
27
28
29
30
31
32
33
34
35
36
37
; REQUIRES: spirv-as
; RUN: spirv-as --target-env spv1.4 -o %t.spv %s
; RUN: spirv-val %t.spv
; RUN: llvm-spirv --opaque-pointers -r -o - %t.spv | llvm-dis -opaque-pointers | FileCheck %s

; SPIR-V
; Version: 1.4
; Generator: Khronos LLVM/SPIR-V Translator; 14
; Bound: 44
; Schema: 0
               OpCapability Addresses
               OpCapability Linkage
               OpCapability Kernel
               OpCapability Int64
               OpMemoryModel Physical64 OpenCL
               OpEntryPoint Kernel %kernel "test"
               OpMemberDecorateString %struct 0 UserSemantic "foo"
; CHECK: [[STR:@[0-9_.]+]] = {{.*}}foo
; Note: this is checking for an annotation on an instantiation of the structure,
; which is different than an annotation on the structure type.
; CHECK: call ptr @llvm.ptr.annotation.p0(ptr %{{.*}}, ptr getelementptr inbounds ([4 x i8], ptr [[STR]], i32 0, i32 0), ptr undef, i32 undef, ptr undef)
       %uint = OpTypeInt 32 0
     %uint_0 = OpConstant %uint 0
       %void = OpTypeVoid
 %kernel_sig = OpTypeFunction %void %uint
     %struct = OpTypeStruct %uint
 %ptr_struct = OpTypePointer Function %struct
   %ptr_uint = OpTypePointer Function %uint
     %kernel = OpFunction %void None %kernel_sig
          %a = OpFunctionParameter %uint
      %entry = OpLabel
          %s = OpVariable %ptr_struct Function
        %add = OpIAdd %uint %a %a
          %x = OpInBoundsPtrAccessChain %ptr_uint %s %uint_0 %uint_0
               OpStore %x %add Aligned 4
               OpReturn
               OpFunctionEnd