Issue 147395
Summary [DirectX] `llvm.lifetime.start/.end` intrinsics are not properly encoded in DXIL bitcode
Labels new issue
Assignees
Reporter Icohedron
    DXIL bitcode containing `llvm.lifetime.start/end` intrinsics emitted by Clang currently fail to validate under the DXIL validator (dxv). The encoding should be fixed to allow the validator and dxil-dis to read them properly.

Sample shader that Clang emits lifetime intrinsics for
```hlsl
uint2 Foo(uint2 a[2], uint i) {
  return a[i];
}
cbuffer Constants {
  uint2 arr[2];
}
RWStructuredBuffer<uint> output;
[numthreads(1, 1, 1)]
void CSMain(uint3 Tid : SV_DispatchThreadID) {
  output[0] = Foo(arr, Tid.x).x;
}
```
https://godbolt.org/z/haz47M8fz
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to