LLVM/project 1975a00 — llvm/lib/Target/Hexagon HexagonSubtarget.cpp HexagonGlobalSchedulerV2.cpp

[Hexagon] Do not store updateLatency result in std::optional (#247757)

updateLatency takes and returns int, but its result was assigned back
into a std::optional<unsigned>, which MSVC warns about. Unwrap the
operand latency once and keep the adjusted latency as int.

Assisted by AI
DeltaFile
+4-5llvm/lib/Target/Hexagon/HexagonSubtarget.cpp
+5-4llvm/lib/Target/Hexagon/HexagonGlobalSchedulerV2.cpp
+9-92 files

LLVM/project 9caf9eb — llvm/include/llvm/IR RuntimeLibcalls.td, llvm/test/Transforms/Util/DeclareRuntimeLibcalls windows.ll sparc.ll

RuntimeLibcalls: Add definitions for asan functions

Add this to the default library set since that's the only way to
use them today.

Assisted-by: Claude
DeltaFile
+116-8llvm/include/llvm/IR/RuntimeLibcalls.td
+59-2llvm/test/Transforms/Util/DeclareRuntimeLibcalls/aarch64.ll
+41-2llvm/test/Transforms/Util/DeclareRuntimeLibcalls/mips.ll
+40-0llvm/test/Transforms/Util/DeclareRuntimeLibcalls/sparc.ll
+40-0llvm/test/Transforms/Util/DeclareRuntimeLibcalls/bsd.ll
+37-2llvm/test/Transforms/Util/DeclareRuntimeLibcalls/windows.ll
+333-146 files not shown
+466-1412 files

LLVM/project 7024582 — llvm/lib/Target/RISCV RISCVCodeGenPrepare.cpp, llvm/test/CodeGen/RISCV riscv-codegenprepare.ll riscv-codegenprepare-asm.ll

[RISCV] Handle i1 any-of reductions with backedge as first operand in RISCVCodeGenPrepare

In RISCVCodeGenPrepare we widen i1 vp.merges that are part of a reduction to i8 since there's no tail undisturbed mask instructions. We previously only allowed the backedge to be the first operand of the phi though, but loop simplify can insert preheaders etc. that cause the backend to the be second operand. Handle these, which improves loops like:

```c
int any_zero(const int *a, long n) {
  int found = 0;
  for (long i = 0; i < n; i++)
    if (a[i] == 0)
      found = 1;
  return found;
}
```

Before:

```asm
  .LBB0_2:                                # %vector.body
          vsetvli   a3, a1, e8, mf2, ta, ma

    [28 lines not shown]
DeltaFile
+14-16llvm/test/CodeGen/RISCV/riscv-codegenprepare-asm.ll
+9-6llvm/lib/Target/RISCV/RISCVCodeGenPrepare.cpp
+4-3llvm/test/Transforms/PhaseOrdering/RISCV/any-of-vectorization.ll
+3-2llvm/test/CodeGen/RISCV/riscv-codegenprepare.ll
+30-274 files

LLVM/project cecedad — llvm/test/CodeGen/RISCV riscv-codegenprepare.ll riscv-codegenprepare-asm.ll, llvm/test/Transforms/PhaseOrdering/RISCV any-of-vectorization.ll

Precommit tests
DeltaFile
+52-0llvm/test/Transforms/PhaseOrdering/RISCV/any-of-vectorization.ll
+51-0llvm/test/CodeGen/RISCV/riscv-codegenprepare-asm.ll
+45-0llvm/test/CodeGen/RISCV/riscv-codegenprepare.ll
+148-03 files

LLVM/project 7e48182 — llvm/lib/Analysis MemoryDependenceAnalysis.cpp, llvm/lib/Transforms/Scalar GVN.cpp

[GVN][MDA] getFroArgument in lifetime_start intrinsic

A lifetime_starts gets PartialAlias for static size
allocation (for inbound access). Such access can return PartialAlias
to a Def precisely instead of MayAlias, which need to use getClobber.

After taking a look at MDA, we also can fix this over there, which
uses getAfter, which returns Clobber in static inboud access.

Assisted-by: Claude # Test
DeltaFile
+72-2llvm/test/Transforms/GVN/pre-no-hoist-across-lifetime.ll
+3-3llvm/lib/Analysis/MemoryDependenceAnalysis.cpp
+1-2llvm/lib/Transforms/Scalar/GVN.cpp
+76-73 files

LLVM/project 12e5913 — clang/lib/Sema SemaOpenMP.cpp, clang/test/OpenMP num_threads_num_teams_thread_limit_implicit_conversion.cpp

[Clang][OpenMP] Fix sema conversions for thread_limit and num_teams list values (#247450)

When processing `num_teams` and `thread_limit` lists in Sema, we were
calling `isNonNegativeIntegerValue` and ignoring the resulting
expressions. The `num_threads` lists are already handled correctly. This
commit fixes that issue and adds tests checking all three clauses.

Assisted by OpenAI Codex GPT-6 Sol.
DeltaFile
+105-0clang/test/OpenMP/num_threads_num_teams_thread_limit_implicit_conversion.cpp
+12-15clang/lib/Sema/SemaOpenMP.cpp
+117-152 files

LLVM/project 5fcceae — clang/docs ReleaseNotes.md, clang/lib/Driver/ToolChains Clang.cpp

[clang] Make -fpack-struct pack every struct, as GCC does (#247469)

GCC's -fpack-struct without a value packs every struct, union and
class, as if declared with __attribute__((packed)), and makes #pragma
pack have no effect. -fpack-struct=N only limits the alignment of each
field, like #pragma pack(N). Clang's driver turned -fpack-struct into
-fpack-struct=1, so the two did not match. A field with an aligned
attribute kept its alignment with GCC but not with Clang, and on SPARC64
GCC passed the floating-point fields of every struct in integer
registers but Clang did not.

Pass -fpack-struct to cc1 and add an implicit packed attribute to every
record definition and closure type, as GCC does. Ignore #pragma pack
with a warning, as GCC does.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+39-2clang/test/Sema/fpack-struct.c
+41-0clang/test/SemaCXX/fpack-struct.cpp
+19-6clang/test/Driver/fpack-struct.c
+11-0clang/lib/Sema/SemaAttr.cpp
+4-5clang/lib/Driver/ToolChains/Clang.cpp
+9-0clang/docs/ReleaseNotes.md
+123-137 files not shown
+140-2513 files

LLVM/project 7b8218a — libcxx/include/__memory out_ptr.h inout_ptr.h, libcxx/test/std/utilities/smartptr/adapt/inout_ptr inout_ptr.verify.cpp inout_ptr.general.pass.cpp

[libc++][memory] Fixes `std::out_ptr` complains about `__pointer_of` even if a type is explicitly specified (#247002)

Fixes #246558

The original implementation of `std::inout_ptr` and `std::out_ptr` from
https://llvm.org/PR73618 instantiated `POINTER_OF(Smart)` in
[inout.ptr]/1 and [out.ptr]/1 respectively even when the `Pointer`
template parameter was specified to be non-`void`, which resulted in
compilation error as reported in https://llvm.org/PR246558. Such overly
eager instantiation is now replaced by a more relaxed approach.
The tests were updated correspondingly.

- https://wg21.link/inout.ptr#1
- https://wg21.link/out.ptr#1

---------

Co-authored-by: Hristo Hristov <zingam at outlook.com>
Co-authored-by: A. Jiang <de34 at live.cn>
Co-authored-by: S. B. Tam <cpplearner at outlook.com>
DeltaFile
+17-0libcxx/test/std/utilities/smartptr/adapt/inout_ptr/inout_ptr.general.pass.cpp
+15-0libcxx/test/std/utilities/smartptr/adapt/out_ptr/out_ptr.general.pass.cpp
+5-2libcxx/include/__memory/out_ptr.h
+5-2libcxx/include/__memory/inout_ptr.h
+1-1libcxx/test/std/utilities/smartptr/adapt/out_ptr/out_ptr.verify.cpp
+1-1libcxx/test/std/utilities/smartptr/adapt/inout_ptr/inout_ptr.verify.cpp
+44-66 files

FreeBSD/src e2c31fb — sys/dev/ufshci ufshci_private.h

ufshci: remove the unused phase field

The hardware queue kept a phase field for MCQ mode. A UFS completion
queue has no phase bit, and MCQ completion handling will read the CQ
tail pointer register instead. Nothing reads the field.

Remove it.

Reviewed by:            imp
Differential Revision:  https://reviews.freebsd.org/D62313
Sponsored by:           Samsung Electronics
DeltaFile
+0-1sys/dev/ufshci/ufshci_private.h
+0-11 files

FreeBSD/src e1bc4ae — sys/dev/ufshci ufshci_req_queue.c

ufshci: take the recovery lock when an abort fails

The watchdog runs the recovery steps with the queue's recovery lock
held. A failed Abort Task ran the same steps from its completion
callback without the lock, so it could race the watchdog over the
queue's recovery state.

Take the recovery lock around the recovery steps in the abort
completion, and assert it in the recovery function.

Reviewed by:            imp
Differential Revision:  https://reviews.freebsd.org/D62312
Sponsored by:           Samsung Electronics
DeltaFile
+8-1sys/dev/ufshci/ufshci_req_queue.c
+8-11 files

FreeBSD/src 0aba8f0 — sys/dev/ufshci ufshci_pci.c

ufshci: use one interrupt vector on PCI

The PCI attach code came from nvme(4) and asks for one MSI-X or MSI
vector per queue. It installs an interrupt handler only when it ends
up with a single vector, though. With the default settings it asks
for two vectors, so a controller that grants two gets no handler at
all. The controller attaches, but its interrupts go unhandled and a
request completes only when the watchdog finds it past its timeout.

The driver has a single interrupt handler, which scans every queue.
Ask for one vector, trying MSI-X, then MSI, then INTx, and install
that handler in every case.

Reviewed by:            imp
Differential Revision:  https://reviews.freebsd.org/D62311
Sponsored by:           Samsung Electronics
DeltaFile
+10-28sys/dev/ufshci/ufshci_pci.c
+10-281 files

FreeBSD/src 1d8a003 — sys/dev/ufshci ufshci_req_queue.c ufshci_ctrlr.c

ufshci: give CAM every slot that I/O can use

Commit c41be266147f ("ufshci: keep a slot for admin requests") left
one slot out of the CAM openings besides the admin slot, because
letting CAM fill every I/O slot cut the throughput. The cause was the
completion path, which called back into CAM before it freed the slot.
The completion path now frees the slot first, so the spare slot only
sits idle.

Give CAM every slot that I/O can use again. On QEMU with 4k random
I/O from 4 jobs at depth 16, the throughput stayed the same and no
request came back with EBUSY. A request sent outside CAM, such as a
passthrough command, can still make CAM find the queue full. CAM
requeues its request then, so log a full queue only for the task
management queue, where it means that aborts piled up.

Reviewed by:            imp
Differential Revision:  https://reviews.freebsd.org/D62309
Sponsored by:           Samsung Electronics
DeltaFile
+4-8sys/dev/ufshci/ufshci_ctrlr.c
+8-1sys/dev/ufshci/ufshci_req_queue.c
+12-92 files

FreeBSD/src fe6aade — sys/dev/ufshci ufshci_req_queue.c

ufshci: free the slot before the completion callback

The completion path called the request's callback before it freed the
slot. CAM sends its next request from inside that callback, so that
request could find every slot taken and bounce back with EBUSY until
the slot was freed. The spare slot left out of the CAM openings hid
this. With CAM allowed to fill every I/O slot, the bouncing cut the
throughput to a fifth on QEMU.

Free the slot first, and call the callback after dropping the queue
lock. The callback uses only the copied completion and its own
argument.

Reviewed by:            imp
Differential Revision:  https://reviews.freebsd.org/D62308
Sponsored by:           Samsung Electronics
DeltaFile
+31-27sys/dev/ufshci/ufshci_req_queue.c
+31-271 files

FreeBSD/ports d03895c — www/reproxy Makefile distinfo

www/reproxy: update the port to version 1.7.5

Reported by:    portscout
DeltaFile
+3-3www/reproxy/distinfo
+2-3www/reproxy/Makefile
+5-62 files

LLVM/project ceec859 — llvm/lib/Target/AMDGPU AMDGPUMemoryUtils.cpp, llvm/test/CodeGen/AMDGPU promote-kernel-arguments.ll noclobber-barrier.ll

[AMDGPU] Revert to not respect acquires when inferring noclobber (#247616)

This effectively reverts #219991. That is unsound and re-introduces
miscompilations, but necessary as a temporary measure to avoid
performance regressions while we look into ways to recover performance.
DeltaFile
+158-162llvm/test/CodeGen/AMDGPU/agpr-copy-no-free-registers.ll
+55-44llvm/test/CodeGen/AMDGPU/noclobber-barrier.ll
+11-3llvm/lib/Target/AMDGPU/AMDGPUMemoryUtils.cpp
+5-3llvm/test/CodeGen/AMDGPU/promote-kernel-arguments.ll
+229-2124 files

LLVM/project 2638470 — flang/lib/Semantics openmp-utils.cpp, flang/test/Lower/OpenMP metadirective-construct.f90

Compare repeated constructs when runtime conditions match

When two tied selectors require the same traits, the one that repeats a
construct is a strict superset if the conditions match. isStrictSubset
rejected this whenever there was a condition trait, since different
conditions used to share the trait. Runtime conditions now have keys,
which are compared earlier, so only conditions without a key are
rejected.

Since the unguarded candidate of a match_any WHEN clause now keeps its
condition trait, this also applied when the condition is false. With

```
  !$omp metadirective &
  !$omp& when(construct={parallel do}, user={condition(a)}, &
  !$omp&      implementation={vendor(score(4): llvm), &
  !$omp&      extension(match_any)}: taskyield) &
  !$omp& when(construct={parallel do, parallel}, user={condition(a)}, &
  !$omp&      implementation={vendor(llvm), extension(match_any)}: &

    [12 lines not shown]
DeltaFile
+59-0flang/test/Lower/OpenMP/metadirective-construct.f90
+25-0llvm/unittests/Frontend/OpenMPContextTest.cpp
+3-2llvm/lib/Frontend/OpenMP/OMPContext.cpp
+3-2flang/lib/Semantics/openmp-utils.cpp
+90-44 files

LLVM/project 7a314b2 — llvm/lib/Target/RISCV RISCVISelLowering.cpp, llvm/test/CodeGen/RISCV/rvv inline-asm-tuple-outputs.ll

[RISCV] Handle fractional LMUL tuple inline asm outputs (#247501)

Fractional LMUL tuple operands share their register class with LMUL=1
tuples. Inline asm therefore copies their results from an LMUL=1
register value type. Inputs already handle this with TUPLE_CAST, but
outputs fall through to generic reconstruction and crash.

Mirror input handling in joinRegisterPartsIntoValue to reinterpret the
result without changing its register group.

Related to #247415.

Assisted-by: TRAE CLI (GPT-6)
DeltaFile
+118-0llvm/test/CodeGen/RISCV/rvv/inline-asm-tuple-outputs.ll
+7-0llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+125-02 files

FreeBSD/src fe81449 — sys/powerpc/powerpc altivec.c

powerpc/altivec: initialize vrsave to all regs active

libunwind uses vrsave to determine which registers to restore, but
vrsave is never actually updated in modern OSs including FreeBSD.  This
leads to libunwind not restoring any altivec registers, resulting in
strange behaviors.

With this change gdb can now print a backtrace without crashing.

Patch originally provided by pkubaj.

MFC after:      3 days
DeltaFile
+1-0sys/powerpc/powerpc/altivec.c
+1-01 files

FreeBSD/src e19035a — sys/dev/bxe bxe_stats.c

bxe: Always return uint64_t from bxe_hilo

The interface counters are always uint64_t, so truncating to a signed
long only results in weird sign-extension errors on 32-bit platforms.

Reported by:    llm-postcr
Fixes:          df3601781d3e ("- Use if_inc_counter() to increment...")
DeltaFile
+1-4sys/dev/bxe/bxe_stats.c
+1-41 files

FreeBSD/src c29f74d — share/man/man4 Makefile iicbus.4

pcf: Actually remove the pcf(4) manpage and stop installing it

Reported by:    llm-postcr
Fixes:          ae4f5920971a ("pcf: Remove the pcf(4) driver")
DeltaFile
+0-70share/man/man4/pcf.4
+1-3share/man/man4/iicbus.4
+0-1share/man/man4/Makefile
+1-743 files

FreeBSD/src 7ee6425 — crypto/objects obj_dat.h, test sslapitest.c safe_math_test.c

openssl: import 3.5.10

This change adds openssl 3.5.10 from upstream [1].

The 3.5.10 artifact was been verified via PGP key [2] and by SHA256
checksum [3].

3.5.10 is a security bugfix release which resolves several CVE issues, the
highest severity issue being a Medium.  Users are encouraged to upgrade
to this release.

More information about the release (from a high level) can be found in
the release notes [4].

Updated via `update_openssl.sh` [5] like: `update_openssl.sh 3.5.10`.

[1]: https://github.com/openssl/openssl/releases/download/openssl-3.5.10/openssl-3.5.10.tar.gz
[2]: https://github.com/openssl/openssl/releases/download/openssl-3.5.10/openssl-3.5.10.tar.gz.asc
[3]: https://github.com/openssl/openssl/releases/download/openssl-3.5.10/openssl-3.5.10.tar.gz.sha256

    [2 lines not shown]
DeltaFile
+2,523-2,523crypto/objects/obj_dat.h
+846-1test/radix/quic_tests.c
+649-3test/quicapitest.c
+583-3test/evp_extra_test.c
+402-46test/safe_math_test.c
+420-0test/sslapitest.c
+5,423-2,576165 files not shown
+9,613-3,351171 files

FreeBSD/src a4e4e99 — sys/kern imgact_binmisc.c, tests/sys/kern binmisc_helper.c binmisc_test.sh

imgact_binmisc: fix validation of new entries

The magic offset and size are both uint32_t, so their sum may wrap and
pass the IBE_MATCH_MAX check with an offset far outside of the image
header.  Any exec that's checked against such an entry will then read
well beyond the header.

The name and interpreter length checks also read the byte following the
string before checking its index, so either one may fill its field
without a terminating NUL as long as the next field starts with one.  A
full-length interpreter then overflows the normalization buffer in
imgact_binmisc_populate_interp() by a byte.  An unterminated name is
instead truncated, which lets the same name be added more than once
since the duplicate check compares against the truncated copy.

Avoid the wrap and require both strings to be terminated within their
fields, and add regression tests for each.  Note that these are only
reachable by root on the host.


    [2 lines not shown]
DeltaFile
+56-0tests/sys/kern/binmisc_test.sh
+48-1tests/sys/kern/binmisc_helper.c
+14-5sys/kern/imgact_binmisc.c
+118-63 files

FreeBSD/src af0cb75 — sys/kern imgact_binmisc.c, tests/sys/kern binmisc_test.sh

imgact_binmisc: fix matching of magic bytes >= 0x80 without a mask

The image header is a char *, so on platforms with a signed char each
header byte is sign-extended before it's compared against the unsigned
magic.  Any magic byte >= 0x80 then fails to match unless IBF_USE_MASK
is set, as the mask happens to strip the sign extension.

Compare the header as uint8_t instead, and add a regression test.

Reviewed by:    imp, kib, markj
Differential Revision:  https://reviews.freebsd.org/D62130
DeltaFile
+20-0tests/sys/kern/binmisc_test.sh
+2-2sys/kern/imgact_binmisc.c
+22-22 files

FreeBSD/src 37c9274 — usr.sbin/binmiscctl binmiscctl.8

binmiscctl.8: restructure the 'add' definition, note short options

The previous version just used long prose to describe the different
options available, which makes it hard to work in the short options that
are defined.  It's debatably also a less effective way to describe this.

Use a more standard option list and describe each option individually.
While we're here, fix the spelling of 'indent' later on.

Note that the descriptions are largely unchanged.

Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D62150
DeltaFile
+59-65usr.sbin/binmiscctl/binmiscctl.8
+59-651 files

FreeBSD/src 1e1b821 — sys/kern imgact_binmisc.c, tests/sys/kern binmisc_test.sh

imgact_binmisc: enforce IBE_MAX_ENTRIES under the list lock

The sysctl handler checked the entry count without the list lock, but
the handlers are MPSAFE so concurrent adds may push the count past
IBE_MAX_ENTRIES.  Once past, the == check never matches again and the
limit stops being enforced at all.

Add a check under the lock in imgact_binmisc_add_entry() and use >=,
drop the stale comment claiming that sysctl serializes us, and add a
test that fills the table.  The test can't reliably hit the race, but
it at least covers the limit.

Reviewed by:    kib, markj
Differential Revision:  https://reviews.freebsd.org/D62129
DeltaFile
+29-0tests/sys/kern/binmisc_test.sh
+18-8sys/kern/imgact_binmisc.c
+47-82 files

FreeBSD/src 4bcf562 — sys/kern imgact_binmisc.c

imgact_binmisc: don't leak the namei buffer with IBF_PRE_OPEN

namei(9) leaves the pathname buffer for the caller to free on success,
so we leak one from the NAMEI zone each time an entry is added with
IBF_PRE_OPEN.  Free it once we've grabbed the vnode.

Reviewed by:    kib, markj
Differential Revision:  https://reviews.freebsd.org/D62128
DeltaFile
+1-0sys/kern/imgact_binmisc.c
+1-01 files

FreeBSD/src b02932b — tests/sys/kern Makefile binmisc_helper.c

tests: add some basic tests for imgact_binmisc

These cover managing entries through binmiscctl(8) and exec'ing images
through matching entries, including interpreter argument and macro
expansion, masked magic at an offset, and pre-opened interpreters.

A small helper is included to execve(2) an image directly, so that we
can check for ENOEXEC without sh(1) trying to run the image as a script
instead.  This will be expanded in future commits to include other
useful functionality that binmiscctl(8) cannot provide.

Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D62126
DeltaFile
+193-0tests/sys/kern/binmisc_test.sh
+40-0tests/sys/kern/binmisc_helper.c
+4-0tests/sys/kern/Makefile
+237-03 files

FreeBSD/ports b9694ed — databases/sqlcipher Makefile distinfo

databases/sqlcipher: Update to v4.21.0

Changelog:
https://github.com/sqlcipher/sqlcipher/releases#release-v4.21.0
DeltaFile
+3-3databases/sqlcipher/distinfo
+1-2databases/sqlcipher/Makefile
+4-52 files

LLVM/project 516266a — llvm/lib/Target/RISCV RISCVFrameLowering.h RISCVFrameLowering.cpp, llvm/test/CodeGen/RISCV shrinkwrap.ll

[RISCV][CFI] Implement resetCFIToInitialState for RISCVFrameLowering (#245548)

RISCVFrameLowering enables `CFIFixup` but left
`resetCFIToInitialState()` as a no-op, leaving stale CFA offsets and
callee-saved register rules active when transitioning from a framed
block to a frameless block.

Override `resetCFIToInitialState()` to reset the CFA to SP + 0 and emit
`.cfi_same_value` for callee-saved registers, updating affected test
expectations.

Close #240683
DeltaFile
+29-0llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
+5-0llvm/test/CodeGen/RISCV/shrinkwrap.ll
+2-0llvm/lib/Target/RISCV/RISCVFrameLowering.h
+36-03 files

LLVM/project d4f69e3 — clang/lib/Parse ParsePragma.cpp

[clang] Validate vectorize_width state after consuming its identifier
DeltaFile
+11-10clang/lib/Parse/ParsePragma.cpp
+11-101 files