LLVM/project 62540c7llvm/include/llvm/IR RuntimeLibcalls.td, llvm/test/CodeGen/X86 fp128-libcalls-gnu.ll

RuntimeLibcalls: Provide fp128 long double libcalls on X86

16a8d8d038a3  removed the l-suffixed long double math functions
from the default set and re-added them per-target gated on
isLongDoubleF128, but X86 was not given the re-add. On targets
whose long double is fp128 (e.g. x86_64 Android/OHOS) this dropped
the fp128 l-suffixed libcalls.

Fixes the regression reported on #214944.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+264-4llvm/test/CodeGen/X86/fp128-libcalls-gnu.ll
+8-0llvm/include/llvm/IR/RuntimeLibcalls.td
+272-42 files

LLVM/project 6530e27llvm/include/llvm/CodeGen TargetLowering.h, llvm/lib/CodeGen/SelectionDAG SelectionDAGBuilder.cpp

[CodeGen] Pass the atomic instruction to supportsUnalignedAtomics
DeltaFile
+2-2llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+3-1llvm/include/llvm/CodeGen/TargetLowering.h
+5-32 files

LLVM/project 4dc3ef8mlir/lib/Interfaces ControlFlowInterfaces.cpp

[mlir] Fix RemoveDeadRegionBranchOpSuccessorInputs producing invalid scf.for

RemoveDeadRegionBranchOpSuccessorInputs builds its tied-value sets from
RegionBranchOpInterface::getSuccessorOperandInputMapping, which is derived from
getSuccessorRegions. For an scf.for with a statically-known trip count of 1,
getSuccessorRegions drops the region->region back edge (the loop provably never
iterates back). That back edge is what forwards a yield operand to the region
iter_args, so without it an iter_arg and its corresponding op result are no
longer tied through a shared operand. The pattern then removes a dead iter_arg
without its (structurally required) result, producing an scf.for with
mismatched loop-carried counts:

    'scf.for' op mismatch in number of loop-carried values and defined values

The greedy driver repairs this on a later iteration, so it is only observed
with MLIR_ENABLE_EXPENSIVE_PATTERN_API_CHECKS (which verifies the IR after
every pattern application). It shows up across Linalg tiling / pack-unpack /
convolution lowering and scf loop canonicalization; see issue #163599.


    [6 lines not shown]
DeltaFile
+65-0mlir/lib/Interfaces/ControlFlowInterfaces.cpp
+65-01 files

LLVM/project d0b4c1bllvm/lib/CodeGen TargetRegisterInfo.cpp, llvm/lib/Target/PowerPC PPCInstrInfo.cpp

