@@ -7,7 +7,7 @@ target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:
7
7
declare target ("spirv.VulkanBuffer" , [0 x i32 ], 12 , 0 ) @llvm.spv.resource.handlefrombinding.tspirv.VulkanBuffer_a0i32_12_0t (i32 , i32 , i32 , i32 , i1 ) #0
8
8
9
9
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(none)
10
- declare target ("spirv.Image " , i32 , 5 , 2 , 0 , 0 , 2 , 0 ) @llvm.spv.resource.handlefrombinding.tspirv.Image_i32_5_2_0_0_2_0t (i32 , i32 , i32 , i32 , i1 ) #0
10
+ declare target ("spirv.VulkanBuffer " , [ 0 x i32 ], 12 , 1 ) @llvm.spv.resource.handlefrombinding.tspirv.VulkanBuffer_a0i32_12_1t (i32 , i32 , i32 , i32 , i1 ) #0
11
11
12
12
; CHECK-DAG: OpDecorate [[BufferVar:%.+]] DescriptorSet 0
13
13
; CHECK-DAG: OpDecorate [[BufferVar]] Binding 0
@@ -30,27 +30,29 @@ declare target("spirv.Image", i32, 5, 2, 0, 0, 2, 0) @llvm.spv.resource.handlefr
30
30
; Function Attrs: mustprogress nofree noinline norecurse nosync nounwind willreturn memory(readwrite, inaccessiblemem: none)
31
31
define void @main () local_unnamed_addr #1 {
32
32
entry:
33
+
33
34
; CHECK: [[BufferHandle:%.+]] = OpCopyObject [[BufferPtrType]] [[BufferVar]]
34
- %i_h .i.i = tail call target ("spirv.VulkanBuffer" , [0 x i32 ], 12 , 0 ) @llvm.spv.resource.handlefrombinding.tspirv.VulkanBuffer_a0i32_12_0t (i32 0 , i32 0 , i32 1 , i32 0 , i1 false )
35
+ %_ZL1i_h .i.i = tail call target ("spirv.VulkanBuffer" , [0 x i32 ], 12 , 0 ) @llvm.spv.resource.handlefrombinding.tspirv.VulkanBuffer_a0i32_12_0t (i32 0 , i32 0 , i32 1 , i32 0 , i1 false )
35
36
36
- %o_h.i.i = tail call target ("spirv.Image" , i32 , 5 , 2 , 0 , 0 , 2 , 0 ) @llvm.spv.resource.handlefrombinding.tspirv.Image_i32_5_2_0_0_2_0t (i32 0 , i32 1 , i32 1 , i32 0 , i1 false )
37
+ ; CHECK: STEVEN
38
+ %_ZL1o_h.i.i = tail call target ("spirv.VulkanBuffer" , [0 x i32 ], 12 , 1 ) @llvm.spv.resource.handlefrombinding.tspirv.VulkanBuffer_a0i32_12_1t (i32 0 , i32 1 , i32 1 , i32 0 , i1 false )
37
39
38
40
; CHECK: [[AC:%.+]] = OpAccessChain {{.*}} [[BufferHandle]] [[zero]] [[one]]
39
- %0 = tail call noundef align 4 dereferenceable (4 ) ptr addrspace (11 ) @llvm.spv.resource.getpointer.p11.tspirv.VulkanBuffer_a0i32_12_0t (target ("spirv.VulkanBuffer" , [0 x i32 ], 12 , 0 ) %i_h .i.i , i32 1 )
41
+ %0 = tail call noundef nonnull align 4 dereferenceable (4 ) ptr addrspace (11 ) @llvm.spv.resource.getpointer.p11.tspirv.VulkanBuffer_a0i32_12_0t (target ("spirv.VulkanBuffer" , [0 x i32 ], 12 , 0 ) %_ZL1i_h .i.i , i32 1 )
40
42
41
43
; CHECK: [[LD:%.+]] = OpLoad [[int]] [[AC]] Aligned 4
42
44
%1 = load i32 , ptr addrspace (11 ) %0 , align 4 , !tbaa !3
43
45
44
- ; CHECK: [[ImageHandle:%.+]] = OpLoad {{.*}} [[ImageVar]]
45
- %2 = tail call noundef align 4 dereferenceable (4 ) ptr addrspace (11 ) @llvm.spv.resource.getpointer.p11.tspirv.Image_i32_5_2_0_0_2_0t (target ("spirv.Image " , i32 , 5 , 2 , 0 , 0 , 2 , 0 ) %o_h .i.i , i32 0 )
46
+ ; CHECK: STEVEN
47
+ %2 = tail call noundef nonnull align 4 dereferenceable (4 ) ptr addrspace (11 ) @llvm.spv.resource.getpointer.p11.tspirv.VulkanBuffer_a0i32_12_1t (target ("spirv.VulkanBuffer " , [ 0 x i32 ], 12 , 1 ) %_ZL1o_h .i.i , i32 0 )
46
48
47
- ; CHECK: OpImageWrite [[ImageHandle]] [[zero]] [[LD]]
49
+ ; CHECK: STEVEN
48
50
store i32 %1 , ptr addrspace (11 ) %2 , align 4 , !tbaa !3
49
51
ret void
50
52
}
51
53
52
54
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(none)
53
- declare ptr addrspace (11 ) @llvm.spv.resource.getpointer.p11.tspirv.Image_i32_5_2_0_0_2_0t (target ("spirv.Image " , i32 , 5 , 2 , 0 , 0 , 2 , 0 ), i32 ) #0
55
+ declare ptr addrspace (11 ) @llvm.spv.resource.getpointer.p11.tspirv.VulkanBuffer_a0i32_12_1t (target ("spirv.VulkanBuffer " , [ 0 x i32 ], 12 , 1 ), i32 ) #0
54
56
55
57
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(none)
56
58
declare ptr addrspace (11 ) @llvm.spv.resource.getpointer.p11.tspirv.VulkanBuffer_a0i32_12_0t (target ("spirv.VulkanBuffer" , [0 x i32 ], 12 , 0 ), i32 ) #0
0 commit comments