[libc][math] Add coshbf16 math function (#240859)
Closes #233065. Part of #177259.
Adds `coshbf16`, built on the shared `sinhcoshbf16_utils.h` helpers that
landed with `sinhbf16` (#224645). It computes
`eval_sinh_or_cosh</*IsSinh=*/false>` in the middle range and
`exp_half(|x|)` for |x| >= 6.875, and handles these cases directly:
- |x| <= 0x1.68p-4 rounds to 1 (or to the next value above 1 in RU).
- |x| >= 89.5 overflows to +Inf.
- NaN and Inf.
Testing:
- The exhaustive MPFR test (all bf16 inputs, all rounding modes, 0.5
ULP) passes.
- The smoke and shared-math tests pass.
Bazel targets are included, mirroring `sinhbf16`, but I haven't built
them locally.
[2 lines not shown]
[flang] Cache host variable lists for global captures (#240308)
This change addresses redundant work when lowering internal procedures
that access host globals: each internal procedure rebuilds the same host
variable list and reruns dependency analysis.
It caches the ordered variable list and selects the captured globals and
their EQUIVALENCE storage once per host. The list is reused when
lowering the host, and the selected bindings are reused by its internal
procedures in their original list order.
The cached host list and binding pointers are released after all entry
points and internal procedures have been lowered to bound retained
memory.
Tests cover host-associated scalar and EQUIVALENCE bindings across MAIN
and procedure scopes, including module storage, multiple internal
procedures and ENTRY points, zero-sized storage collisions, and mixed
EQUIVALENCE/THREADPRIVATE captures.
Assisted by GPT-6
[X86] Enable SlotIndexes compaction by default
Compacting SlotIndexes before greedy allocation drops the entries of
erased instructions, so live range sizes and instruction distances
reflect the code being allocated rather than how much was erased
before it. AMDGPU has done this since #235806; do the same for X86.
Codegen changes only through allocation: no new crashes, verifier
errors or allocation failures in the lit suites, including
EXPENSIVE_CHECKS, and a stage-2 build of LLVM, clang and lld with
-verify-machineinstrs passes its own tests. On llvm-test-suite at -O3,
spills drop 0.3% and .text 0.06%, with compile time unchanged.
Most test updates are regenerated checks. misched-matmul now inserts
20 spills instead of 24. live-debug-vars-stale-slotindexes.mir gets
one more use of %27 so that accumulate_fit still reaches the stale
index path it was written for.
[X86][APX] Test the relocation of an NF add
test_regclass_not_updated_by_regalloc_2 only produced an NDD/NF add
with a GOT operand because the allocator happened to give the add a
destination different from its source. With SlotIndexes compaction it
picks the same register, so the add is compressed to the legacy form
and the CODE_6 TODO lost its test.
Add a function whose add keeps its source live, so it stays NDD and
becomes NF under any allocation.
[clang] Add regression test for #145012 (#242008)
Add a test for a generic lambda with an explicit template parameter list
inside a function template that takes a pointer non-type template
parameter. Clang 21 rejects it with "conversion from 'int *' to 'void *'
is not allowed in a converted constant expression".
This was fixed by 078e99e (#161029), but no test covered this case.
Closes #145012
[PGO] Load branch uniformity profiles and mark availability
Uniformity profiles record full-wave block observations. Attach
uniformity.profile to functions with this data, and derive
branch.uniformity.profile from instrumented successor blocks with a
single conditional predecessor. Mark a branch only when every
instrumented outgoing edge used to classify it has a nonzero count
and a uniform classification. This summarizes successor observations;
it does not directly measure lane agreement at the branch.
Replace annotations covered by new observations, including removing
old positive hints. Leave existing annotations alone when uniformity
data is absent.
Add the hidden pgo-uniformity-metadata option, enabled by default.
Disabling it clears function, block and branch uniformity metadata
during profile use, including functions with no usable profile record,
while retaining ordinary profile counts and weights.
[Transforms] Maintain uniformity profile hints across CFG changes
Uniformity hints describe a block's execution population or evidence
for a branch decision. Preserve them when those properties survive a
CFG rewrite, and clear them when the rewrite changes their meaning.
For example, folding a conditional branch to an unconditional branch
can preserve the block hint, but must drop the branch hint. Combining
two predicates or splitting aggregate executions across predecessor
paths cannot reuse the old branch classification.
[IR] Define profile-based uniformity metadata
Branch weights show how often each path is taken, but not whether GPU
lanes take it together. Define three presence-only metadata kinds:
uniformity.profile marks a function with loaded uniformity data,
block.uniformity.profile describes full-wave block observations, and
branch.uniformity.profile describes branch hints derived from those
observations.
All three use an empty node. They are profitability hints and cannot
prove uniform execution. A missing block or branch hint can mean
divergent execution or insufficient observations.
Migrate the existing block metadata producer from Boolean payloads to
presence-only nodes, clearing old positive hints when new observations
do not support them. A zero counter supplies no uniformity observation.
When reading old bitcode, convert the true Boolean payload to an empty
node and remove the false payload.
[VPlan] Use VPlan-based cost for more replicated memory ops. (#241573)
Stop falling back to the legacy cost model in
VPReplicateRecipe::computeCost for predicated loads and stores. The
costs of the mask extracts and branches is included in both the region
cost and legacy cost computations, so it is counted twice.
In the changed tests, the costs where too high becasue the mask extracts
and branches for predicated stores were counted twice.
PR: https://github.com/llvm/llvm-project/pull/241573
net/coturn: Update to 4.19.0
Upstream NEWS content, less bugfixes and minor improvements:
Release 4.19.0
Changelist:
- Update integrity key generation to use default SHA type (Pavel Punsky <eakraly at users.noreply.github.com>)
chromium: update to 157.0.8103.78
* 157.0.8103.78
This update includes 83 security fixes. Please see the Chrome Security Page for more information.
[N/A][568699166] Critical CVE-2026-126885: Use after free in ServiceWorker. Reported by Xinyang Ge on 2026-10-02
[N/A][575524700] Critical CVE-2026-126895: Use after free in CSS. Reported by Xinyang Ge on 2026-10-19
[N/A][576736463] Critical CVE-2026-126879: Use after free in Layout. Reported by Xinyang Ge on 2026-10-22
[N/A][580857377] Critical CVE-2026-126846: Use after free in Skia. Reported by Google on 2026-11-02
[TBD][580921803] Critical CVE-2026-126911: Use after free in Accessibility. Reported by Andrew Boni on 2026-11-02
[$4,000][567827593] High CVE-2026-126864: Use after free in V8. Reported by Jihyeon Jeong (Compsec Lab, Seoul National University / Research Intern) on 2026-09-30
[N/A][560620348] High CVE-2026-126889: Off-by-one error in V8. Reported by Google on 2026-09-12
[N/A][563340397] High CVE-2026-126859: Link following in FileSystem. Reported by Google on 2026-09-18
[N/A][567611696] High CVE-2026-126886: Use after free in Frames. Reported by Xinyang Ge (Anthropic), assisted by Claude on 2026-09-29
[N/A][567611698] High CVE-2026-126887: Use after free in Animation. Reported by Xinyang Ge (Anthropic), assisted by Claude on 2026-09-29
[N/A][568906910] High CVE-2026-126870: Uninitialized resource in ANGLE. Reported by Google on 2026-10-02
[N/A][569286603] High CVE-2026-126912: Buffer overflow in Skia. Reported by Xinyang Ge on 2026-10-05
[N/A][569674220] High CVE-2026-126919: Use after free in BrowserTag. Reported by Xinyang Ge on 2026-10-05
[TBD][572312779] High CVE-2026-126878: Information leak in Core. Reported by Anthropic and Ada Logics on 2026-10-10
[69 lines not shown]
powerpc: fix the VSCR save and restore on little endian
VSCR was saved and restored through stvewx/lvewx at byte 12 of a
16 byte slot. Which element those instructions move at a given address
depends on the byte order, so on little-endian kernels they touched VR
bits 0-31 instead of the 96-127 where mfvscr/mtvscr keep VSCR: every
context switch and signal reset VSCR to 0, losing NJ and SAT.
Replicate the word into all four elements first so that the element
choice no longer matters.
VSCR[NJ] set with mtvscr read back as 0 after a usleep on a
little-endian kernel; it is preserved now.
Reviewed by: adrian, jhibbits
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D61525