Skip to content

[DirectX] llvm.lifetime.start/.end intrinsics should not be emitted in DXIL versions < 1.6 #147394

@Icohedron

Description

@Icohedron

llvm.lifetime.start/.end intrinsics are only supported in DXIL version 1.6 and later.
Currently Clang allows these intrinsics to be emitted in unsupported shader models, such as this example: https://godbolt.org/z/3Wx8zsn1e

For DXIL version < 1.6, lifetime intrinsics should be replaced with stores of 0 or undef as in DXC:
https://github.com/microsoft/DirectXShaderCompiler/blob/d751c827ed3b61e87fdf57d0f424cb2d7af30cd0/lib/HLSL/DxilPreparePasses.cpp#L693-L699

Metadata

Metadata

Assignees

Type

Projects

Status

Closed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions