LLVM/project 9714a85 — libc/src/__support/FPUtil FMA.h nearest_integer.h, libc/src/__support/FPUtil/arm FEnvImpl.h

[libc][FPUtil] Make hardware helpers usable in constant expressions (#242283)

## Summary

Part of #195623 (split 1/2). Makes the `FPUtil` hardware helpers usable
in constant expressions, which is the foundation the shared math
functions build on in #242285.

## What this PR does

- Guards the hardware/intrinsic paths in `FEnvImpl`, `sqrt`, `FMA`,
`nearest_integer`, and `multiply_add` behind `is_constant_evaluated()`,
so they fall through to the generic implementation during constant
evaluation while still using the hardware path at runtime.
- Applies this across all supported architectures: aarch64, arm,
hexagon, riscv, and x86_64.

## Compatibility


    [10 lines not shown]
DeltaFile
+39-20libc/src/__support/FPUtil/nearest_integer.h
+37-4libc/src/__support/FPUtil/x86_64/sqrt.h
+24-14libc/src/__support/FPUtil/FMA.h
+19-13libc/src/__support/FPUtil/arm/FEnvImpl.h
+29-2libc/src/__support/FPUtil/x86_64/nearest_integer.h
+29-2libc/src/__support/FPUtil/riscv/sqrt.h
+177-5516 files not shown
+409-14322 files

LLVM/project 4af54d7 — mlir/lib/Dialect/Affine/Utils LoopUtils.cpp, mlir/test/Dialect/SCF loop-unroll.mlir

[mlir][Affine] Fix crash in loopUnrollUpToFactor on zero-trip loops (#245019)

When the constant trip count was lower than the unroll factor,
loopUnrollUpToFactor clamped the factor to the trip count. For a
zero-trip loop (e.g. `affine.for %i = 0 to 0`) this called
loopUnrollByFactor with factor 0 and tripped its "unroll factor should
be positive" assertion. Return early for zero-trip loops as
loopUnrollFull does, since there is nothing to unroll. Fixes #220458.

Assisted-by: MiMo-V2.6-Pro
DeltaFile
+25-1mlir/test/Dialect/SCF/loop-unroll.mlir
+5-1mlir/lib/Dialect/Affine/Utils/LoopUtils.cpp
+30-22 files

LLVM/project c620a42 — llvm/include/llvm/MC MCContext.h, llvm/lib/CodeGen TargetLoweringObjectFileImpl.cpp

[MC] Change section group name from Twine to StringRef. NFC (#245125)

str() conversions are expensive. All but one caller
(MCObjectFileInfo::getPseudoProbeDescSection) pass a StringRef. Take a
StringRef.
DeltaFile
+5-5llvm/lib/MC/MCContext.cpp
+4-4llvm/include/llvm/MC/MCContext.h
+2-2llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
+2-1llvm/lib/MC/MCObjectFileInfo.cpp
+13-124 files

LLVM/project 142a031 — llvm/lib/Transforms/Coroutines CoroCleanup.cpp, llvm/test/Transforms/Coroutines coro-cleanup-async-size-replace-analyses.ll

fixup! Coroutines: Only invalidate analyses of lowered functions in CoroCleanup
DeltaFile
+41-0llvm/test/Transforms/Coroutines/coro-cleanup-async-size-replace-analyses.ll
+5-2llvm/lib/Transforms/Coroutines/CoroCleanup.cpp
+46-22 files

LLVM/project 425b311 — llvm/lib/Target/ARM/AsmParser ARMAsmParser.cpp, llvm/lib/Target/AVR/AsmParser AVRAsmParser.cpp

[nspr] update
DeltaFile
+3-2llvm/lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp
+3-2llvm/lib/Target/AVR/AsmParser/AVRAsmParser.cpp
+3-2llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
+9-63 files

LLVM/project 097146c — llvm/lib/Transforms/Coroutines CoroCleanup.cpp, llvm/test/Transforms/Coroutines coro-cleanup-preserve-function-analyses.ll

Coroutines: Only invalidate analyses of lowered functions in CoroCleanup

CoroCleanupPass already invalidates the analyses of the functions it
lowers, but then reported no preserved analyses, which clears every
cached function.

Also stop preserving CFG analyses for lowered functions, since noop
coroutine elision can change the CFG.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+57-0llvm/test/Transforms/Coroutines/coro-cleanup-preserve-function-analyses.ll
+12-5llvm/lib/Transforms/Coroutines/CoroCleanup.cpp
+69-52 files

LLVM/project c3b40cb — llvm/include/llvm/MC MCContext.h, llvm/lib/MC MCContext.cpp

[MC] Hash section names once in recordELFMergeableSectionInfo. NFC (#245122)

Key both ELFSeenGenericMergeableSections and ELFEntrySizeMap by
CachedHashStringRef so that hash lookups don't need to recompute the
section name hash. ELFSeenGenericmergeableSections contains most
sections and the long C++ mangled names are expensive.
DeltaFile
+10-6llvm/lib/MC/MCContext.cpp
+4-2llvm/include/llvm/MC/MCContext.h
+14-82 files

LLVM/project fb18f4f — llvm/include/llvm/IR RuntimeLibcallsImpl.td RuntimeLibcalls.td, llvm/test/Transforms/Util/DeclareRuntimeLibcalls arm64ec.ll aarch64.ll

RuntimeLibcalls: Add SME attributes to the AArch64 SME support routines

SMEAttrs currently assumes these attributes based on the function
name. Add them to the function definition so this code can be cleaned
up in the future.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+104-82llvm/test/Transforms/Util/DeclareRuntimeLibcalls/aarch64.ll
+22-12llvm/include/llvm/IR/RuntimeLibcalls.td
+10-7llvm/test/Transforms/Util/DeclareRuntimeLibcalls/arm64ec.ll
+3-0llvm/include/llvm/IR/RuntimeLibcallsImpl.td
+139-1014 files

LLVM/project 70f8e96 — orc-rt/include/orc-rt-c/bedrock/sys/posix DlfcnLoaderAdapter.h dlfcn-types.h, orc-rt/include/orc-rt/bedrock/sys/posix DlfcnLoaderAdapter.h

[orc-rt] Add DlfcnLoaderAdapter. (#245120)

DlfcnLoaderAdapter simplifies exposing an ORC runtime loader through the
dlfcn.h APIs. Subclasses implement dlopen, dlclose, dlsym, and dladdr in
terms of their underlying loader, reporting failures with Error and
Expected as usual in the ORC runtime. The adapter takes care of
translating those results into dlfcn.h's error-reporting scheme: each
failure returns the operation's POSIX failure value, and its message is
made available to the calling thread through dlerror. Failures are also
logged, under a new LoaderAPIs logging category.

JIT'd code reaches an adapter through C entry points
(orc_rt_DlfcnLoaderAdapter_*) and an instance symbol,
orc_rt_DlfcnLoaderAdapter_Instance, which the adapter adds to a symbol
table supplied by its creator. The creator publishes that table to the
session once the whole loader system has been constructed.

Supporting changes:
- orc-rt-c/bedrock/sys/posix/dlfcn-types.h provides orc_rt_Dl_info and

    [6 lines not shown]
DeltaFile
+442-0orc-rt/test/unit/bedrock/sys/posix/DlfcnLoaderAdapterTest.cpp
+216-0orc-rt/lib/bedrock/sys/posix/DlfcnLoaderAdapter.cpp
+135-0orc-rt/include/orc-rt/bedrock/sys/posix/DlfcnLoaderAdapter.h
+72-0orc-rt/include/orc-rt-c/bedrock/sys/posix/dlfcn-types.h
+56-0orc-rt/include/orc-rt-c/bedrock/sys/posix/DlfcnLoaderAdapter.h
+49-0orc-rt/test/unit/bedrock/sys/posix/DlfcnLoaderAdapterCTest.c
+970-07 files not shown
+989-113 files

LLVM/project f0acbb9 — llvm/include/llvm/IR RuntimeLibcalls.td, llvm/test/Transforms/Util/DeclareRuntimeLibcalls arm64ec.ll aarch64.ll

RuntimeLibcalls: Add attributes to __arm_sc_memcpy, memmove and memset

The streaming-compatible variants behave like memcpy, memmove and
memset. Omit captures(none) since these can be used to implement volatile
memory intrinsics.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+20-20llvm/test/Transforms/Util/DeclareRuntimeLibcalls/aarch64.ll
+18-3llvm/include/llvm/IR/RuntimeLibcalls.td
+4-4llvm/test/Transforms/Util/DeclareRuntimeLibcalls/arm64ec.ll
+42-273 files

LLVM/project 568736e — llvm/lib/Transforms/Instrumentation PGOForceFunctionAttrs.cpp, llvm/test/Instrumentation/PGOForceFunctionAttrs preserve-function-analyses.ll

PGOForceFunctionAttrs: Only clear analyses of changed functions (#244985)

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+26-0llvm/test/Instrumentation/PGOForceFunctionAttrs/preserve-function-analyses.ll
+10-1llvm/lib/Transforms/Instrumentation/PGOForceFunctionAttrs.cpp
+36-12 files

LLVM/project 1e0049e — llvm/lib/Transforms/Utils NameAnonGlobals.cpp CanonicalizeAliases.cpp, llvm/test/Transforms/CanonicalizeAliases preserve-function-analyses.ll

Utils: Preserve function analyses in CanonicalizeAliases and NameAnonGlobals (#244987)

These passes only change aliases and the names of globals, so they do
not need to invalidate any function analyses.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+16-0llvm/test/Transforms/CanonicalizeAliases/preserve-function-analyses.ll
+14-0llvm/test/Transforms/NameAnonGlobals/preserve-function-analyses.ll
+5-1llvm/lib/Transforms/Utils/NameAnonGlobals.cpp
+5-1llvm/lib/Transforms/Utils/CanonicalizeAliases.cpp
+40-24 files

LLVM/project 09ca80c — llvm/lib/Transforms/IPO GlobalSplit.cpp, llvm/test/Transforms/GlobalSplit preserve-function-analyses.ll

GlobalSplit: Preserve CFG analyses (#244959)

GlobalSplit only changes global variables, so it does not need to
invalidate every function analysis.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+37-0llvm/test/Transforms/GlobalSplit/preserve-function-analyses.ll
+6-1llvm/lib/Transforms/IPO/GlobalSplit.cpp
+43-12 files

LLVM/project cc454d8 — llvm/lib/MC MCContext.cpp, llvm/test/MC/ELF reloc-same-name-section.s

[MC] Allow relocation section to share name with a label (#245121)

We currently reject the new case in reloc-same-name-section.s as
"invalid symbol redefinition" while GAS allows it. Allow it by creating
a MCSectionELF directly with a null `Begin` symbol.
DeltaFile
+22-17llvm/test/MC/ELF/reloc-same-name-section.s
+3-5llvm/lib/MC/MCContext.cpp
+25-222 files

LLVM/project 8731687 — llvm/test/CodeGen/SPIRV loop-unroll-nonshader.ll llc-pipeline.ll, llvm/test/CodeGen/SPIRV/instructions undef-composite.ll

Revert "[SPIR-V] Default to NewPM" (#245119)

Reverts llvm/llvm-project#239489

Breaks https://lab.llvm.org/buildbot/#/builders/225/builds/26922. Looks
like a latent machine code verification bug where the legacy pipeline
wasn't running the machine verifier.
DeltaFile
+18-0llvm/unittests/Target/SPIRV/SPIRVAPITest.cpp
+4-4llvm/test/CodeGen/SPIRV/llc-pipeline.ll
+2-0llvm/test/CodeGen/SPIRV/structurizer/do-continue.ll
+2-0llvm/test/CodeGen/SPIRV/structurizer/cf.while.continue.ll
+2-0llvm/test/CodeGen/SPIRV/loop-unroll-nonshader.ll
+2-0llvm/test/CodeGen/SPIRV/instructions/undef-composite.ll
+30-48 files not shown
+38-614 files

LLVM/project e754191 — llvm/test/CodeGen/SPIRV loop-unroll-nonshader.ll llc-pipeline.ll, llvm/test/CodeGen/SPIRV/instructions undef-composite.ll

[SPIR-V] Default to NewPM (#239489)

SPIR-V CodeGen now works with the NewPM, so make clang and llc default
to it
DeltaFile
+0-18llvm/unittests/Target/SPIRV/SPIRVAPITest.cpp
+4-4llvm/test/CodeGen/SPIRV/llc-pipeline.ll
+0-2llvm/test/CodeGen/SPIRV/structurizer/do-continue.ll
+0-2llvm/test/CodeGen/SPIRV/structurizer/cf.while.continue.ll
+0-2llvm/test/CodeGen/SPIRV/loop-unroll-nonshader.ll
+0-2llvm/test/CodeGen/SPIRV/instructions/undef-composite.ll
+4-308 files not shown
+6-3814 files

LLVM/project ff97e97 — llvm/lib/Target/X86/MCTargetDesc X86AsmBackend.cpp, llvm/test/MC/X86 align-branch-enhanced-relaxation.s

[X86] Skip finishLayout without MCBoundaryAlignFragment. NFC (#245114)

-x86-pad-for-branch-align defaults to true, so `finishLayout` walks
every text section even when branch alignment is disabled. Skip
it in the majority of cases when AllowAutoPadding is false.

Also add a test for -x86-pad-for-branch-align=0, which was uncovered.
DeltaFile
+5-0llvm/test/MC/X86/align-branch-enhanced-relaxation.s
+2-1llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
+7-12 files

LLVM/project ed437a3 — orc-rt/include/orc-rt-internal/support StringExtras.h, orc-rt/test/unit/support StringExtrasTest.cpp

[orc-rt] Add quote() to StringExtras.h. (#245112)

quote() wraps a string so that StringOutputStream prints it in double
quotes, escaping any embedded quotes and backslashes as std::quoted
does. A null const char * prints as NULL, so that nullable C strings
(e.g. arguments in diagnostics) can be printed without a separate null
check.
DeltaFile
+35-0orc-rt/test/unit/support/StringExtrasTest.cpp
+33-0orc-rt/include/orc-rt-internal/support/StringExtras.h
+68-02 files

LLVM/project 5146baa — llvm/lib/Target/SPIRV SPIRVGlobalRegistry.cpp SPIRVPostLegalizer.cpp, llvm/test/CodeGen/SPIRV/passes SPIRVPostLegalizer-float-llt.mir

[SPIR-V] Use float LLTs to type FP vregs after legalization (#243866)

Read the SPIR-V type of float vregs from their LLT instead of guessing
it from their uses
DeltaFile
+47-34llvm/lib/Target/SPIRV/SPIRVPostLegalizer.cpp
+38-0llvm/test/CodeGen/SPIRV/passes/SPIRVPostLegalizer-float-llt.mir
+3-4llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.cpp
+88-383 files

LLVM/project b9f7f05 — clang/lib/Sema SemaExprMember.cpp, clang/test/Sema ext_vector_components.c

[Clang] Fix qualifiers of ext vector components accessed via `->` (#244980)

For `p->x` where `p` points to an `ext_vector_type` vector, Sema takes
the qualifiers from the type of `p`, which is the pointer itself,
instead of the vector it points to. As a result, `p->x = 1` is accepted
even if `p` points to a `const` vector, while `(*p).x = 1` is rejected.
An address space on the vector is lost in the same way.

This PR takes the qualifiers from the vector for both `.` and `->`. A
swizzle that repeats a component, e.g. `v.xx`, is a computed value, so
it doesn't get any qualifiers.

This PR was assisted by AI but I reviewed all the changes.
DeltaFile
+18-0clang/test/SemaCXX/ext-vector-component-qualifiers.cpp
+7-0clang/test/Sema/ext_vector_components.c
+3-3clang/lib/Sema/SemaExprMember.cpp
+28-33 files

LLVM/project 24b9662 — llvm/lib/Transforms/Instrumentation SanitizerCoverage.cpp

[NFC][SanitizerCoverage] Reuse RuntimeCalls storage across functions (#244787)

Avoid swapping RuntimeCalls into a local SmallVector in
addFuncletBundles(), which frees its heap buffer after every function
with more than 16 callbacks even on non-scoped-EH targets. Clear
RuntimeCalls on scope exit instead to preserve allocated capacity across
functions.

Follow-up to #226762.

Assisted-by: Gemini
DeltaFile
+6-4llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp
+6-41 files

LLVM/project cbe787b — llvm/lib/Transforms/Instrumentation SanitizerCoverage.cpp

[NFC][SanitizerCoverage] Check FuncletPadInst for funclet bundles (#244788)

Check isa<FuncletPadInst>(Pad) instead of Pad->isEHPad() when attaching
funclet operand bundles. The IR verifier only accepts CatchPadInst or
CleanupPadInst operands for "funclet" bundles, whereas isEHPad() also
matches LandingPadInst and CatchSwitchInst.

Follow-up to #226762.

Assisted-by: Gemini
DeltaFile
+1-1llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp
+1-11 files

LLVM/project e48b3cd — llvm/lib/Transforms/IPO FunctionImport.cpp, llvm/test/ThinLTO/X86 ifunc-weak-resolver.ll

[ThinLTO] Preserve non-prevailing ifunc resolver definitions (#242990)

Currently, when multiple modules provide `weak_odr` definitions of the
same ifunc resolver (which is a common scenario in multi-versioning,
frontend will generate a resolver definition for all modules that use
versioning func), the ThinLink phase will resolve one as prevailing and
demotes the non-prevailing copy to `available_externally`. But this
violates the strict LLVM IR constraint that an ifunc must be bound to a
resolver defined in the same non-prevailing module, and will lead to an
`IFunc resolver must be a definition` verifier error.

The issue can be easily reproduced with the following minimal example:
```c++
// main.cpp
__attribute__((target("default"))) int select_impl();
__attribute__((target("avx2"))) int select_impl();
int main() { return select_impl(); }

// a.cpp

    [12 lines not shown]
DeltaFile
+52-0llvm/test/ThinLTO/X86/ifunc-weak-resolver.ll
+12-2llvm/lib/Transforms/IPO/FunctionImport.cpp
+64-22 files

LLVM/project fba393d — llvm/lib/Transforms/InstCombine CMakeLists.txt InstCombineSimplifyDemanded.cpp, llvm/utils/gn/secondary/llvm/lib/Transforms/InstCombine BUILD.gn

[InstCombine][NFC] Move SimplifyDemandedUseFPClass functions verbatim to InstCombineSimplifyDemandedFP.cpp
DeltaFile
+1,938-0llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemandedFP.cpp
+0-1,913llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
+1-0llvm/utils/gn/secondary/llvm/lib/Transforms/InstCombine/BUILD.gn
+1-0llvm/lib/Transforms/InstCombine/CMakeLists.txt
+1,940-1,9134 files

LLVM/project 135ece9 — llvm/lib/Analysis CMakeLists.txt ValueTracking.cpp, llvm/utils/gn/secondary/llvm/lib/Analysis BUILD.gn

[ValueTracking][NFC] Move computeKnownFPClass functions verbatim to ValueTrackingFP.cpp
DeltaFile
+1,959-0llvm/lib/Analysis/ValueTrackingFP.cpp
+0-1,906llvm/lib/Analysis/ValueTracking.cpp
+1-0llvm/utils/gn/secondary/llvm/lib/Analysis/BUILD.gn
+1-0llvm/lib/Analysis/CMakeLists.txt
+1,961-1,9064 files

LLVM/project 83a29de — llvm/lib/Analysis ValueTracking.cpp ValueTrackingInternal.h

[ValueTracking][NFC] Prepare computeKnownFPClass before moving it to ValueTrackingFP.cpp
DeltaFile
+42-0llvm/lib/Analysis/ValueTrackingInternal.h
+13-13llvm/lib/Analysis/ValueTracking.cpp
+55-132 files

LLVM/project 43c6316 — llvm/lib/Analysis ValueTracking.cpp

[ValueTracking][NFC] Run clang-format on computeKnownFPClass code (#244966)

Format `computeKnownFPClass` code before it gets moved to another file.
DeltaFile
+4-3llvm/lib/Analysis/ValueTracking.cpp
+4-31 files

LLVM/project 8a5067b — mlir/docs SPIRVToLLVMDialectConversion.md, mlir/lib/Conversion/SPIRVToLLVM SPIRVToLLVM.cpp

[mlir][SPIR-V] Add SPIRVToLLVM conversions for VectorExtractDynamic and VectorInsertDynamic (#244418)
DeltaFile
+24-0mlir/test/Conversion/SPIRVToLLVM/misc-ops-to-llvm.mlir
+3-1mlir/docs/SPIRVToLLVMDialectConversion.md
+4-0mlir/lib/Conversion/SPIRVToLLVM/SPIRVToLLVM.cpp
+31-13 files

LLVM/project d7cf21e — clang/lib/Headers tgmath.h, clang/test/Headers tgmath-conj.c

[Clang][Headers] Fix tgmath.h conj() of a real argument (#244854)

For a real argument, the type-generic conj() returned the argument
converted to complex, giving x + 0i. C11 7.25p5 requires the complex
function to be called, so the result should be conj(x + 0i), which
is x - 0i. Call conjf/conj/conjl for the real overloads, the same as
cproj() already does.

Declare the functions tgmath.h uses in the test math.h and complex.h,
and build the test with -Wsystem-headers, so a missing declaration is
an error.

Fixes #244639

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+67-0clang/test/Headers/Inputs/include/complex.h
+57-0clang/test/Headers/Inputs/include/math.h
+20-0clang/test/Headers/tgmath-conj.c
+5-9clang/lib/Headers/tgmath.h
+149-94 files

LLVM/project d7f8f89 — .github/workflows subscriber.yml scorecard.yml, .github/workflows/require-team-membership action.yml

Update [Github] Update GHA Dependencies (#245100)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[actions/create-github-app-token](https://redirect.github.com/actions/create-github-app-token)
| action | minor | `v3.3.0` → `v3.4.0` |
|
[ossf/scorecard-action](https://redirect.github.com/ossf/scorecard-action)
| action | minor | `v2.5.0` → `v2.6.0` |
DeltaFile
+1-1.github/workflows/subscriber.yml
+1-1.github/workflows/scorecard.yml
+1-1.github/workflows/require-team-membership/action.yml
+1-1.github/workflows/release-tasks.yml
+1-1.github/workflows/release-asset-audit.yml
+1-1.github/workflows/new-prs.yml
+6-62 files not shown
+8-88 files