From c9ea2aefeed95970890f63a631e5461db4a8379b Mon Sep 17 00:00:00 2001 From: Justin Bogner Date: Thu, 23 Oct 2025 09:47:34 -0700 Subject: [PATCH] [DirectX] Use a well-formed cbuffer in the unused cbuffer test CBuffers still need a layout type for now. Fix the crash when looking up the cbuffer info. --- llvm/test/CodeGen/DirectX/CBufferAccess/unused.ll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 =