20 lines · plain
1; Regression test for https://github.com/llvm/llvm-project/issues/128560 -2; check that cbuffers are populated correctly when there aren't any other kinds3; of resource.4 5; RUN: opt -S -passes=dxil-translate-metadata %s | FileCheck %s6 7target triple = "dxil-pc-shadermodel6.6-compute"8 9define void @cbuffer_is_only_binding() {10 %cbuf = call target("dx.CBuffer", <{ float }>)11 @llvm.dx.resource.handlefrombinding(i32 1, i32 8, i32 1, i32 0, ptr null)12 ; CHECK: %CBuffer = type { float }13 14 ret void15}16 17; CHECK: @[[CB0:.*]] = external constant %CBuffer18 19; CHECK: !{i32 0, ptr @[[CB0]], !""20