Skip to content

Conversation

@hekota
Copy link
Member

@hekota hekota commented May 19, 2025

Adds checks for resource globals that were created for DXIL metadata. The names of the globals and the names of the types will be changing soon. Adding these to the baseline will make it easier to see what is changing.

@hekota hekota marked this pull request as ready for review May 19, 2025 20:58
@llvmbot
Copy link
Member

llvmbot commented May 19, 2025

@llvm/pr-subscribers-backend-directx

Author: Helena Kotas (hekota)

Changes

Adds checks for resource globals that were created for DXIL metadata. The names of the globals and the names of the types will be changing soon. Adding these to the baseline will make it easier to see what is changing.


Full diff: https://github.com/llvm/llvm-project/pull/140620.diff

2 Files Affected:

  • (modified) llvm/test/CodeGen/DirectX/Metadata/srv_metadata.ll (+9)
  • (modified) llvm/test/CodeGen/DirectX/Metadata/uav_metadata.ll (+12)
diff --git a/llvm/test/CodeGen/DirectX/Metadata/srv_metadata.ll b/llvm/test/CodeGen/DirectX/Metadata/srv_metadata.ll
index 63ead534f1276..03c801ff0372f 100644
--- a/llvm/test/CodeGen/DirectX/Metadata/srv_metadata.ll
+++ b/llvm/test/CodeGen/DirectX/Metadata/srv_metadata.ll
@@ -84,6 +84,15 @@ define void @test() #0 {
 
 attributes #0 = { noinline nounwind "hlsl.shader"="compute" }
 
+; CHECK: @0 = external constant %TypedBuffer
+; CHECK: @1 = external constant %TypedBuffer.0
+; CHECK: @2 = external constant %TypedBuffer.1
+; CHECK: @3 = external constant %TypedBuffer.2
+; CHECK: @4 = external constant %ByteAddressBuffer
+; CHECK: @5 = external constant %StructuredBuffer
+; CHECK: @6 = external constant %TypedBuffer.3
+; CHECK: @7 = external constant %TypedBuffer.4
+
 ; CHECK: !dx.resources = !{[[ResList:[!][0-9]+]]}
 
 ; CHECK: [[ResList]] = !{[[SRVList:[!][0-9]+]], null, null, null}
diff --git a/llvm/test/CodeGen/DirectX/Metadata/uav_metadata.ll b/llvm/test/CodeGen/DirectX/Metadata/uav_metadata.ll
index e2f7cffb50f3c..98651e47d103d 100644
--- a/llvm/test/CodeGen/DirectX/Metadata/uav_metadata.ll
+++ b/llvm/test/CodeGen/DirectX/Metadata/uav_metadata.ll
@@ -108,6 +108,18 @@ define void @test() #0 {
 
 attributes #0 = { noinline nounwind "hlsl.shader"="compute" }
 
+; CHECK: @0 = external constant %RWTypedBuffer
+; CHECK: @1 = external constant %RWTypedBuffer.0
+; CHECK: @2 = external constant %RWTypedBuffer.1
+; CHECK: @3 = external constant %RWTypedBuffer.2
+; CHECK: @4 = external constant %RWByteAddressBuffer
+; CHECK: @5 = external constant %RWStructuredBuffer
+; CHECK: @6 = external constant %RasterizerOrderedTypedBuffer
+; CHECK: @7 = external constant %RasterizerOrderedStructuredBuffer
+; CHECK: @8 = external constant %RasterizerOrderedByteAddressBuffer
+; CHECK: @9 = external constant %RWTypedBuffer.3
+; CHECK: @10 = external constant %RWTypedBuffer.4
+
 ; CHECK: !dx.resources = !{[[ResList:[!][0-9]+]]}
 
 ; CHECK: [[ResList]] = !{null, [[UAVList:[!][0-9]+]], null, null}

@hekota hekota merged commit b586ddf into llvm:main May 19, 2025
16 checks passed
@hekota hekota deleted the add-res-type-names-to-test branch August 19, 2025 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants