[all-commits] [llvm/llvm-project] 33fcd7: [HLSL] Add `InterlockedMax` function and resource ...
Joshua Batista via All-commits
all-commits at lists.llvm.org
Mon Sep 21 17:54:32 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 33fcd70991316e238e63684cd4018f618d690668
https://github.com/llvm/llvm-project/commit/33fcd70991316e238e63684cd4018f618d690668
Author: Joshua Batista <jbatista at microsoft.com>
Date: 2026-09-21 (Mon, 21 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/HLSLExternalSemaSource.cpp
M clang/lib/Sema/SemaHLSL.cpp
A clang/test/CodeGenHLSL/builtins/InterlockedMax.hlsl
M clang/test/CodeGenHLSL/builtins/RWBuffer-Interlocked.hlsl
A clang/test/CodeGenHLSL/builtins/RWByteAddressBuffer-InterlockedMax.hlsl
M clang/test/CodeGenHLSL/builtins/RWTexture-Interlocked.hlsl
A clang/test/CodeGenHLSL/builtins/RasterizerOrderedByteAddressBuffer-InterlockedMax.hlsl
A clang/test/SemaHLSL/BuiltIns/ByteAddressBuffer-InterlockedMax-errors.hlsl
A clang/test/SemaHLSL/BuiltIns/ByteAddressBuffer-InterlockedMax-sm65-errors.hlsl
A clang/test/SemaHLSL/BuiltIns/InterlockedMax-errors.hlsl
Log Message:
-----------
[HLSL] Add `InterlockedMax` function and resource methods (#222160)
This PR adds the `InterlockedMax` standalone function and resource
methods.
It mimics the implementation of the `InterlockedMin` function and
resource
methods.
Like `min`, `max` is signedness aware. A signed operand lowers to
`atomicrmw max` and an unsigned operand lowers to `atomicrmw umax`. This
matches DXC, which selects between the `IMax` and `UMax` atomic binary
operations.
The PR also adds the 64-bit `InterlockedMax64` methods, which DXIL gates
on
shader model 6.6.
Fixes: https://github.com/llvm/llvm-project/issues/99124
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