[llvm] 2b42c6c - [DirectX] Use a well-formed cbuffer in the unused cbuffer test (#164844)

via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 23 10:19:22 PDT 2025


Author: Justin Bogner
Date: 2025-10-23T17:19:17Z
New Revision: 2b42c6c163f8520e5a279d6b995907ab606c8600

URL: https://github.com/llvm/llvm-project/commit/2b42c6c163f8520e5a279d6b995907ab606c8600
DIFF: https://github.com/llvm/llvm-project/commit/2b42c6c163f8520e5a279d6b995907ab606c8600.diff

LOG: [DirectX] Use a well-formed cbuffer in the unused cbuffer test (#164844)

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

Added: 
    

Modified: 
    llvm/test/CodeGen/DirectX/CBufferAccess/unused.ll

Removed: 
    


################################################################################
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 }>
- at CB.cb = local_unnamed_addr global target("dx.CBuffer", %__cblayout_CB) poison
+ at 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 =


        


More information about the llvm-commits mailing list