Helena Kotas ddf8cd3c6c
[HLSL][DirectX] Remove uniformity bit from resource initialization intrinsics (#155332)
Removes uniformity bit from resource initialization intrinsics `llvm.{dx|spv}.resource.handlefrombinding` and `llvm.{dx|spv}.resource.handlefromimplicitbinding`. The flag currently always set to `false`. It should be derived from resource analysis and not provided by codegen.

Closes #135452
2025-08-28 09:12:36 -07:00

20 lines
623 B
LLVM

; Regression test for https://github.com/llvm/llvm-project/issues/128560 -
; check that cbuffers are populated correctly when there aren't any other kinds
; of resource.
; RUN: opt -S -passes=dxil-translate-metadata %s | FileCheck %s
target triple = "dxil-pc-shadermodel6.6-compute"
define void @cbuffer_is_only_binding() {
%cbuf = call target("dx.CBuffer", target("dx.Layout", {float}, 4, 0))
@llvm.dx.resource.handlefrombinding(i32 1, i32 8, i32 1, i32 0, ptr null)
; CHECK: %CBuffer = type { float }
ret void
}
; CHECK: @[[CB0:.*]] = external constant %CBuffer
; CHECK: !{i32 0, ptr @[[CB0]], !""