PowerPC: Fix FMA reassociation crash on an undef multiply operand (#216602)

Make sure getVRegDef succeeded.

Found by AI while working on something else.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+73-0llvm/test/CodeGen/PowerPC/fma-reassoc-undef-mul.mir
+1-1llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
+1-1llvm/lib/CodeGen/TargetRegisterInfo.cpp
+75-23 files

LLVM/project da522b4llvm/lib/CodeGen TargetRegisterInfo.cpp, llvm/test/CodeGen/X86 machinelicm-lookthru-undef.mir

CodeGen: Fix lookThruCopyLike crash on an undef register (#216598)

Found by AI while working on something else.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+39-0llvm/test/CodeGen/X86/machinelicm-lookthru-undef.mir
+1-1llvm/lib/CodeGen/TargetRegisterInfo.cpp
+40-12 files

LLVM/project c31c334libcxx/docs/Status Cxx26Issues.csv Cxx29Issues.csv, libcxx/include/__optional nullopt_t.h

[libc++][optional] LWG4497: `std::nullopt_t` should be comparable (#214975)

Implements https://wg21.link/LWG4497

Closes #189854

Also implements LWG4612: https://cplusplus.github.io/LWG/issue4612

---------

Co-authored-by: Mohamed Atef <mohamedatef1698 at gmail.com>
Co-authored-by: Hristo Hristov <zingam at outlook.com>
DeltaFile
+102-0libcxx/test/std/utilities/optional/optional.nullopt/compare.three_way.pass.cpp
+16-0libcxx/include/__optional/nullopt_t.h
+3-0libcxx/docs/Status/Cxx29Issues.csv
+1-1libcxx/docs/Status/Cxx26Issues.csv
+122-14 files

LLVM/project 391dd41compiler-rt/lib/asan asan_malloc_win.cpp, compiler-rt/lib/builtins emutls.c gcc_personality_v0.c

[compiler-rt] Clean up Windows includes in sanitizer runtimes (#216586)

Extracted from https://github.com/llvm/llvm-project/pull/209902.
It's one of the patches that enables ASan and UBSan in GCC for Windows.

Co-authored-by: Hannes Domani <ssbssa at yahoo.de>
DeltaFile
+8-6compiler-rt/lib/asan/asan_malloc_win.cpp
+1-1compiler-rt/lib/builtins/gcc_personality_v0.c
+1-0compiler-rt/lib/builtins/emutls.c
+10-73 files

LLVM/project 9e51d75llvm/include/llvm/ADT FoldingSet.h, llvm/lib/Support FoldingSet.cpp

[ADT] Fix formatting in FoldingSet.* (NFC) (#216591)

I'm planning to work on FoldingSet.
DeltaFile
+55-70llvm/include/llvm/ADT/FoldingSet.h
+43-35llvm/lib/Support/FoldingSet.cpp
+2-3llvm/unittests/ADT/FoldingSet.cpp
+100-1083 files

LLVM/project caa9864orc-rt/include/orc-rt StringPool.h, orc-rt/test/unit StringPoolTest.cpp

[orc-rt] Nest StringPool handle types (#216615)

Move the handle types into StringPool as nested members:

  PooledStringPtr          -> StringPool::Ptr
  NonOwningPooledStringPtr -> StringPool::WeakPtr
  PooledStringPtrBase      -> StringPool::PtrBase
  StringPoolEntryUnsafe    -> StringPool::EntryUnsafe

Also tightens the WeakPtr -> Ptr contract: reconstructing a Ptr is only
well-defined while another Ptr keeps the entry alive.
DeltaFile
+69-74orc-rt/include/orc-rt/StringPool.h
+27-28orc-rt/test/unit/StringPoolTest.cpp
+96-1022 files

LLVM/project fd2eb9flibcxx/test/std/containers/sequences/vector trivial_relocation.pass.cpp

[libc++][test] Mark `UNSUPPORTED` for a test relying on `[[clang::trivial_abi]]` for compilers not supporting it (#211736)

This patch marks `UNSUPPORTED` for compilers not supporting
`[[clang::trivial_abi]]` (MSVC and GCC earlier than GCC 17) for a test
relying on this attribute.
DeltaFile
+4-0libcxx/test/std/containers/sequences/vector/trivial_relocation.pass.cpp
+4-01 files

LLVM/project 15035c1llvm/include/llvm/ExecutionEngine/Orc SymbolLookupSet.h, llvm/unittests/ExecutionEngine/Orc CMakeLists.txt SymbolLookupSetTest.cpp

[ORC] Fix and rename SymbolLookupSet::removeDuplicates (#216574)

removeDuplicates uniqued on the (name, flags) pair, so a name appearing
with both RequiredSymbol and WeaklyReferencedSymbol survived twice --
leaving a set that containsDuplicates, which compares names only, still
reported as duplicated.

Replace it with mergeEntries, which merges by name. Where entries
disagree on flags the strongest requirement wins, so a missing
definition still fails the lookup. Renamed because the entries being
merged need not be exact duplicates.

removeDuplicates had no in-tree callers, so no existing behaviour
changes. Also adds a unit test for mergeEntries -- the first direct
coverage for SymbolLookupSet.
DeltaFile
+133-0llvm/unittests/ExecutionEngine/Orc/SymbolLookupSetTest.cpp
+26-5llvm/include/llvm/ExecutionEngine/Orc/SymbolLookupSet.h
+1-0llvm/utils/gn/secondary/llvm/unittests/ExecutionEngine/Orc/BUILD.gn
+1-0llvm/unittests/ExecutionEngine/Orc/CMakeLists.txt
+161-54 files

LLVM/project 46b3a2borc-rt/include CMakeLists.txt, orc-rt/include/orc-rt StringPool.h

[orc-rt] Add StringPool for interning ref-counted strings. (#216571)

Adds StringPool, a thread-safe pool for interning strings (e.g. symbol
names, paths) behind ref-counted PooledStringPtr handles.
PooledStringPtr and NonOwningPooledStringPtr compare and hash by
pool-scoped pointer identity rather than content, and clearDeadEntries()
reclaims entries with no remaining owners.

No in-tree clients yet: I expect to use this in future commits for the
platform support classes.
DeltaFile
+249-0orc-rt/include/orc-rt/StringPool.h
+166-0orc-rt/test/unit/StringPoolTest.cpp
+1-0orc-rt/test/unit/CMakeLists.txt
+1-0orc-rt/include/CMakeLists.txt
+417-04 files

LLVM/project c926bfdcompiler-rt/test/asan/TestCases invalid-pointer-pairs-vector-extract.cpp

[asan][test] Exclude invalid-pointer-pairs-vector-extract.cpp from Solaris (#216606)

Intended to fix buildbot breakage on Solaris (XPASS), as reported in
https://github.com/llvm/llvm-project/pull/216532#issuecomment-5309297518

This change is only a transient step for the test, since the upcoming
https://github.com/llvm/llvm-project/pull/213546 is expected to make the
test pass on all platforms.
DeltaFile
+2-0compiler-rt/test/asan/TestCases/invalid-pointer-pairs-vector-extract.cpp
+2-01 files

LLVM/project 43c6d8allvm/test/Transforms/SLPVectorizer/AMDGPU elementwise-fma-operand1.ll

[NFC][SLP] Add a mixed-reassoc bundle to the operand-1 fma test (#216594)

One lane carries reassoc and the other three do not, so the bundle is
only partly reassociative. Also add a second threshold to the run lines.
DeltaFile
+95-5llvm/test/Transforms/SLPVectorizer/AMDGPU/elementwise-fma-operand1.ll
+95-51 files

LLVM/project 30b0076llvm/lib/Transforms/Vectorize/SandboxVectorizer/Passes SeedCollection.cpp, llvm/test/Transforms/SandboxVectorizer/EndToEnd seed_bundle_cross_erasure.ll

[SandboxVectorizer] Fix out-of-bounds SeedBundle access on cross-bundle erasure

SeedCollection::runOnFunction() indexed a SeedBundle at
Seeds.getFirstUnusedElementIdx() (and, separately, at a hardcoded 0) without
first checking whether the bundle was already fully used.
getFirstUnusedElementIdx() returns Seeds.size() -- one past the end -- once
everything is used, so indexing there reads out of bounds.

This was always a latent bug, but -sbvec-collect-seeds=stores,loads is what
actually exposes it: store and load seeds share one erase-instruction
callback (SeedContainer::erase()), so when vectorizing a store chain erases
a load it packed as an operand, that erase also marks the same load "used"
in its *independent* LoadSeeds bundle. Store seeds are processed first, so
by the time the outer loop reaches that LoadSeeds bundle, it can already be
fully consumed -- or, since cross-bundle erasure can mark any index used
(not just sequentially from the front), have its element 0 specifically
erased while other elements remain live, which broke the hardcoded Seeds[0]
address-space lookup the same way.


    [12 lines not shown]
DeltaFile
+21-0llvm/test/Transforms/SandboxVectorizer/EndToEnd/seed_bundle_cross_erasure.ll
+5-2llvm/lib/Transforms/Vectorize/SandboxVectorizer/Passes/SeedCollection.cpp
+26-22 files

LLVM/project 89e98delld/COFF Chunks.h Chunks.cpp, lld/test/COFF reloc-mips.test

[LLD] Initial support for MIPS COFF relocations (#205200)

Base relocations are not handled, but it will be implemented later.
DeltaFile
+56-0lld/test/COFF/reloc-mips.test
+45-0lld/COFF/Chunks.cpp
+2-0lld/COFF/Chunks.h
+103-03 files

LLVM/project 2e78e25clang/lib/Sema SemaTemplateDeduction.cpp SemaTemplateInstantiateDecl.cpp, clang/test/CXX/temp/temp.decls/temp.friend p5.cpp

[Clang] Support friend declarations with a dependent nested-name-specifier (#216555)

Fixes https://github.com/llvm/llvm-project/issues/104057

---

This patch adds support for friend declarations with a dependent NNS
DeltaFile
+1,089-13clang/test/CXX/temp/temp.decls/temp.friend/p5.cpp
+685-105clang/lib/Sema/SemaAccess.cpp
+299-123clang/lib/Sema/SemaDeclCXX.cpp
+334-72clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
+263-0clang/test/SemaTemplate/dependent-friend-constraints.cpp
+191-37clang/lib/Sema/SemaTemplateDeduction.cpp
+2,861-35058 files not shown
+3,985-74364 files

LLVM/project 0f23ed7llvm/lib/CodeGen TargetRegisterInfo.cpp, llvm/lib/Target/PowerPC PPCInstrInfo.cpp

PowerPC: Fix FMA reassociation crash on an undef multiply operand

Make sure getVRegDef succeeded.

Found by AI while working on something else.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+73-0llvm/test/CodeGen/PowerPC/fma-reassoc-undef-mul.mir
+1-1llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
+1-1llvm/lib/CodeGen/TargetRegisterInfo.cpp
+75-23 files

LLVM/project 1d25752llvm/lib/CodeGen/GlobalISel GIMatchTableExecutor.cpp

GlobalISel: Use MIPatternMatch in GIMatchTableExecutor

Replace the getVRegDef + opcode-check idiom in isBaseWithConstantOffset with
mi_match using m_GPtrAdd and m_GConstant.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+6-8llvm/lib/CodeGen/GlobalISel/GIMatchTableExecutor.cpp
+6-81 files

LLVM/project b6cd05bllvm/include/llvm/CodeGen/GlobalISel MIPatternMatch.h, llvm/lib/CodeGen/GlobalISel CombinerHelper.cpp

GlobalISel: Introduce m_GPtrAdd flags matcher in CombinerHelper

Add an optional MIFlags output operand to the binary-op matcher and a
m_GPtrAdd(L, R, m_MIFlags(F)) overload, and use it to replace getVRegDef +
opcode checks.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+24-1llvm/include/llvm/CodeGen/GlobalISel/MIPatternMatch.h
+4-5llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
+28-62 files

LLVM/project 7cb5d89clang/lib/ScalableStaticAnalysis/Analyses/UnsafeBufferUsage UnsafeBufferUsageAnalysis.cpp, clang/test/Analysis/Scalable/TypeConstrainedPointers unsafe-buffer-reachable-excludes-type-constrained-new-delete.cpp unsafe-buffer-reachable-excludes-type-constrained-main.cpp

[SSAF][UnsafeBufferAnalysis] Do not create entries for empty contributors (follow-up change on #209354) (#216526)

Address follow up questions after the approval.

- The analysis should not create entries for empty contributors, which
otherwise is non-empty in the serialized format.
- use std IO instead of a tmp file for regex-ing FileCheck queries.

rdar://179151541 and rdar://179151882
DeltaFile
+3-8clang/test/Analysis/Scalable/TypeConstrainedPointers/unsafe-buffer-reachable-excludes-type-constrained-main.cpp
+3-2clang/lib/ScalableStaticAnalysis/Analyses/UnsafeBufferUsage/UnsafeBufferUsageAnalysis.cpp
+1-2clang/test/Analysis/Scalable/TypeConstrainedPointers/unsafe-buffer-reachable-excludes-type-constrained-new-delete.cpp
+7-123 files

LLVM/project d4e78d7clang/include/clang/CIR/Dialect/IR CIROps.td, clang/test/CIR/CodeGenBuiltins builtin-bit.cpp

[CIR] Allow non-power-of-2-popcount (#216440)

Found in running a test suite, _BitInt of a non-power of 2 wasn't
allowed in our cir.popcount operation, despite it lowering perfectly
fine into the LLVM instruction. This patch relaxes the limitation to any
size integer, and adds tests.

Note we have no tests >128 because we can't lay those out yet in memory,
and the tests use local variables instead of arguments because _BitInt
calling convention work isn't in place yet either.
DeltaFile
+161-0clang/test/CIR/CodeGenBuiltins/builtin-bit.cpp
+1-3clang/include/clang/CIR/Dialect/IR/CIROps.td
+162-32 files

LLVM/project d4fcec5llvm/lib/CodeGen TargetRegisterInfo.cpp, llvm/test/CodeGen/X86 machinelicm-lookthru-undef.mir

CodeGen: Fix lookThruCopyLike crash on an undef register

Found by AI while working on something else.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+39-0llvm/test/CodeGen/X86/machinelicm-lookthru-undef.mir
+1-1llvm/lib/CodeGen/TargetRegisterInfo.cpp
+40-12 files

LLVM/project 4a96a45llvm/lib/CodeGen TargetRegisterInfo.cpp, llvm/test/CodeGen/X86 machinelicm-lookthru-undef.mir

CodeGen: Fix lookThruCopyLike crash on an undef register

Found by AI while working on something else.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+39-0llvm/test/CodeGen/X86/machinelicm-lookthru-undef.mir
+1-1llvm/lib/CodeGen/TargetRegisterInfo.cpp
+40-12 files

LLVM/project 2c6acb4llvm/lib/Target/AArch64 AArch64InstrInfo.cpp, llvm/test/CodeGen/AArch64 optimize-cond-branch-undef.mir

AArch64: Fix optimizeCondBranch crash on an undef register

Found by AI while working on something else.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+32-0llvm/test/CodeGen/AArch64/optimize-cond-branch-undef.mir
+2-0llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
+34-02 files

LLVM/project d2e52eeclang/docs ReleaseNotes.md, clang/lib/Lex Lexer.cpp

[clang][Lex] Preserve physical line start after comments in -C mode (#216556)

When comments are preserved with -C, a comment at the start of a
physical line consumes the PhysicalStartOfLine state. As a result, a
preprocessor directive following the comment is not recognized.

Preserve the PhysicalStartOfLine state when returning a comment token so
that directives following comments are still handled correctly.

Fixes: #48361
DeltaFile
+33-0clang/test/Preprocessor/comment_directive.c
+1-0clang/lib/Lex/Lexer.cpp
+1-0clang/docs/ReleaseNotes.md
+35-03 files

LLVM/project 7855d51llvm/docs LangRef.md, llvm/lib/CodeGen/SelectionDAG TargetLowering.cpp

[APFloat][SelectionDAG] Support Float8E5M3FNU in convert.{to,from}.arbitrary.fp

Float8E5M3FNU was already accepted by the IR verifier, because
isValidArbitraryFPFormat is defined in terms of
getArbitraryFPFormatSizeInBits and that table covers it. It was missing
from getArbitraryFPSemantics, so SelectionDAGBuilder rejected
it with "not implemented format" and the verifier-clean IR failed to
compile. Add the mapping and the corresponding entries in the
expandCONVERT_{TO,FROM}_ARBITRARY_FP format allowlists.

Unlike every other format the expansions handle so far, Float8E5M3FNU is
unsigned: it has no sign bit, so all 8 bits go to a 5-bit exponent and a
3-bit significand.

Since an unsigned format cannot represent a negative value, a negative
input now saturates to zero when the saturate flag is set, and is poison
otherwise. -0.0 is excluded from that and still converts to +0, and the
check is ordered before the NaN case so a negative NaN still produces the
NaN encoding. APFloat treats constructing a negative value in an unsigned

    [7 lines not shown]
DeltaFile
+263-0llvm/test/CodeGen/AMDGPU/float-to-arbitrary-fp-e5m3fnu.ll
+189-0llvm/test/CodeGen/X86/float-to-arbitrary-fp.ll
+37-11llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+7-2llvm/docs/LangRef.md
+2-2llvm/lib/Support/APFloat.cpp
+2-1llvm/unittests/ADT/APFloatTest.cpp
+500-166 files

LLVM/project 30a31c4libc/src/__support/threads thread.cpp, libc/src/stdlib CMakeLists.txt exit.cpp

[libc] Remove (weak) __cxa_thread_finalize (#216081)

Unlike __cxa_thread_atexit(_impl), this function is not a part of the
ABI as the process of calling the thread exit callbacks is an
implementation detail. Additionally, the weak definition gets in the way
of refactoring the thread code as the linker will not extract an object
from the archive if the dependency is already satisfied by a weak
definition.

Instead of a weak definition, I use a preprocessor macro to determine
whether we need to call the thread cleanup function (i.e., whether the
target supports threads).
DeltaFile
+8-17libc/src/stdlib/exit.cpp
+12-0libc/src/stdlib/CMakeLists.txt
+0-2libc/src/__support/threads/thread.cpp
+20-193 files

LLVM/project 5589423utils/bazel/llvm-project-overlay/libc BUILD.bazel

[Bazel] Fixes 1f4574c (#216346)

This fixes 1f4574c6033cae84c88ca69bb2b73c9b029925e3 (#216345).

Buildkite error link:
https://buildkite.com/llvm-project/upstream-bazel/builds?commit=1f4574c6033cae84c88ca69bb2b73c9b029925e3

Co-authored-by: Google Bazel Bot <google-bazel-bot at google.com>
DeltaFile
+3-0utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+3-01 files

LLVM/project 65e0fe6clang/lib/CodeGen BackendUtil.cpp, clang/lib/Driver/ToolChains Clang.cpp

[dyndbg][Clang] Implement nested-ELF dynamic debugging support (#216307)

Re-land https://github.com/llvm/llvm-project/pull/194860

A clone of the module is compiled without optimisations and embedded into the
to-be-optimised module using `embedBufferInModule`, similarly to how
`-ffat-lto-objects` and `-fembed-offload-object` work.

That unoptimised-code object is embedded in the optimised-code object in a
section called `.debug_llvm_dyndbg`.

The optimised ELF/module may be referred to as the "outer" ELF/module, and the
unoptimized one the "inner" ELF/module.

The outer module holds global data referred to by both modules and all calls in
the inner module are to outer module functions. To facilitate this the outer
module is modified, adding external-linkage aliases for local symbols.

For more detail see RFC https://discourse.llvm.org/t/90113 and documentation at
llvm/docs/DynamicDebugging.md.
DeltaFile
+110-1clang/lib/CodeGen/BackendUtil.cpp
+72-0clang/test/DebugInfo/DynamicDebugging/symbols-globals.cpp
+35-2clang/lib/Driver/ToolChains/Clang.cpp
+37-0clang/test/DebugInfo/DynamicDebugging/compiler-used.cpp
+33-0clang/test/DebugInfo/DynamicDebugging/symbols-functions.cpp
+32-0clang/test/Driver/dynamic-debugging-flags.c
+319-320 files not shown
+540-1126 files