Debian Codegraph @

llvm/test/CodeGen/SPIRV/vk-pushconstant-access.ll

raw
1 ; RUN: llc -O0 -verify-machineinstrs -mtriple=spirv-vulkan-unknown %s -o - | FileCheck %s
2
3 %struct.S = type <{ float }>
4
5 ; CHECK-NOT: OpCapability Linkage
6
7 ; CHECK-DAG: %[[#F32:]] = OpTypeFloat 32
8 ; CHECK-DAG: %[[#UINT:]] = OpTypeInt 32 0
9 ; CHECK-DAG: %[[#S_S:]] = OpTypeStruct %[[#F32]]
10
11 ; CHECK-DAG: %[[#PTR_PCS_F:]] = OpTypePointer PushConstant %[[#F32]]
12 ; CHECK-DAG: %[[#PTR_PCS_S:]] = OpTypePointer PushConstant %[[#S_S]]
13
14
15 ; CHECK-DAG: OpMemberDecorate %[[#S_S]] 0 Offset 0
16 ; CHECK-DAG: OpDecorate %[[#S_S]] Block
17
18
19 @pcs = external hidden addrspace(13) externally_initialized global %struct.S, align 1
20 ; CHECK: %[[#PCS:]] = OpVariable %[[#PTR_PCS_S]] PushConstant
21
22 define void @main() #1 {
23 entry:
24 %0 = call token @llvm.experimental.convergence.entry()
25 %1 = alloca float, align 4
26 %2 = load float, ptr addrspace(13) @pcs, align 1
27 store float %2, ptr %1
28 ret void
29 }
30
31 declare token @llvm.experimental.convergence.entry() #2
32
33 attributes #1 = { convergent noinline norecurse optnone "hlsl.numthreads"="1,1,1" "hlsl.shader"="compute" }
34 attributes #2 = { convergent nocallback nofree nosync nounwind willreturn memory(none) }