Skip to content

Conversation

@bogner
Copy link
Contributor

@bogner bogner commented Oct 23, 2025

CBuffers still need a layout type for now. Fix the crash when looking up the cbuffer info.

CBuffers still need a layout type for now. Fix the crash when looking up
the cbuffer info.
@llvmbot
Copy link
Member

llvmbot commented Oct 23, 2025

@llvm/pr-subscribers-backend-directx

Author: Justin Bogner (bogner)

Changes

CBuffers still need a layout type for now. Fix the crash when looking up the cbuffer info.


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

1 Files Affected:

  • (modified) llvm/test/CodeGen/DirectX/CBufferAccess/unused.ll (+1-1)
diff --git a/llvm/test/CodeGen/DirectX/CBufferAccess/unused.ll b/llvm/test/CodeGen/DirectX/CBufferAccess/unused.ll
index 8c0d82e43b4b1..6f1bbd050bd7c 100644
--- a/llvm/test/CodeGen/DirectX/CBufferAccess/unused.ll
+++ b/llvm/test/CodeGen/DirectX/CBufferAccess/unused.ll
@@ -2,7 +2,7 @@
 ; Check that we correctly ignore cbuffers that were nulled out by optimizations.
 
 %__cblayout_CB = type <{ float }>
-@CB.cb = local_unnamed_addr global target("dx.CBuffer", %__cblayout_CB) poison
+@CB.cb = local_unnamed_addr global target("dx.CBuffer", target("dx.Layout", %__cblayout_CB, 4, 0)) poison
 @x = external local_unnamed_addr addrspace(2) global float, align 4
 
 ; CHECK-NOT: !hlsl.cbs =

@bogner bogner enabled auto-merge (squash) October 23, 2025 16:56
@bogner bogner merged commit 2b42c6c into llvm:main Oct 23, 2025
12 of 13 checks passed
dvbuka pushed a commit to dvbuka/llvm-project that referenced this pull request Oct 27, 2025
…164844)

CBuffers still need a layout type for now. Fix the crash when looking up
the cbuffer info.
Lukacma pushed a commit to Lukacma/llvm-project that referenced this pull request Oct 29, 2025
…164844)

CBuffers still need a layout type for now. Fix the crash when looking up
the cbuffer info.
aokblast pushed a commit to aokblast/llvm-project that referenced this pull request Oct 30, 2025
…164844)

CBuffers still need a layout type for now. Fix the crash when looking up
the cbuffer info.
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