================
@@ -1126,6 +1126,23 @@ void case26(TwoInts TI) {
float4 F = float4(TI, 1, 2);
float3 F2 = float3(3, TI);
}
+
+using handle_float_t = __hlsl_resource_t [[hlsl::resource_class(UAV)]]
[[hlsl::contained_type(float)]];
+
+struct CustomResource {
+ handle_float_t h;
+};
+
+// CHECK-LABEL: define hidden void @_Z6case2714CustomResource
+// CHECK: [[b:%.*]] = alloca %struct.CustomResource, align 1
+// CHECK: [[h:%.*]] = getelementptr inbounds nuw %struct.CustomResource, ptr
[[b]], i32 0, i32 0
+// CHECK: [[h1:%.*]] = getelementptr inbounds nuw %struct.CustomResource, ptr
%a, i32 0, i32 0
+// CHECK: [[Z:%.*]] = load target("dx.TypedBuffer", float, 1, 0, 0), ptr
[[h1]], align 1
+// CHECK: store target("dx.TypedBuffer", float, 1, 0, 0) %0, ptr [[h]], align 1
+// CHECK: ret void
----------------
Icohedron wrote:
nit: This test uses `CHECK` instead of `CHECK-NEXT` like the other tests, which
suggests you didn't use the script mentioned at the top of the file to
autogenerate these checks.
```
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
UTC_ARGS: --version 5
```
https://github.com/llvm/llvm-project/pull/187813
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits