[libc][math] Optimize integer-only expf and factor out shared utilities.
- Optimize `expf_integer_eval` for both code size and performance.
- Factor out the shared range reduction and `2^u` fixed point evaluation to
be used by `exp2f` and `exp10f` integer-only versions.
Assisted-by: Gemini for analysis and refactoring.
raidz: refuse expansions that the boot area cannot hold
A RAID-Z expansion uses the boot area of each child as scratch space,
and raidz_reflow_scratch_sync() needs it to hold one sector for every
child of the expanded vdev:
VERIFY3U(write_size, >=, raidvd->vdev_children << ashift);
vdev_raidz_attach_check() is there to refuse an attach that would
break this, but spa_vdev_attach() calls it before the new leaf is
moved under the RAID-Z vdev, while its parent is still the temporary
root vdev it was parsed under. The check took the width and the
ashift from that root, one child and an ashift of zero, so it never
refused anything. Attaching a 57th disk to a RAID-Z vdev with
ashift=16, or a 113th with ashift=15, was accepted, and the VERIFY
failed in the syncing thread as soon as the expansion started.
Pass the RAID-Z vdev to vdev_raidz_attach_check() and count the child
that is about to be added. Return a new error for it rather than
[9 lines not shown]
CI: reuse fork jobs from any recent push run of the PR head
reuse-ci.py only looks at the newest push run of each workflow for the
PR head SHA. A fork's workflows run on every push, so pushing an already
tested commit to the PR branch starts new push runs for the same SHA
just as the PR event fires. Those runs are still queued when the PR's
reuse step checks, so nothing is reused and every workflow runs in both
repositories (#19410). A cancelled newer run hides an older success the
same way, and with reuse limited to the first attempt a rerun can no
longer pick up the fork results once they finish.
Look at the latest ten push runs for the SHA, newest first, and let the
newest finished result for each job decide it: a success in a completed
run is reused and a failure is not, so an older success still cannot
replace a newer failure. Jobs that were cancelled, skipped or have not
finished have no result and fall through to older runs. A failure that
has already finished in a running workflow still blocks reuse.
Reviewed-by: George Melikov <mail at gmelikov.ru>
[2 lines not shown]
[NVPTX] Attach !atomic.ignore.denormal.mode when upgrading legacy NVVM atomic add intrinsics (#232725)
Legacy NVVM floating-point atomic add intrinsics
(`@llvm.nvvm.atomic.load.add.f32.p*`,
`@llvm.nvvm.atomic.load.add.f64.p*`, and
`@llvm.nvvm.atomic.add.gen.f.*`) specifically targeted the PTX
`atom.add` instruction, which flushes f32 denormals to zero on global
memory.
Attach `!atomic.ignore.denormal.mode` metadata when auto-upgrading these
intrinsics to `atomicrmw fadd` so that they continue to lower to native
`atom.add` instructions when `-nvptx-allow-ftz-atomics` defaults to
`false` (#231429), matching the Clang lowering of
`__nvvm_atom_add_gen_f` (#217587).
multimedia/py-subliminal: Fine tune dependencies
subliminal requires knowit>=0.5.5 and defusedxml>=0.7.1 at run time,
but the port only lists them in TEST_DEPENDS
The patch moves them to RUN_DEPENDS and updates the port to 2.8.0:
- 2.8.0 requires typing-extensions>=4.10;
- the other RUN_DEPENDS minimums follow 2.8.0's requirements; enzyme
and tomli, which nothing imports, are dropped (enzyme is a knowit
provider); rarfile (the rar extra) stays for RAR support
PR: 299480
MFH: 2026Q4
[X86] Add v8f16 X86selects fallback patterns to masked VMOVSH (#231724)
Masked scalar patterns rely on `X86selects_mask`, which rejects fusing
the underlying operation into a masked instruction when that operation
has multiple users (checked via `isProfitableToFormMaskedOp`). In that
case, the bare `X86ISD::SELECTS` node must be selected separately as a
masked register move.
These fallback patterns already exist for `v4f32` (VMOVSS) and `v2f64`
(VMOVSD), but were never added for `v8f16` when AVX-512 FP16 was
introduced. In the reproducer, CSE merges identical conversions into a
single `VFPROUNDS` node with two users; pattern fusion is rejected, no
`v8f16` fallback matches, and ISel fails.
Add the missing `v8f16` fallback patterns lowering to `VMOVSHZrrk` and
`VMOVSHZrrkz`, mirroring the existing float/double logic.
Fixes #231640
Assisted-by: Claude Code for initial root-cause analysis and pattern
investigation.
MachineVerifier: Reject dead and live defs of the same register
Previously an instruction could have a dead and a live def of the same
physical register, which has no consistent interpretation.
Some passes, namely register pressure tracking, implicitly rely on the
dead flag adjustments performed by running LiveVariables. In cases of
repeated defs, LiveVariables strips dead flags. When a super-register
is only partially used, it marks the super-register def dead and adds
a live implicit-def of the used sub-register.
Prior to #222627, pressure tracking treated live defs as winning. That
PR fixed some asserts by switching to a dead wins system where any
dead flag taints those regunits for the whole instruction. #225079
reverts the remainder of #222627, back closer to the interpretation of
this verifier check.
Only a dead def with a live def of the same register is
rejected. Mixed dead flags on overlapping defs of different registers
[7 lines not shown]
System: Routes: Configuration - further refactor current static route updates for https://github.com/opnsense/core/issues/10569
This code should offer the same functionality as before, but starts with wrapping the "stashed updates" code into its own class, so we can extend that with the rest of the required logic.
In order to change system_routing_configure() to accept multiple targets for a single net, we likely should have a mechanism in place comparing our expected route configuration with the one configured, isolating that inside its own class is likely much easier for future maintenance.
In practice we always marked the networks touched by the UI in order to remove them before apply new ones, we call this action "claiming" now. Our primary issue is that given a running routing table, we can't really know which routes are inserted by us. Following the existing logic (which functioned for single targets), we could state that any network we manually configured (or are configuring) is ours to maintain.
At some point we may consider marking our routes with RTF_PROTO2 (Bird seems to be using RTF_PROTO1) to improve the filtering a bit further, but this is easy to implement later on given the plumning we need anyway.
[mlir][LLVMIR] Precompile NVVM and ROCDL operation declarations (NFC) (#233106)
The eight source shards in each dialect repeatedly parse their operation
headers after loading the shared LLVM PCH. Give each dialect a local PCH
containing LLVMIR/pch.h followed by its operation header. Disable
downstream reuse so other libraries retain their existing PCH selection.
Reduces CPU from 103.12 to 87.48 s (-15.17%) for the affected objects.
Assisted-by: Codex
[libc++] Disable automatic module scanning on ARM CI builders
The ARM Buildkite toolchains do not expose clang-scan-deps to CMake.
When CMP0155 enables automatic scanning for libc++abi C++23 sources,
these standalone runtimes builds fail with the scanner set to NOTFOUND.
Pass CMAKE_CXX_SCAN_FOR_MODULES=OFF in the eight ARM job invocations,
including the no-exceptions variants, until their toolchains provide a
matching scanner. Keep the other CI configurations on their defaults.
Validated bash syntax, git diff --check, and argument dispatch for all
eight ARM jobs with generic C++20, C++23, and modules jobs as controls.
Assisted-by: Codex
[libc++] Provision a suitable CMake for CI builds
The previous commit raised cmake_minimum_required to 3.31. The GitHub
jobs already satisfy it (the Linux image pins 3.31.0, macOS uses brew,
Windows uses the hosted image), but some self-hosted Buildkite agents
ship an older CMake and their images cannot be updated by us.
Teach run-buildbot to check the CMake version up front. When the cmake
on PATH is new enough, this costs a single `cmake --version` and nothing
else changes. Otherwise, download a pinned, SHA-256 verified CMake
3.31.12 release binary into ${XDG_CACHE_HOME:-~/.cache}/libcxx (outside
the build directory that run-buildbot wipes) and, when no binary exists
for the host or it cannot run there, bootstrap it from source with the
host compilers rather than the runtime's CC/CXX. The install is
published with an atomic rename so concurrent builders on one agent
never see a partial cache entry.
An explicit CMAKE override is still honored but now validated; in the
provisioned or overridden cases its directory is prepended to PATH so
[5 lines not shown]
[libc++abi] Retain the old CMP0155 behavior for GCC compatibility
Raising the minimum CMake version to 3.31 enables automatic module dependency
scanning for the C++23 libc++abi object libraries. GCC 16 and 17 then probe
the libstdc++ bits/stdc++.h header when processing libc++ headers and fail
if it is absent.
Set CMP0155 to OLD within libc++abi only when using GCC until its optional
header lookup is fixed. Preserve automatic scanning with Clang and guard
the policy setting for older CMake versions.
GCC bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127940
Validated the policy workaround on the CMake 3.31 minimum-version branch
with GCC 16.2.0 and CMake 3.31.12: the focused cxa_handlers.cpp reproducer
compiles. Clang 22.1.0 still generates and successfully executes the
clang-scan-deps rule for that source. git diff --check passes.
Assisted-by: Codex
build: Support got
Add code for using got(1), matching how git(1) is currently used:
1. Determining the git branch,
2. Determining the checked-out hash,
3. Determining the commit count,
4. Determining the timestamp of the most recent commit,
5. Determining if the tree is "dirty",
6. Generating lists of files for the src and src-sys packages, and
7. Excluding .got directories from src.txz and ports.txz.
The release engineer hopes to use this functionality in release builds,
since got's minimalism makes it a far more manageable build tool than
git.
Reviewed by: naddy
MFC after: 1 week
Sponsored by: Amazon
Differential Revision: https://reviews.freebsd.org/D60606