================
@@ -0,0 +1,64 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.6-compute 
-finclude-default-header \
+// RUN:   -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s 
-check-prefixes=CHECK,DXIL
+// RUN: %clang_cc1 -finclude-default-header -triple 
spirv-unknown-vulkan-compute \
+// RUN:   -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s 
-check-prefixes=CHECK,SPV
+
+// CHECK: @[[BufA:.*]] = private unnamed_addr constant [2 x i8] c"A\00", align 
1
+// CHECK: @[[BufB:.*]] = private unnamed_addr constant [2 x i8] c"B\00", align 
1
+
+RWBuffer<float> A[] : register(u10, space1);
+RWBuffer<int> B[][5][4];
+
+RWStructuredBuffer<float> Out;
+
+float foo(RWBuffer<int> Arr[4], uint Index) {
+  return (float)Arr[Index][0];
+}
+
+// NOTE:
+// - _ZN4hlsl8RWBufferIfEC1EjjijPKc is the constructor call for explicit 
binding for RWBuffer<float>
+//    (has "jjij" in the mangled name) and the arguments are (register, space, 
range_size, index, name).
+// - _ZN4hlsl8RWBufferIiEC1EjijjPKc is the constructor call for implicit 
binding for RWBuffer<int>
+//    (has "jijj" in the mangled name) and the arguments are (space, 
range_size, index, order_id, name).
+// - _ZN4hlsl8RWBufferIfEixEj is the subscript operator on RWBuffer<float>
----------------
hekota wrote:

Good idea! If it's ok with you, I would add the `llvm-cxxfilt` filter as part 
of the change to use static create methods that will be removing these lines 
anyway.  

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

Reply via email to