LLVM/project 18a4c90libcxx/include optional, libcxx/test/std/utilities/optional/optional.monadic and_then.pass.cpp transform.pass.cpp

[libc++] Fix bug where `optional<T&>` couldn't be constructed from `transform()` (#203462)

- Add the proper from monadic base constructor
- Fix the constraint so it allows references.
- Add tests
DeltaFile
+35-2libcxx/test/std/utilities/optional/optional.monadic/and_then.pass.cpp
+26-5libcxx/include/optional
+17-4libcxx/test/std/utilities/optional/optional.monadic/transform.pass.cpp
+9-0libcxx/test/std/utilities/optional/optional.monadic/or_else.pass.cpp
+87-114 files

LLVM/project 44cc797libcxx/include/__memory uninitialized_algorithms.h ranges_uninitialized_algorithms.h, libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.default ranges_uninitialized_default_construct.pass.cpp uninitialized_default_construct_n.pass.cpp

[libc++] P3369R0: constexpr for `uninitialized_default_construct` (#200163)

Remarks:
- Tests also verify that `uninitialized_default_construct(_n)`
algorithms do not initialize trivially default-constructible elements
(`int` in these tests) to determined values during constant evaluation.
DeltaFile
+179-0libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.default/ranges_uninitialized_default_construct.pass.cpp
+110-1libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.default/uninitialized_default_construct_n.pass.cpp
+108-1libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.default/uninitialized_default_construct.pass.cpp
+109-0libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.default/ranges_uninitialized_default_construct_n.pass.cpp
+7-4libcxx/include/__memory/uninitialized_algorithms.h
+5-3libcxx/include/__memory/ranges_uninitialized_algorithms.h
+518-97 files not shown
+531-1613 files

LLVM/project 08e6e14llvm/lib/CodeGen/GlobalISel LegalizerHelper.cpp, llvm/test/CodeGen/RISCV/GlobalISel rv64zbb.ll

[GlobalISel] Fix sign-extended byte mask in lowerBswap (#199387)

The per-byte mask in `LegalizerHelper::lowerBswap` was constructed via

```
APInt APMask(SizeInBytes * 8, 0xFF << (i * 8));
```

where `0xFF << (i * 8)` is evaluated as a signed `int`. For `i*8 >= 24`
(byte-3 mask of an s64 G_BSWAP) the value `0xFF000000` does not fit in a
positive 32-bit `int`; the conversion to signed `int` is
implementation-defined under C++17 (UB under C++11, fully defined under
C++20) and on two's-complement targets produces `-16777216`. The modular
conversion to `uint64_t` in the `APInt` constructor then materializes
that negative `int` as `0xFFFFFFFFFF000000` — the intended mask was
`0x00000000FF000000`. The over-wide mask preserved bytes 4-7 of the
source where only byte 3 was intended, and the spurious bytes propagated
through the subsequent shift/OR chain.


    [3 lines not shown]
DeltaFile
+28-0llvm/unittests/CodeGen/GlobalISel/LegalizerHelperTest.cpp
+13-12llvm/test/CodeGen/RISCV/GlobalISel/rv64zbb.ll
+1-1llvm/test/CodeGen/RISCV/GlobalISel/legalizer/legalize-bswap-rv64.mir
+1-1llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
+1-1llvm/test/CodeGen/RISCV/GlobalISel/legalizer/legalize-bitreverse-rv64.mir
+44-155 files

LLVM/project afeee22llvm/lib/Transforms/Vectorize VectorCombine.cpp, llvm/test/Transforms/VectorCombine/X86 fold-signbit-reduction-cmp-codesize.ll

[VectorCombine] Use TCK_CodeSize for size-optimized functions (#202207)

VectorCombine currently uses `TCK_RecipThroughput` for all functions,
including functions optimized for size.

Select `TCK_CodeSize` when `Function::hasOptSize()` is true, covering
both `-Os` (`optsize`) and `-Oz` (`minsize`), while retaining
  `TCK_RecipThroughput` for the default optimization mode.

The X86 regression test demonstrates a sign-bit reduction where the
throughput cost model folds an `or` reduction into a `umax` reduction.
The code-size model preserves the smaller form for `optsize` and
`minsize` functions, while the default function retains the existing
throughput-oriented transformation.

  Fixes #153375.
DeltaFile
+83-0llvm/test/Transforms/VectorCombine/X86/fold-signbit-reduction-cmp-codesize.ll
+3-2llvm/lib/Transforms/Vectorize/VectorCombine.cpp
+86-22 files

LLVM/project 756ff71clang/lib/CodeGen CGHLSLRuntime.cpp

[HLSL][NFC] Move HLSLBufferCopyEmitter class (#203595)

Move `HLSLBufferCopyEmitter` class to the anonymous namespace at the top
of `CGHLSLRuntime.cpp` and use it directly from
`CGHLSLRuntime::createBufferMatrixTempAddress` instead going though the
`CGHLSLRuntime::emitBufferCopy` call. No changes were done to the
`HLSLBufferCopyEmitter` code.

This is preparation for work related to resources in cbuffer structs
which will be changing the signature of `CGHLSLRuntime::emitBufferCopy`
and modifying the `HLSLBufferCopyEmitter`.
DeltaFile
+163-165clang/lib/CodeGen/CGHLSLRuntime.cpp
+163-1651 files

LLVM/project e3e2fd6llvm/lib/Target/RISCV RISCVInstrInfo.td RISCVInstrInfo.cpp

[RISCV] Add PseudoClearGPR to the special cases in RISCVInstrInfo::getInstSizeInBytes. (#203637)

This instruction is expanded to an ADDI with immediate of 0 and should
then be compressed to c.li with Zca. The compression code doesn't know
this due to the Pseudo so manually give a size of 2 for Zca.
DeltaFile
+1-2llvm/lib/Target/RISCV/RISCVInstrInfo.td
+1-0llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
+2-22 files

LLVM/project 4e5fa3bllvm/lib/Target/RISCV RISCVFrameLowering.cpp, llvm/test/CodeGen/RISCV shadowcallstack-frame-flags.ll

[RISCV] Mark HW shadow stack ops as frame setup/destroy (#203362)

This change follows up on PR #200182 and addresses the issue in the
[related
comment](https://github.com/llvm/llvm-project/pull/200182#discussion_r3329197379).

It sets `FrameSetup` on SSPUSH/C_SSPUSH and `FrameDestroy` on SSPOPCHK
instructions emitted by RISCVFrameLowering for the HW shadow stack path.
The test was written manually (instead of using
`utils/update_mir_test_checks.py`) to keep it simple and avoid
unnecessary fragility.
DeltaFile
+21-0llvm/test/CodeGen/RISCV/shadowcallstack-frame-flags.ll
+9-3llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
+30-32 files

FreeBSD/src d2387bbsys/compat/freebsd32 freebsd32_misc.c

compat32 wait4/6(2): only copy out when there is a pid to report

PR:     295965

(cherry picked from commit 89fa97f0a71d4988891766c4e69eeb9687016b14)
DeltaFile
+4-8sys/compat/freebsd32/freebsd32_misc.c
+4-81 files

NetBSD/pkgsrc r9F81oSdoc CHANGES-2026

   doc: Updated math/R-RPostgreSQL to 0.7.8
VersionDeltaFile
1.3774+2-1doc/CHANGES-2026
+2-11 files

NetBSD/pkgsrc xEAvZ6Omath/R-RPostgreSQL distinfo Makefile

   (math/R-RPostgreSQL) Updated 0.7.7 to 0.7.8

   (from ChangeLog)
   2025-03-28  Tomoaki NISHIYAMA <tomoaki at sci.u-toyama.ac.jp>
           * Makevars.win rely on pkgconfig to find libpq on windows envirionment.
           * Drop PQprint and related routines from the attached libpq library.

   2024-09-30  Tomoaki NISHIYAMA <tomoaki at sci.u-toyama.ac.jp>
           * Simplify tests

   2024-09-24  Tomoaki NISHIYAMA <tomoaki at sci.u-toyama.ac.jp>
           * Update DESCRIPTION

   2024-09-22  Tomoaki NISHIYAMA  <tomoaki at sci.u-toyama.ac.jp>
           * Update DESCRIPTION
VersionDeltaFile
1.13+4-4math/R-RPostgreSQL/distinfo
1.14+2-2math/R-RPostgreSQL/Makefile
+6-62 files

FreeBSD/src 669642fsys/compat/freebsd32 freebsd32_misc.c

compat32 wait4/6(2): only copy out when there is a pid to report

PR:     295965

(cherry picked from commit 89fa97f0a71d4988891766c4e69eeb9687016b14)
DeltaFile
+4-8sys/compat/freebsd32/freebsd32_misc.c
+4-81 files

FreeBSD/src b7280ebusr.bin/procstat procstat_bin.c

procstat binary: do not skip pid if either path or osrel sysctls failed

PR:     295893

(cherry picked from commit 9f378397ee89044a4faec522916b50f0a164d62e)
DeltaFile
+5-3usr.bin/procstat/procstat_bin.c
+5-31 files

FreeBSD/src 53d691csys/kern kern_procctl.c

reap_kill_subtree_once: when proctree_lock is dropped, reaper might change

(cherry picked from commit 44970244e6d872103f36eae34218b672b69579dd)
DeltaFile
+29-14sys/kern/kern_procctl.c
+29-141 files

FreeBSD/src 06dae21sys/kern kern_fork.c kern_exit.c, sys/sys proc.h

proc: add tree ref count

(cherry picked from commit 85a65e3930924429903e09832d177f8aa09dfb47)
DeltaFile
+7-0sys/sys/proc.h
+2-1sys/kern/kern_fork.c
+1-1sys/kern/kern_exit.c
+1-0sys/kern/kern_proc.c
+11-24 files

FreeBSD/src eac751csys/kern kern_fork.c

kern_fork: guard against NULL newproc on the failure path

(cherry picked from commit 9b48646ab366dcf6089fac653eef963331aa1169)
DeltaFile
+2-1sys/kern/kern_fork.c
+2-11 files

FreeBSD/src 093cc41sys/kern imgact_elf.c

imgact_elf: handle unaligned phdrs

PR:     295629

(cherry picked from commit 0b269737f9ca057826a6c9376c2474b1ae5bc91c)
DeltaFile
+5-8sys/kern/imgact_elf.c
+5-81 files

FreeBSD/src b52346bsys/compat/linux linux_fork.c linux_misc.c, sys/kern kern_exit.c kern_exec.c

exit1(9): do not deadlock if exit is called due to PT_SC_REMOTERQ

(cherry picked from commit a2cfe535771ded3ca8526bae405a5b61f71f1f33)
DeltaFile
+53-4sys/kern/kern_exit.c
+6-7sys/kern/kern_exec.c
+2-2sys/kern/kern_ucoredump.c
+2-2sys/compat/linux/linux_fork.c
+2-2sys/compat/linux/linux_misc.c
+3-1sys/sys/proc.h
+68-183 files not shown
+72-209 files

FreeBSD/src 6b02fe2sys/kern kern_procctl.c

kern_procctl: add get_reaper_or_p() helper

(cherry picked from commit 261c97b47ea4f120bfa4a04aab7d35c70dde8c8f)
DeltaFile
+10-6sys/kern/kern_procctl.c
+10-61 files

FreeBSD/src 5cffd95sys/kern kern_procctl.c

procctl(PROC_REAP_GETPIDS): re-validate reaper after relock of proctree_lock

(cherry picked from commit 390ae06d4f524a6f32383cbc1bcbdecdb3738bc3)
DeltaFile
+32-11sys/kern/kern_procctl.c
+32-111 files

FreeBSD/src f8fc6a0sys/kern vfs_syscalls.c vfs_lookup.c, sys/sys vnode.h

rename(2): do not allow to rename root vnode of the mounted filesystem

PR:     295826

(cherry picked from commit d53633bfcf24a3eb3711e24b597aa8301f92b958)
DeltaFile
+9-0sys/kern/vfs_syscalls.c
+1-1sys/kern/vfs_lookup.c
+1-0sys/sys/vnode.h
+11-13 files

FreeBSD/src a4ceed1sys/kern kern_procctl.c

procctl(): do not allow the process to exit inside kern_procctl_single()

(cherry picked from commit a845480cc122f45cebc5fbbe43de6b1c096d852b)
DeltaFile
+15-21sys/kern/kern_procctl.c
+15-211 files

FreeBSD/src f9a216csys/kern vfs_syscalls.c

renameat(2): when retrying, check for pending signals

PR:     295826

(cherry picked from commit 5d0ebfe1d97801518755c7025f57ba7d5bf1c8db)
DeltaFile
+8-2sys/kern/vfs_syscalls.c
+8-21 files

FreeBSD/src 94c6290sys/kern uipc_usrreq.c

connectat(2): do not enable EMPTYPATH for AT_FDCWD

(cherry picked from commit a248c5545f6fb861ea4200b69a58b2abcf815ce4)
DeltaFile
+3-2sys/kern/uipc_usrreq.c
+3-21 files

FreeBSD/src f6de9c6lib/libsys open.2, sys/kern uipc_usrreq.c

uipc_usrreq: revert addition of EMPTYPATH for bindat(2)

(cherry picked from commit 453968c78d27ed5c90562a1178f34fe8d616bf40)
DeltaFile
+2-3sys/kern/uipc_usrreq.c
+1-3lib/libsys/open.2
+3-62 files

FreeBSD/src c1d9ae3lib/libsys open.2

open.2: document O_PATH behavior for bindat/connectat

(cherry picked from commit 5d36fcc53d3d1c05a3bbac45e9d5409156e216f1)
DeltaFile
+6-0lib/libsys/open.2
+6-01 files

FreeBSD/src 57c8cccsys/dev/ntsync linux_ntsync.c linux_ntsync.h, sys/modules Makefile

linux_ntsync: linux compat shim for ntsync(9)

(cherry picked from commit 510ee6698d377f4a9a4eeb08d9dc17bdc72ad5ab)
DeltaFile
+302-0sys/dev/ntsync/linux_ntsync.c
+62-0sys/dev/ntsync/linux_ntsync.h
+6-0sys/modules/linux_ntsync/Makefile
+1-0sys/modules/Makefile
+371-04 files

FreeBSD/src fff29fbsys/kern uipc_usrreq.c

bindat(2)/connectat(2): allow implicit EMPTYPATH for unix domain sockets

(cherry picked from commit 12c590a9abd770f69da3bc0b8adb4955d79357c8)
DeltaFile
+4-3sys/kern/uipc_usrreq.c
+4-31 files

FreeBSD/src 3118bdfsys/dev/ntsync ntsync.c, sys/sys user.h

ntsync: add kinfo reporting

(cherry picked from commit d0ea3aff90655be3cdb34d86a4a97be6fc85d919)
DeltaFile
+44-3sys/dev/ntsync/ntsync.c
+24-0sys/sys/user.h
+68-32 files

FreeBSD/src 1ee1bfeetc/mtree BSD.include.dist, include Makefile

ntsync: install headers for userspace consumption

(cherry picked from commit 0ac9aac81c40159d561e43fc6976a866f852832b)
DeltaFile
+2-0etc/mtree/BSD.include.dist
+1-1include/Makefile
+3-12 files

FreeBSD/src 43702cfsys/dev/ntsync ntsync.c ntsyncvar.h, sys/modules Makefile

ntsync(4)

(cherry picked from commit 03ca6dbdb80da79408f135d823fbd9a00fd4f25b)
DeltaFile
+1,379-0sys/dev/ntsync/ntsync.c
+119-0sys/dev/ntsync/ntsyncvar.h
+66-0sys/dev/ntsync/ntsync.h
+6-0sys/modules/ntsync/Makefile
+1-0sys/sys/file.h
+1-0sys/modules/Makefile
+1,572-06 files