|
| 1 | +; RUN: llc -O0 -verify-machineinstrs -mtriple=spirv-vulkan-unknown %s -o - | FileCheck %s |
| 2 | +; XFAIL: * |
| 3 | +; FIXME(168401): fix the offset of last struct S field. |
| 4 | + |
| 5 | +%struct.T = type { [3 x <2 x float>] } |
| 6 | +%struct.S = type <{ float, <3 x float>, %struct.T }> |
| 7 | + |
| 8 | +; CHECK-DAG: %[[#PTR_PCS:]] = OpTypePointer PushConstant %[[#S_S:]] |
| 9 | + |
| 10 | +; CHECK-DAG: %[[#F32:]] = OpTypeFloat 32 |
| 11 | +; CHECK-DAG: %[[#V3F32:]] = OpTypeVector %[[#F32]] 3 |
| 12 | +; CHECK-DAG: %[[#V2F32:]] = OpTypeVector %[[#F32]] 2 |
| 13 | +; CHECK-DAG: %[[#UINT:]] = OpTypeInt 32 0 |
| 14 | +; CHECK-DAG: %[[#UINT_3:]] = OpConstant %[[#UINT]] 3 |
| 15 | + |
| 16 | +; CHECK-DAG: %[[#S_S]] = OpTypeStruct %[[#F32]] %[[#V3F32]] %[[#S_T:]] |
| 17 | +; CHECK-DAG: %[[#S_T]] = OpTypeStruct %[[#ARR:]] |
| 18 | +; CHECK-DAG: %[[#ARR]] = OpTypeArray %[[#V2F32]] %[[#UINT_3]] |
| 19 | + |
| 20 | +; CHECK-DAG: OpMemberDecorate %[[#S_T]] 0 Offset 0 |
| 21 | +; CHECK-DAG: OpMemberDecorate %[[#S_S]] 0 Offset 0 |
| 22 | +; CHECK-DAG: OpMemberDecorate %[[#S_S]] 1 Offset 4 |
| 23 | +; CHECK-DAG: OpMemberDecorate %[[#S_S]] 2 Offset 16 |
| 24 | +; CHECK-DAG: OpDecorate %[[#S_S]] Block |
| 25 | +; CHECK-DAG: OpDecorate %[[#ARR]] ArrayStride 8 |
| 26 | + |
| 27 | + |
| 28 | +@pcs = external hidden addrspace(13) externally_initialized global %struct.S, align 1 |
| 29 | +; CHECK: %[[#PCS:]] = OpVariable %[[#PTR_PCS]] PushConstant |
| 30 | + |
| 31 | +define void @main() #1 { |
| 32 | +entry: |
| 33 | + %0 = call token @llvm.experimental.convergence.entry() |
| 34 | + ret void |
| 35 | +} |
| 36 | + |
| 37 | +declare token @llvm.experimental.convergence.entry() #2 |
| 38 | + |
| 39 | +attributes #1 = { convergent noinline norecurse optnone "hlsl.numthreads"="1,1,1" "hlsl.shader"="compute" } |
| 40 | +attributes #2 = { convergent nocallback nofree nosync nounwind willreturn memory(none) } |
0 commit comments