[clang] [HLSL] Checks store instructions in resource binding test (PR #124866)
Helena Kotas via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 28 17:16:45 PST 2025
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/124866
None
>From 402e768521b33c7d1758d6aca2ff13741551cf4f Mon Sep 17 00:00:00 2001
From: Helena Kotas <hekotas at microsoft.com>
Date: Tue, 28 Jan 2025 17:16:02 -0800
Subject: [PATCH] [HLSL] Checks store instructions in resource binding test
---
clang/test/CodeGenHLSL/resource-bindings.hlsl | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/clang/test/CodeGenHLSL/resource-bindings.hlsl b/clang/test/CodeGenHLSL/resource-bindings.hlsl
index bfa7896bd98114..57e8cc29572b1f 100644
--- a/clang/test/CodeGenHLSL/resource-bindings.hlsl
+++ b/clang/test/CodeGenHLSL/resource-bindings.hlsl
@@ -2,14 +2,17 @@
// CHECK: define internal void @_init_resource_U0S0()
// CHECK: %U0S0_h = call target("dx.TypedBuffer", <4 x float>, 1, 0, 0) @llvm.dx.resource.handlefrombinding.tdx.TypedBuffer_v4f32_1_0_0t(i32 0, i32 0, i32 1, i32 0, i1 false)
+// CHECK: store target("dx.TypedBuffer", <4 x float>, 1, 0, 0) %U0S0_h, ptr @U0S0, align 4
RWBuffer<float4> U0S0 : register(u0);
// CHECK: define internal void @_init_resource_U5S3()
// CHECK: %U5S3_h = call target("dx.TypedBuffer", float, 1, 0, 0) @llvm.dx.resource.handlefrombinding.tdx.TypedBuffer_f32_1_0_0t(i32 3, i32 5, i32 1, i32 0, i1 false)
+// CHECK: store target("dx.TypedBuffer", float, 1, 0, 0) %U5S3_h, ptr @U5S3, align 4
RWBuffer<float> U5S3 : register(u5, space3);
// CHECK: define internal void @_init_resource_T2S2()
// CHECK: %T2S2_h = call target("dx.RawBuffer", i32, 0, 0) @llvm.dx.resource.handlefrombinding.tdx.RawBuffer_i32_0_0t(i32 2, i32 2, i32 1, i32 0, i1 false)
+// CHECK: store target("dx.RawBuffer", i32, 0, 0) %T2S2_h, ptr @T2S2, align 4
StructuredBuffer<int> T2S2 : register(t2, space2);
struct S {
float4 f;
@@ -18,6 +21,7 @@ struct S {
// CHECK: define internal void @_init_resource_T3S0()
// CHECK: %T3S0_h = call target("dx.RawBuffer", %struct.S, 0, 0) @llvm.dx.resource.handlefrombinding.tdx.RawBuffer_s_struct.Ss_0_0t(i32 0, i32 3, i32 1, i32 0, i1 false)
+// CHECK: store target("dx.RawBuffer", %struct.S, 0, 0) %T3S0_h, ptr @T3S0, align 4
StructuredBuffer<S> T3S0 : register(t3);
// CHECK: define void @main()
More information about the cfe-commits
mailing list