[all-commits] [llvm/llvm-project] 46d538: [HLSL] Add `InterlockedCompareStore` function and ...

Joshua Batista via All-commits all-commits at lists.llvm.org
Tue Sep 29 12:37:25 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 46d53887a4e5815ae5ff3567c6dc31b6c68190ef
      https://github.com/llvm/llvm-project/commit/46d53887a4e5815ae5ff3567c6dc31b6c68190ef
  Author: Joshua Batista <jbatista at microsoft.com>
  Date:   2026-09-29 (Tue, 29 Sep 2026)

  Changed paths:
    M clang/include/clang/Basic/Builtins.td
    M clang/lib/CodeGen/CGHLSLBuiltins.cpp
    M clang/lib/Sema/HLSLBuiltinTypeDeclBuilder.cpp
    M clang/lib/Sema/HLSLBuiltinTypeDeclBuilder.h
    M clang/lib/Sema/HLSLExternalSemaSource.cpp
    M clang/lib/Sema/SemaHLSL.cpp
    A clang/test/CodeGenHLSL/builtins/InterlockedCompareStore.hlsl
    A clang/test/CodeGenHLSL/builtins/InterlockedVectorElement.hlsl
    M clang/test/CodeGenHLSL/builtins/RWBuffer-Interlocked.hlsl
    A clang/test/CodeGenHLSL/builtins/RWByteAddressBuffer-InterlockedCompareStore.hlsl
    M clang/test/CodeGenHLSL/builtins/RWTexture-Interlocked.hlsl
    A clang/test/CodeGenHLSL/builtins/RasterizerOrderedByteAddressBuffer-InterlockedCompareStore.hlsl
    A clang/test/SemaHLSL/BuiltIns/ByteAddressBuffer-InterlockedCompareStore-sm65-errors.hlsl
    A clang/test/SemaHLSL/BuiltIns/InterlockedCompareStore-errors.hlsl
    M llvm/lib/Target/DirectX/DXILShaderFlags.cpp
    A llvm/test/CodeGen/DirectX/ResourceAtomicCompareStore.ll
    A llvm/test/CodeGen/DirectX/ShaderFlags/atomic64-typed-resource-cmpxchg.ll

  Log Message:
  -----------
  [HLSL] Add `InterlockedCompareStore` function and resource methods (#222164)

This PR adds the `InterlockedCompareStore` standalone function and
resource
methods. The operation lowers to `cmpxchg monotonic`.

`InterlockedCompareStore` reports nothing, so the `cmpxchg` result stays
unused. The PR adds a compare overload shape to `HLSLExternalSemaSource`
and a
matching resource method helper, which the `InterlockedCompareExchange`
PR
above it reuses.

The PR also adds the 64-bit `InterlockedCompareStore64` methods, which
DXIL
gates on shader model 6.6.

Fixes: https://github.com/llvm/llvm-project/issues/99128
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