Debian Codegraph @

llvm/test/CodeGen/SPIRV/remove-dead-type-intrinsics.ll

raw
1 ; RUN: llc -O0 -mtriple=spirv-unknown-vulkan1.3-compute %s -o - | FileCheck %s
2 ; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-unknown-vulkan1.3-compute %s -o - -filetype=obj | spirv-val %}
3
4 %A = type {
5 i32,
6 i32
7 }
8
9 %B = type {
10 %A,
11 i32,
12 %A
13 }
14
15 ; Make sure all struct types are removed.
16 ; CHECK-NOT: OpTypeStruct
17
18 ; Make sure the GEPs and the function scope variable are removed.
19 ; CHECK: OpFunction
20 ; CHECK-NEXT: OpLabel
21 ; CHECK-NEXT: OpReturn
22 ; CHECK-NEXT: OpFunctionEnd
23 define void @main() #1 {
24 entry:
25 %0 = alloca %B, align 4
26 %1 = getelementptr %B, ptr %0, i32 0, i32 2
27 %2 = getelementptr %A, ptr %1, i32 0, i32 1
28 ret void
29 }
30
31 attributes #1 = { "hlsl.numthreads"="4,8,16" "hlsl.shader"="compute" }