[all-commits] [llvm/llvm-project] d47c12: [DirectX] Lower `llvm.lifetime.*` intrinsics to st...

Deric C. via All-commits all-commits at lists.llvm.org
Tue Jul 8 14:45:36 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d47c126fbf7915c01ea112ae372fe8835df4379f
      https://github.com/llvm/llvm-project/commit/d47c126fbf7915c01ea112ae372fe8835df4379f
  Author: Deric C. <cheung.deric at gmail.com>
  Date:   2025-07-08 (Tue, 08 Jul 2025)

  Changed paths:
    M llvm/lib/Target/DirectX/DXILOpLowering.cpp
    A llvm/test/CodeGen/DirectX/legalize-lifetimes-valver-1.5.ll
    A llvm/test/CodeGen/DirectX/legalize-lifetimes-valver-1.6.ll
    R llvm/test/CodeGen/DirectX/legalize-lifetimes.ll

  Log Message:
  -----------
  [DirectX] Lower `llvm.lifetime.*` intrinsics to stores when DXIL version is lower than 1.6 (#147432)

Fixes #147394

References DXC for the implementation logic:

https://github.com/microsoft/DirectXShaderCompiler/blob/d751c827ed3b61e87fdf57d0f424cb2d7af30cd0/lib/HLSL/DxilPreparePasses.cpp#L693-L699

If DXIL Version < 1.6 then replace lifetime intrinsics with stores

- For validator version >= 1.6, store an undef
- For validator version < 1.6, store zeros

else keep the lifetime intrinsics in the DXIL.

After this PR, the number of DML shaders failing validation due to
#146974 is reduced from 157 to 50.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list