LLVM/project b02dbdd — clang/include/clang/Options Options.td, flang/test/Driver lto-opt-level.f90

[flang][Driver] Enable bare -O flag alias when specified with -flto (#228483)

Currently, `O_flag` (`-O` as an alias for `-O1`) in Options.td is not
visible to FlangOption. As a result, invoking flang with a bare `-O` 
(without a trailing digit) is treated by the joined `-O` definition as 
`-O""`, causing an error when forwarded to the linker.

Add `FlangOption` to `O_flag`'s Visibility so that `flang -O` correctly
aliases to `-O1`.

Assisted-by: IBM Bob

Resolve https://github.com/llvm/llvm-project/issues/227474
DeltaFile
+27-0flang/test/Driver/lto-opt-level.f90
+1-1clang/include/clang/Options/Options.td
+28-12 files

LLVM/project d19f7e8 — compiler-rt/lib/scudo/standalone list.h, compiler-rt/lib/scudo/standalone/tests list_test.cpp

[scudo] Validate list endpoints and links before removing a node (#229245)

`DoublyLinkedList::remove()` currently modifies the predecessor's link
before validating the successor's reciprocal link, and checks endpoint
consistency only in debug builds. A corrupted successor can therefore be
rejected after a list write has already occurred, while inconsistent
null links can bypass endpoint checks in release builds.

Check that the list is nonempty, enforce endpoint consistency in release
builds, and validate both reciprocal links before modifying any list
state. The production change is confined to `remove()`. This strengthens
consistency checks; it does not authenticate list membership or protect
against mutually consistent forged interior nodes.

Tests cover all 24 removal orders of four nodes, plus empty-list
removal, both directions of endpoint inconsistency, and corrupted
reciprocal links, using pointer and index links.

Local validation on Linux x86_64 in WSL, Clang 21.1.8:

    [23 lines not shown]
DeltaFile
+76-0compiler-rt/lib/scudo/standalone/tests/list_test.cpp
+14-19compiler-rt/lib/scudo/standalone/list.h
+90-192 files

LLVM/project 0904551 — llvm/lib/Target/AMDGPU AMDGPUTargetTransformInfo.cpp, llvm/test/Analysis/UniformityAnalysis/AMDGPU workitem-intrinsics.ll

[AMDGPU] Require wave ID masks to be constants (#229917)

PR #177713 added some cases to the wave ID recognizer, such
as (ThreadID & Mask) >> log2(WaveSize) but, after it landed, Claude
noticed a bug. `Mask` in those types of expressions was an arbitrary
vale, which could be divergent, meaning that the "uniform" value of
that expression wouldn't actually be uniform.

The quick fix that preserves most of the cases we're worried about in
practice is to restrict these patterns to constant masks.

AI disclosure: Claude found the issue and created the patch, I wrote
this message.

Co-Authored-By: Claude Opus 5 (1M context) <noreply at anthropic.com>

Co-authored-by: Claude Opus 5 (1M context) <noreply at anthropic.com>
DeltaFile
+5-5llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
+6-3llvm/test/Analysis/UniformityAnalysis/AMDGPU/workitem-intrinsics.ll
+2-5llvm/test/CodeGen/AMDGPU/uniform-load-from-tid.ll
+13-133 files

LLVM/project 5f3e81c — llvm/test/Analysis/UniformityAnalysis/AMDGPU workitem-intrinsics.ll, llvm/test/CodeGen/AMDGPU uniform-load-from-tid.ll

[AMDGPU][NFC] Pre-commit tests to not match non-constant wave ID masks (#229916)

Non-constant masks can cause divergences even if we're shifting the
divergent part of a thread ID, and we didn't account for that in the
pattern matches.

AI disclosure: Claude found these and wrote the tests

Co-Authored-By: Claude Opus 5 (1M context) <noreply at anthropic.com>

Co-authored-by: Claude Opus 5 (1M context) <noreply at anthropic.com>
DeltaFile
+50-0llvm/test/Analysis/UniformityAnalysis/AMDGPU/workitem-intrinsics.ll
+23-0llvm/test/CodeGen/AMDGPU/uniform-load-from-tid.ll
+73-02 files

LLVM/project cbc3875 — clang/lib/AST/ByteCode Interp.cpp

[clang][bytecode] disable tail calls on mips (#229679)

As for the other architectures, this caused a Clang build for MIPS to
fail.
DeltaFile
+3-2clang/lib/AST/ByteCode/Interp.cpp
+3-21 files

LLVM/project 09b37b8 — llvm/lib/Frontend/OpenMP OMPIRBuilder.cpp, llvm/unittests/Frontend OpenMPIRBuilderTest.cpp

Use block identity to find escapes in createIteratorLoop

createIteratorLoop decided that a branch target was outside the loop body
by comparing block numbers with a snapshot taken before the body generator
ran. Block numbers can change: renumbering tripped an assertion, and a
pre-existing block moved within the function got a new number and was
treated as part of the body.

Record the blocks that exist before the body generator runs instead, and
reject branches to any of them other than the body and the latch. Add tests
for renumbering, a moved block, and a callback-created block that branches
to the loop exit.
DeltaFile
+76-0llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp
+6-7llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+82-72 files

LLVM/project 85b4fbf — llvm/lib/Target/Mips MipsFastISel.cpp, llvm/test/CodeGen/Mips/Fast-ISel private-fn.ll

[Mips][FastISel] Also add low part when materializing private functions (#229717)

I have no idea why the code was explicitly written to exclude private
functions; it seems obviously incorrect to me.
DeltaFile
+21-0llvm/test/CodeGen/Mips/Fast-ISel/private-fn.ll
+1-2llvm/lib/Target/Mips/MipsFastISel.cpp
+22-22 files

LLVM/project dc488b8 — clang/docs ReturnAddressAuthenticationHardening.md, clang/include/clang/Basic TargetInfo.h

[Clang][AArch64] Command-line options for A-profile's Return Address Authentication Hardening (#176171)

This patch introduces a new command-line option to enable the AArch64
A-profile's Return Address Authentication Hardening. It also introduces
a new function attribute with the same naming as the new command-line
option.

At the time of this patch, this new option enables the hardening against
the PACMAN attack [1] using a load from the return address [2].

The new option, -mharden-pac-ret, can take one of two values:

 - none: disable hardening. (The default if the option is absent)
- load-return-address: enables hardening using the mitigation based on
load from return address.

The corresponding function attribute takes the option and its possible
values using the same naming. Also, the function attributes take
precedence over the command-line options.

    [6 lines not shown]
DeltaFile
+161-0clang/docs/ReturnAddressAuthenticationHardening.md
+91-0clang/test/Sema/aarch64-harden-pac-ret-attr.c
+45-30clang/test/CodeGen/AArch64/sign-return-address.c
+60-0clang/test/Driver/aarch64-security-options.c
+46-6clang/lib/Driver/ToolChains/Clang.cpp
+26-3clang/include/clang/Basic/TargetInfo.h
+429-3922 files not shown
+642-5328 files

LLVM/project 58a1716 — lldb/examples/python formatter_bytecode.py, lldb/test/Shell/ScriptInterpreter/Python/Inputs/FormatterBytecode RigidArrayLLDBFormatterC.txt RigidArrayLLDBFormatterSwift.txt

[lldb] Update formatter_bytecode.py to ABI version 2 (#229923)

Update the assembler and the Python to bytecode compiler to target the
version 2 formatter ABI, in which `self` is a Dictionary owned by LLDB
and passed as the first argument to every synthetic method.

The primary feature of this change is the separation of storage, locals
are on the stack, attributes are stored in the `self` Dictionary. Since
locals and attrs no longer intermingle in the stack, local variables are
now allowed in `__init__` and `update`, and attributes can be
reassigned.

In the compiler:

* `self.x = expr` is compiled to `0 pick "x" <expr> dict_set`
* `self.x` is compiled to `0 pick "x" dict_get`
* Arguments and local variables are on the stack above `self`

Assisted-by: claude
DeltaFile
+164-59lldb/examples/python/formatter_bytecode.py
+15-9lldb/test/Shell/ScriptInterpreter/Python/Inputs/FormatterBytecode/RigidArrayLLDBFormatterSwift.txt
+14-8lldb/test/Shell/ScriptInterpreter/Python/Inputs/FormatterBytecode/RigidArrayLLDBFormatterC.txt
+193-763 files

LLVM/project e5b8c97 — llvm/include/llvm/Frontend/OpenMP OMPIRBuilder.h, llvm/lib/Frontend/OpenMP OMPIRBuilder.cpp

[OpenMP][OMPIRBuilder] Allow multi-block bodies in createIteratorLoop

createIteratorLoop requires the body generator to leave a single block that
falls through or branches to the loop latch. A body generator that lowers
expressions with their own control flow cannot meet that requirement. The
upcoming user is omp.iterator translation, once its region can contain
several blocks (#227454).

Allow the body to span several blocks. If exactly one block is left without
a terminator, it is branched to the latch; otherwise some block must already
branch there. Bodies that leave more than one block unterminated, or that
branch out of the loop, are rejected with an error.

Assisted with Copilot and Claude Opus 5.
DeltaFile
+160-1llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp
+42-12llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+7-4llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
+209-173 files

LLVM/project 97aa2ae — orc-rt/include/orc-rt/bedrock Session.h, orc-rt/lib/bedrock Session.cpp

[orc-rt] Make Session's constructor noexcept. (#229962)

Session's constructor shouldn't be throwing exceptions.
DeltaFile
+1-1orc-rt/lib/bedrock/Session.cpp
+1-1orc-rt/include/orc-rt/bedrock/Session.h
+2-22 files

LLVM/project cfd532c — llvm/lib/Transforms/InstCombine InstCombineMulDivRem.cpp, llvm/test/Transforms/InstCombine fdiv.ll

[InstCombine] Fold fdiv by splat of pow/exp/powi into fmul (#227238)

Extend foldFDivPowDivisor to look through a one-use splat divisor. The
exponent is negated on the scalar and the result is splatted again:

$$\frac{Z}{\mathrm{splat}(x^{y})} \to Z \cdot \mathrm{splat}(x^{-y})$$

$$\frac{Z}{\mathrm{splat}(e^{y})} \to Z \cdot \mathrm{splat}(e^{-y})$$

$$\frac{Z}{\mathrm{splat}(2^{y})} \to Z \cdot \mathrm{splat}(2^{-y})$$

$$\frac{Z}{\mathrm{splat}(x^{n})} \to Z \cdot \mathrm{splat}(x^{-n}),
\quad n \in \mathbb{Z}\ (\mathrm{powi})$$

Same FMF requirements as the scalar fold: reassoc and arcp, plus ninf
for powi. This removes the reciprocal, e.g. v_rcp on AMDGPU.

AMDGPU example: https://godbolt.org/z/nvWc38GTx
DeltaFile
+28-10llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
+15-10llvm/test/Transforms/InstCombine/fdiv.ll
+43-202 files

LLVM/project ad97dfd — orc-rt/include/orc-rt/support SymbolLookupSet.h, orc-rt/include/orc-rt/support/sps SPSSymbolLookupSet.h

[orc-rt] Add SymbolLookupFlags and SymbolLookupSet utilities (#229958)

Move NativeDylibManager's nested LookupFlags enum and SymbolLookupSet
typedef out into reusable support utilities:

- SymbolLookupFlags.h: enum class SymbolLookupFlags, with the existing
RequiredSymbol and WeaklyReferencedSymbol values.
- SymbolLookupSet.h: SymbolLookupSet and SymbolLookupResult, thin
wrappers around std::vector<std::pair<std::string, SymbolLookupFlags>>
and std::vector<std::optional<void*>> respectively.
- sps/SPSSymbolLookupSet.h: SPS serialization for all three. The flags
serialization (previously private to NativeDylibManagerSPSCI.cpp, and
duplicated in its unit test) is unchanged: RequiredSymbol serializes as
true, matching llvm::orc::RemoteSymbolLookupSetElement's 'Required'
field.

NativeDylibManager::lookup now takes a SymbolLookupSet and reports a
SymbolLookupResult, and sys::lookupLibrarySymbols takes the
SymbolLookupSet directly, saving lookup a copy of the names.

Assisted-by: Claude
DeltaFile
+94-0orc-rt/include/orc-rt/support/SymbolLookupSet.h
+92-0orc-rt/include/orc-rt/support/sps/SPSSymbolLookupSet.h
+84-0orc-rt/test/unit/support/SymbolLookupSetTest.cpp
+74-0orc-rt/test/unit/support/sps/SPSSymbolLookupSetTest.cpp
+10-46orc-rt/test/unit/bedrock/sps/NativeDylibManagerSPSCITest.cpp
+1-31orc-rt/lib/bedrock/sps/NativeDylibManagerSPSCI.cpp
+355-779 files not shown
+420-12215 files

LLVM/project b29df80 — clang/test/CIR/IR coro-alloc.cir coro-id.cir

[CIR][NFC] Add round trip tests for coroutine intrinsics (#229947)

Add round-trip tests for coroutine intrinsics

The tests cover the following intrinsics:

* `coro.alloc`
* `coro.begin`
* `coro.destroy`
* `coro.done`
* `coro.end`
* `coro.free`
* `coro.id`
* `coro.promise`
* `coro.resume`
DeltaFile
+16-0clang/test/CIR/IR/coro-end.cir
+16-0clang/test/CIR/IR/coro-promise.cir
+15-0clang/test/CIR/IR/coro-id.cir
+15-0clang/test/CIR/IR/coro-begin.cir
+15-0clang/test/CIR/IR/coro-free.cir
+14-0clang/test/CIR/IR/coro-alloc.cir
+91-03 files not shown
+133-09 files

LLVM/project 25da5b6 — clang/include/clang/CIR/Dialect/IR CIROps.td, clang/lib/CIR/CodeGen CIRGenFunction.h CIRGenBuiltin.cpp

[CIR] Add cir.coro.suspend intrinsic (#228310)

Implement `cir.coro.suspend` and lower __builtin_coro_suspend to the CIR
coroutine suspend intrinsic.
DeltaFile
+30-2clang/test/CIR/CodeGenCoroutines/coro-builtins.cpp
+26-0clang/include/clang/CIR/Dialect/IR/CIROps.td
+15-0clang/test/CIR/IR/coro-suspend.cir
+10-0clang/lib/CIR/CodeGen/CIRGenCoroutine.cpp
+5-3clang/lib/CIR/CodeGen/CIRGenBuiltin.cpp
+1-0clang/lib/CIR/CodeGen/CIRGenFunction.h
+87-56 files

LLVM/project b2bf9e6 — llvm/include/llvm/CodeGen SlotIndexes.h, llvm/lib/CodeGen RegAllocGreedy.cpp LiveIntervals.cpp

[CodeGen] Drop dead SlotIndexes before allocation

SlotIndexes keeps the index list entry of an erased instruction and only
clears its instruction pointer. Live range sizes are measured in slot
indexes and greedy ranks ranges by size, so the leftovers inflate some
ranges more than others and reorder allocation, spilling heavily on
register-starved functions.

Add SlotIndexes::compactIndexes() to erase them. Erased entries are
unlinked, so LiveIntervals first reports the indexes it holds via
appendReferencedIndexes().

Off by default behind -greedy-compact-slot-indexes, since it changes
allocation across much of the test suite.
DeltaFile
+221-0llvm/unittests/CodeGen/SlotIndexesTest.cpp
+46-0llvm/lib/CodeGen/SlotIndexes.cpp
+32-0llvm/test/CodeGen/AMDGPU/greedy-compact-slot-indexes.ll
+23-6llvm/include/llvm/CodeGen/SlotIndexes.h
+29-0llvm/lib/CodeGen/LiveIntervals.cpp
+12-1llvm/lib/CodeGen/RegAllocGreedy.cpp
+363-71 files not shown
+367-77 files

LLVM/project 1a5b507 — lldb/source/API SystemInitializerFull.cpp, lldb/source/Plugins/ScriptInterpreter/Python ScriptInterpreterPython.cpp

[lldb] Don't fail initialization when Python can't be loaded (#229891)

SystemInitializerFull::Initialize returns early when the Python runtime
loader fails, preventing remaining plugins (like the platform) to be
initialized.

Both with the statically and dynamically linked plugins, not finding
Python at that point is non-fatal. The error can be more appropriately
handled later, when initializing the plugin as all the subsystems (i.e.
logging) have been initialized.

rdar://188858954
DeltaFile
+10-12lldb/source/API/SystemInitializerFull.cpp
+12-0lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
+22-122 files

LLVM/project a95c073 — lldb/include/lldb/Utility ArchSpec.h, lldb/source/Plugins/Process/Utility StopInfoMachException.h StopInfoMachException.cpp

[lldb] Add support for arm64e.x1 (#229946)
DeltaFile
+51-0lldb/unittests/Utility/ArchSpecTest.cpp
+24-0lldb/source/Utility/ArchSpec.cpp
+23-0lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp
+2-0lldb/source/Plugins/Process/Utility/StopInfoMachException.h
+2-0lldb/include/lldb/Utility/ArchSpec.h
+102-05 files

LLVM/project cd4e847 — clang/test/AST attr-counted-by-or-null-struct-ptrs.c attr-sized-by-struct-ptrs.c, clang/test/Sema attr-sized-by-struct-ptrs.c attr-sized-by-or-null-struct-ptrs.c

Update tests
DeltaFile
+0-26clang/test/AST/attr-counted-by-struct-ptrs.c
+0-24clang/test/AST/attr-sized-by-struct-ptrs.c
+0-24clang/test/AST/attr-sized-by-or-null-struct-ptrs.c
+0-23clang/test/AST/attr-counted-by-or-null-struct-ptrs.c
+11-5clang/test/Sema/attr-sized-by-struct-ptrs.c
+11-5clang/test/Sema/attr-sized-by-or-null-struct-ptrs.c
+22-1074 files not shown
+56-12710 files

LLVM/project 7ff07ab — clang/lib/Sema SemaDecl.cpp SemaDeclAttr.cpp

[BoundsSafety] Handle the counted_by family as a type attribute

counted_by / sized_by (and their _or_null variants) were handled as a
declaration-position attribute through handleCountedByAttrField.

Build the type during type construction instead and properly handle as a
type-position attribute. Building the node in type position also allows
the new way of late-parsing for type attributes: creates a type node
in place and fills it in once late parsing is done, which will be
enabled in the follow-up commits.

Assisted-by: Opus 4.8
DeltaFile
+3-106clang/lib/Sema/SemaBoundsSafety.cpp
+63-3clang/lib/Sema/SemaType.cpp
+21-27clang/lib/Sema/SemaDeclAttr.cpp
+19-0clang/lib/Sema/SemaDecl.cpp
+106-1364 files

LLVM/project 15c983a — clang/test/CIR/IR invalid-register-exit-dtor.cir

[CIR] Address reviewer feedback

Assisted-by: Cursor / claude-opus-5-5
DeltaFile
+21-0clang/test/CIR/IR/invalid-register-exit-dtor.cir
+21-01 files

LLVM/project 6cc5b59 — clang/lib/CIR/Dialect/IR CIRDialect.cpp, clang/test/CIR/CodeGen try-catch.cpp

[CIR] Classify reference-to-pointer catch parameters in CIRGen (#229579)

When a handler catches a reference to a pointer, __cxa_begin_catch
returns the caught pointer by value instead of the address of the
exception object, and how the reference is bound depends on whether the
pointer points to a class. The CIR type of the catch parameter cannot
always tell whether it is a reference to a pointer, or whether the
pointee is a class. CIRGen now records both facts from the AST in two
new InitCatchKind values, reference_to_pointer and
reference_to_record_pointer. The Itanium EH lowering switches on the
kind alone, the way classic codegen does.

Assisted-by: Claude Code / Claude Opus 5.5
DeltaFile
+258-0clang/test/CIR/IR/invalid-init-catch-param.cir
+216-0clang/test/CIR/Transforms/eh-abi-lowering-catch-param-ref.cir
+198-8clang/test/CIR/CodeGen/try-catch.cpp
+173-0clang/test/CIR/IR/construct-catch-param.cir
+86-2clang/test/CIR/Transforms/eh-abi-lowering-construct-catch-invalid.cir
+82-4clang/lib/CIR/Dialect/IR/CIRDialect.cpp
+1,013-144 files not shown
+1,148-4610 files

LLVM/project 3991c3d — clang/bindings/python/clang cindex.py, clang/bindings/python/tests/cindex test_code_completion.py

[libclang/python] Fold CCRStructure into CodeCompletionResults (#224678)

This completes the fifth and last step of
https://github.com/llvm/llvm-project/issues/156680
This change is a follow-up to
https://github.com/llvm/llvm-project/pull/177764, following the release
branching, to ensure a one release-cycle deprecation period.
DeltaFile
+16-44clang/bindings/python/clang/cindex.py
+5-0clang/docs/ReleaseNotes.md
+0-2clang/bindings/python/tests/cindex/test_code_completion.py
+21-463 files

LLVM/project 683cd5f — libcxx/test/support test_allocator.h

[libcxx][test-support] Improve thread_unsafe_shared_ptr (#195932)

Adapting test support class `thread_unsafe_shared_ptr` for future use
with `fancy_pointer_allocator`, in particular, in constant evaluation.

* Implementing the rule of 5;
* Annotating `noexcept` methods
DeltaFile
+33-12libcxx/test/support/test_allocator.h
+33-121 files

LLVM/project ac2f555 — llvm/lib/Target/AArch64 AArch64ISelLowering.cpp, llvm/test/CodeGen/AArch64 aarch64-mixed-ptr-sizes.ll

[AArch64] Preserve store width for ptr32 address spaces (#229181)

When handling stores for `ptr32` address spaces, we didn't check if they
were already truncating stores and emitted an ordinary store. This
widened `i8` and `i16` writes to 32 bits and could overwrite adjacent
fields.

Fix is to build a truncating store that preserves the memory type.

Fixes #228782

Assisted-by: GPT-6 Sol (via VS Code)
DeltaFile
+48-3llvm/test/CodeGen/AArch64/aarch64-mixed-ptr-sizes.ll
+4-3llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+52-62 files

LLVM/project d84c1fe — lldb/include/lldb/Core Module.h, lldb/source/Core Module.cpp ModuleList.cpp

[lldb] Cache the symbol table for memory-read modules by default (#229305)

When lldb debugs a process on a remote system/device, there may be
binaries loaded in the process that it cannot find on the debug host. It
will read the object file header / load commands (mach-o terminology)
and symbol table out of memory at ObjectFile/Module creation time. The
symbol table may involve many separate reads to complete, and can be a
serious performance issue. We've traditionally worked hard to always
have binaries for the remote target present on the host computer,
because it was such a poor user experience, but in practice it's never
perfect.

This PR adds a new setting,
`symbols.enable-lldb-index-cache-memory-modules`, which is defaulted to
on. With this change, when lldb reads a remote binary out of memory, it
will create a DataFileCache symtab serialization of its symbol table on
the host computer.

I'm open to discussions about changing the expiration-days default. I

    [35 lines not shown]
DeltaFile
+154-0lldb/test/API/macosx/memory-read-module-symtab/TestMemoryReadModuleSymtab.py
+56-0lldb/test/API/macosx/memory-read-module-symtab/main.c
+6-6lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp
+8-4lldb/include/lldb/Core/Module.h
+12-0lldb/source/Core/ModuleList.cpp
+8-2lldb/source/Core/Module.cpp
+244-124 files not shown
+256-1510 files

LLVM/project 11edbd4 — libcxx/test/std/ranges/range.adaptors/range.concat/iterator ctor.default.pass.cpp

[libc++][test] Remove spurious `REQUIRES: has-fblocks` (#227972)

As drive-by, also update the lengthy `UNSUPPORTED` lit comment to
`REQUIRES: std-at-least-c++26`.
DeltaFile
+1-2libcxx/test/std/ranges/range.adaptors/range.concat/iterator/ctor.default.pass.cpp
+1-21 files

LLVM/project 736d4fc — clang/lib/CodeGen CGHLSLBuiltins.cpp, clang/lib/Sema HLSLExternalSemaSource.cpp

[HLSL] Allow Interlocked original values with different types (#228262)

Fix HLSL `Interlocked*` overloads to treat `original_value` as an `out`
parameter. This permits writeback conversions, including signedness
changes.

Add semantic and code generation regression tests.

Fixes #224151.
Assisted by: Github Copilot

---------

Copilot-Session: f6814fd7-47e6-4edf-af68-4a69514a2212
DeltaFile
+28-8clang/test/SemaHLSL/BuiltIns/InterlockedAdd-errors.hlsl
+28-5clang/test/CodeGenHLSL/builtins/InterlockedCompareExchange.hlsl
+19-0clang/test/CodeGenHLSL/builtins/InterlockedAdd.hlsl
+15-3clang/lib/Sema/HLSLExternalSemaSource.cpp
+14-2clang/lib/CodeGen/CGHLSLBuiltins.cpp
+8-3clang/test/SemaHLSL/BuiltIns/InterlockedCompareExchange-errors.hlsl
+112-217 files not shown
+166-3513 files

LLVM/project fe469af — llvm/lib/Target/AMDGPU AMDGPUTargetTransformInfo.cpp, llvm/test/Analysis/CostModel/AMDGPU fptrunc.ll

[AMDGPU] Price vector f32 to f16 fptrunc by its packing form

The base cost scalarizes the conversion and charges 4, 10, 22 and 46
for 2, 4, 8 and 16 lanes. The backend rounds every lane with
v_cvt_f16_f32 and packs the halves in pairs, which takes N + N/2
instructions. A packed conversion rounds a pair per instruction and
true16 writes a lane into either half of a register, which gives
ceil(N/2) and N.

Co-authored-by: Michael Selehov <michael.selehov at amd.com>
Assisted-By: Claude Code Opus 5
DeltaFile
+42-49llvm/test/Transforms/SLPVectorizer/AMDGPU/fptrunc-f16-stores.ll
+25-25llvm/test/Analysis/CostModel/AMDGPU/fptrunc.ll
+13-0llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
+80-743 files

LLVM/project c751631 — llvm/test/Analysis/CostModel/AMDGPU fptrunc.ll, llvm/test/Transforms/SLPVectorizer/AMDGPU fptrunc-f16-stores.ll

[NFC][AMDGPU] Add tests for the cost of vector f32 to f16 fptrunc

Assisted-By: Claude Code Opus 5
DeltaFile
+115-0llvm/test/Transforms/SLPVectorizer/AMDGPU/fptrunc-f16-stores.ll
+114-0llvm/test/Analysis/CostModel/AMDGPU/fptrunc.ll
+229-02 files