================
@@ -6,14 +6,17 @@ RasterizerOrderedStructuredBuffer<int> Out2;
 
 [numthreads(1,1,1)]
 void main(unsigned GI : SV_GroupIndex) {
+  // CHECK: define void @main()
+
+  // 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 %{{.*}})
+  // CHECK: %[[LOAD:.*]] = load i32, ptr %[[INPTR]]
+  // 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 %{{.*}})
+  // CHECK: store i32 %[[LOAD]], ptr %[[OUT1PTR]]
   Out1[GI] = In[GI];
+
+  // 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 %{{.*}})
+  // CHECK: %[[LOAD:.*]] = load i32, ptr %[[INPTR]]
+  // 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 %{{.*}})
+  // CHECK: store i32 %[[LOAD]], ptr %[[OUT2PTR]]
----------------
bogner wrote:

I've commented in the other PR - I think this highlights that we will need to 
make sure we change this to use an address space for the device memory sooner 
rather than later, as mixing pointers between resource types would cause all 
sorts of trouble.

https://github.com/llvm/llvm-project/pull/117017
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to