1 // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -emit-llvm -o - -O0 %s | FileCheck %s
\r
3 StructuredBuffer<int> In;
\r
4 RWStructuredBuffer<int> Out1;
\r
5 RasterizerOrderedStructuredBuffer<int> Out2;
\r
8 void main(unsigned GI : SV_GroupIndex) {
\r
9 // CHECK: define void @main()
\r
11 // CHECK: %[[INPTR:.*]] = call noundef nonnull align 4 dereferenceable(4) ptr @llvm.dx.resource.getpointer.p0.tdx.RawBuffer_i32_0_0t(target("dx.RawBuffer", i32, 0, 0) %{{.*}}, i32 %{{.*}})
\r
12 // CHECK: %[[LOAD:.*]] = load i32, ptr %[[INPTR]]
\r
13 // CHECK: %[[OUT1PTR:.*]] = call noundef nonnull align 4 dereferenceable(4) ptr @llvm.dx.resource.getpointer.p0.tdx.RawBuffer_i32_1_0t(target("dx.RawBuffer", i32, 1, 0) %{{.*}}, i32 %{{.*}})
\r
14 // CHECK: store i32 %[[LOAD]], ptr %[[OUT1PTR]]
\r
17 // CHECK: %[[INPTR:.*]] = call noundef nonnull align 4 dereferenceable(4) ptr @llvm.dx.resource.getpointer.p0.tdx.RawBuffer_i32_0_0t(target("dx.RawBuffer", i32, 0, 0) %{{.*}}, i32 %{{.*}})
\r
18 // CHECK: %[[LOAD:.*]] = load i32, ptr %[[INPTR]]
\r
19 // CHECK: %[[OUT2PTR:.*]] = call noundef nonnull align 4 dereferenceable(4) ptr @llvm.dx.resource.getpointer.p0.tdx.RawBuffer_i32_1_1t(target("dx.RawBuffer", i32, 1, 1) %{{.*}}, i32 %{{.*}})
\r
20 // CHECK: store i32 %[[LOAD]], ptr %[[OUT2PTR]]
\r