[all-commits] [llvm/llvm-project] 2ed7fa: [DirectX] Support `cmpxchg` on buffer resources in...
Joshua Batista via All-commits
all-commits at lists.llvm.org
Thu Sep 24 11:13:14 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2ed7fafcb06c8c314fc5d88580a93a50e9054d1a
https://github.com/llvm/llvm-project/commit/2ed7fafcb06c8c314fc5d88580a93a50e9054d1a
Author: Joshua Batista <jbatista at microsoft.com>
Date: 2026-09-24 (Thu, 24 Sep 2026)
Changed paths:
M llvm/include/llvm/IR/IntrinsicsDirectX.td
M llvm/lib/Target/DirectX/DXIL.td
M llvm/lib/Target/DirectX/DXILOpLowering.cpp
M llvm/lib/Target/DirectX/DXILResourceAccess.cpp
A llvm/test/CodeGen/DirectX/ResourceAtomicCompareExchange-i64-sm65.ll
A llvm/test/CodeGen/DirectX/ResourceAtomicCompareExchange-texture-nonscalar.ll
A llvm/test/CodeGen/DirectX/ResourceAtomicCompareExchange-texture-unsupported-kind.ll
A llvm/test/CodeGen/DirectX/ResourceAtomicCompareExchange-texture.ll
A llvm/test/CodeGen/DirectX/ResourceAtomicCompareExchange-unsupported-result.ll
A llvm/test/CodeGen/DirectX/ResourceAtomicCompareExchange.ll
Log Message:
-----------
[DirectX] Support `cmpxchg` on buffer resources in DXIL lowering (#222162)
This PR is a backend change alone. It teaches DXIL lowering to handle a
`cmpxchg` on a buffer resource pointer, which the
`InterlockedCompareStore`
and `InterlockedCompareExchange` PRs above it in this stack need.
The PR adds:
- the `llvm.dx.resource.atomic.compare.exchange` intrinsic,
- its DXIL operation and op lowering,
- the `DXILResourceAccess` handling that turns a `cmpxchg` on a value
returned by `llvm.dx.resource.getpointer` into that intrinsic.
DXIL has no atomic compare exchange for texture resources, so the pass
reports an error for them. A test covers that path.
There is no Clang change here, and no HLSL function becomes available.
Assisted by: Github Copilot
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