LLVM/project 3a74194 — llvm/docs MIRLangRef.md TestingGuide.md

docs: Add some best practices documentation for codegen tests

Document common review feedback.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+92-7llvm/docs/TestingGuide.md
+4-1llvm/docs/MIRLangRef.md
+96-82 files

LLVM/project 05df870 — clang/test/Preprocessor riscv-target-features-sifive.c, llvm/docs RISCVUsage.md

[RISCV] Support Xsfvfofp4min assembler version 0.1 (#164820)

SiFive vendor OFP4 conversion extension Xsfvfofp4min
spec:
https://www.sifive.com/document-file/ofp4-conversion-instruction-xsfvfofp4min-extension
DeltaFile
+25-0llvm/test/MC/RISCV/rvv/xsfvfofp4min.s
+8-0llvm/lib/Target/RISCV/RISCVFeatures.td
+8-0clang/test/Preprocessor/riscv-target-features-sifive.c
+6-0llvm/lib/Target/RISCV/RISCVInstrInfoXSf.td
+4-0llvm/test/CodeGen/RISCV/attributes-sifive.ll
+4-0llvm/docs/RISCVUsage.md
+55-04 files not shown
+61-010 files

LLVM/project 1dde11e — libc/src/string string_utils.h string_length.h, libc/src/string/memory_utils/generic inline_strlen.h

[libc] Make find_first_character_impl return const void*

This means we only have to const_cast in one place instead of in all the
implementations and I find const_cast annoying.

Assisted-By: LLM

Reviewers: jhuber6, michaelrj-google

Pull Request: https://github.com/llvm/llvm-project/pull/244468
DeltaFile
+7-7libc/src/string/string_length.h
+7-7libc/src/string/memory_utils/x86_64/inline_strlen.h
+4-4libc/test/src/strings/wide_read_memory_test.cpp
+3-3libc/src/string/memory_utils/generic/inline_strlen.h
+1-1libc/src/string/string_utils.h
+22-225 files

LLVM/project 2ab0676 — libc/src/__support/CPP simd.h, libc/src/string/memory_utils/generic inline_strlen.h

[libc] Add simd_bitmask type

Just a thin wrapper around internal::get_as_integer_type. This is nicer
than using an internal type outside of the library implementation in
inline_strlen.h. Putting this up given I plan on using it more for an
optimized memchr implementation.

Assisted-By: LLM

Reviewers: jhuber6, michaelrj-google

Pull Request: https://github.com/llvm/llvm-project/pull/244467
DeltaFile
+5-3libc/src/__support/CPP/simd.h
+1-1libc/src/string/memory_utils/generic/inline_strlen.h
+6-42 files

LLVM/project 82bab8b — llvm/docs TestingGuide.md

docs: Document to discard unused outputs from tests (#244465)

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+21-0llvm/docs/TestingGuide.md
+21-01 files

LLVM/project 37c304c — clang/lib/Sema SemaBoundsSafety.cpp, clang/test/AST attr-counted-by-struct-ptrs.c

Address comments: Add more test coverage and some style fixes

Assisted-by: Sonnet 5.5
DeltaFile
+41-1clang/test/Sema/attr-counted-by-struct-ptrs.c
+42-0clang/test/Sema/attr-counted-by-std-syntax-on-chunk.c
+27-0clang/test/Sema/attr-counted-by-return-type.c
+8-8clang/lib/Sema/SemaBoundsSafety.cpp
+11-0clang/test/AST/attr-counted-by-struct-ptrs.c
+129-95 files

LLVM/project a5b1879 — llvm/lib/Target/BPF BPFUnwind.cpp, llvm/test/CodeGen/BPF unwind-dead-blocks.ll

BPF: Fix removing the blocks after the start of an unwind (#242856)

BPFUnwindLower erased each dead block as soon as it unlinked it, so a
dead block that was a successor of a later one was used after being
freed. It also kept an address-taken block but not the blocks it
branches to, leaving a branch to an erased block.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+107-0llvm/test/CodeGen/BPF/unwind-dead-blocks.ll
+17-6llvm/lib/Target/BPF/BPFUnwind.cpp
+124-62 files

LLVM/project 64494cf — clang/lib/CIR/Dialect/Transforms CIRABIClassifierAArch64.cpp, clang/test/CIR/CodeGen aarch64-abi-classify-opencl-arg-types.cl pointer-to-member-func-cast.cpp

[CIR] Enable AArch64 calling convention lowering in CIR (#244014)

This change enables CIR calling convention lowering for AArch64 targets
by default. Lowering for va_args functions, matrix types, and SVE types
is left to be implemented in future changes, so programs using these
features will fail to compile after this change. The
-fno-clangir-call-conv-lowering option can be used to preserve the old
behavior.

Some AArch64 built-in tests that already had optional CIR run lines had
to be modified to use the -fno-clangir-call-conv-lowering option when
the test uses types that are not yet handled in the CIR lowering. These
will be updated later as the type handling is completed.

Assisted-by: Cursor / claude-opus-5.5
DeltaFile
+474-0clang/test/CIR/CodeGen/aarch64-abi-classify-arg-types.c
+247-0clang/test/CIR/CodeGen/aarch64-abi-classify-return-types.c
+182-0clang/test/CIR/CodeGen/aarch64-abi-classify-arg-types.cpp
+111-0clang/lib/CIR/Dialect/Transforms/CIRABIClassifierAArch64.cpp
+45-42clang/test/CIR/CodeGen/pointer-to-member-func-cast.cpp
+60-0clang/test/CIR/CodeGen/aarch64-abi-classify-opencl-arg-types.cl
+1,119-4235 files not shown
+1,388-21441 files

LLVM/project 99962be — libc/config/linux/aarch64 config.json, libc/config/linux/power config.json

fix34

Created using spr 1.3.7
DeltaFile
+7-0libc/config/linux/aarch64/config.json
+3-0libc/config/linux/power/config.json
+10-02 files

LLVM/project c3ffe61 — clang/lib/CodeGen BackendUtil.cpp, clang/test/CodeGen/AMDGPU upgraded-datalayout.ll

[Clang] Compare data layouts, not strings, in the backend check (#244213)
DeltaFile
+30-0clang/test/CodeGen/AMDGPU/upgraded-datalayout.ll
+4-3clang/lib/CodeGen/BackendUtil.cpp
+34-32 files

LLVM/project 6157679 — clang/test/AST attr-counted-by-struct-ptrs.c, clang/test/Sema attr-counted-by-struct-ptrs.c

Add some more tests
DeltaFile
+14-1clang/test/Sema/attr-counted-by-struct-ptrs.c
+11-0clang/test/AST/attr-counted-by-struct-ptrs.c
+25-12 files

LLVM/project 4b4bcfe — llvm/test/tools/llvm-profgen/AArch64/Inputs cs-preinline-scc-late-parent.prof cs-preinline-scc-late-base.prof, llvm/tools/llvm-profgen CSPreInliner.cpp

[llvm-profgen] Defer merging a context until its caller has decided

The CS pre-inliner goes over functions in top-down order (callers before
callees). For each function it first calls getBaseSamplesFor(), which
merges every context of that function that no caller has inlined into
the function's base (top-level) profile. Only then does it decide which
callees to inline. That merge is only correct if every caller has
already made its decision. In a recursive SCC no order can guarantee
that, so a callee can be processed first and take contexts that its
caller would have kept inlined.

Repro:

https://godbolt.org/z/5853ev7Mb

The source is two mutually recursive functions:

  extern "C" unsigned long arith(unsigned long n) {
    ...

    [116 lines not shown]
DeltaFile
+245-0llvm/test/tools/llvm-profgen/AArch64/Inputs/cs-preinline-scc.prof
+229-0llvm/test/tools/llvm-profgen/AArch64/Inputs/cs-preinline-scc-nested.prof
+228-0llvm/test/tools/llvm-profgen/AArch64/Inputs/cs-preinline-scc-late-base.prof
+228-0llvm/test/tools/llvm-profgen/AArch64/Inputs/cs-preinline-scc-late-hot.prof
+222-0llvm/test/tools/llvm-profgen/AArch64/Inputs/cs-preinline-scc-late-parent.prof
+124-6llvm/tools/llvm-profgen/CSPreInliner.cpp
+1,276-610 files not shown
+1,455-716 files

LLVM/project bf49a3d — llvm/lib/Analysis ValueTracking.cpp, llvm/test/Analysis/ValueTracking signbits-extract-elt.ll

[ValueTracking] Propagate demanded lanes through TRUNC in sign-bit queries (#244295)

Use the demanded lanes when computing the sign bits of the input.

This matches the behavior in SDAG.

Assisted by: GPT 6.1 Sol
DeltaFile
+16-0llvm/test/Analysis/ValueTracking/signbits-extract-elt.ll
+1-1llvm/lib/Analysis/ValueTracking.cpp
+17-12 files

LLVM/project c62b10f — libc/src/string/memory_utils/generic inline_strlen.h

fix2

Created using spr 1.3.7
DeltaFile
+3-5libc/src/string/memory_utils/generic/inline_strlen.h
+3-51 files

LLVM/project 04f6d2b — libc/src/string/memory_utils/generic inline_strlen.h

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+3-5libc/src/string/memory_utils/generic/inline_strlen.h
+3-51 files

LLVM/project 1050f8e — libc/src/string/memory_utils/generic inline_strlen.h

fix2

Created using spr 1.3.7
DeltaFile
+3-5libc/src/string/memory_utils/generic/inline_strlen.h
+3-51 files

LLVM/project 108d69f — libc/src/string/memory_utils/generic inline_strlen.h

fix

Created using spr 1.3.7
DeltaFile
+5-2libc/src/string/memory_utils/generic/inline_strlen.h
+5-21 files

LLVM/project 04bc912 — libc/src/string/memory_utils/generic inline_strlen.h

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+5-2libc/src/string/memory_utils/generic/inline_strlen.h
+5-21 files

LLVM/project df48e8c — libc/src/string/memory_utils/generic inline_strlen.h

fix

Created using spr 1.3.7
DeltaFile
+5-2libc/src/string/memory_utils/generic/inline_strlen.h
+5-21 files

FreeBSD/src 910b546 — sys/conf files.arm64, sys/dev/clk/mediatek mt7986_topckgen.c

clk/mediatek: Add MT7986 TOPCKGEN clock controller

TOPCKGEN provides the fixed dividers of the PLL outputs and the top
level muxes.  Each mux field has a gate bit, is changed by
read-modify-write and is latched through an update register.  The
bus, DRAM, SGMII register and 26 MHz system clocks never stop.
TOPCKGEN attaches after APMIXEDSYS.

The layout follows the MT7986 clock drivers of Linux [1] and U-Boot [2],
which were used for hardware facts only, with one change:
top_net2pll_d3_d2 divides by 6 (measured on a Banana Pi BPI-R3), as its
name and MediaTek's SDK [3] say, and not by 2.

The node is also a syscon.  That interface is not provided yet, since no
MT7986 node uses it.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/clk/mediatek/clk-mt7986-topckgen.c?h=v7.1
[2] https://source.denx.de/u-boot/u-boot/-/blob/v2025.10/drivers/clk/mediatek/clk-mt7986.c
[3] https://github.com/mediatek/mtk-openwrt-feeds/blob/f185b9c74f1d/21.02/files/target/linux/mediatek/files-5.4/drivers/clk/mediatek/clk-mt7986.c

    [5 lines not shown]
DeltaFile
+277-0sys/dev/clk/mediatek/mt7986_topckgen.c
+1-0sys/conf/files.arm64
+278-02 files

FreeBSD/src 846ec9b — sys/arm64/conf GENERIC NOTES, sys/conf options.arm64

arm64: Add MediaTek SoC support skeleton

Add the SOC_MEDIATEK and SOC_MEDIATEK_MT7986 options, list them in
NOTES, add std.mediatek, include it in GENERIC and in a MEDIATEK kernel
configuration, and add a DTB module that builds the Banana Pi BPI-R3
(MT7986A) DTB.

Reviewed by:    mmel
Approved by:    markj (mentor)
Sponsored by:   Alchemilla Ventures Private Limited
Differential Revision:  https://reviews.freebsd.org/D61186
DeltaFile
+27-0sys/arm64/conf/MEDIATEK
+12-0sys/arm64/conf/std.mediatek
+5-0sys/modules/dtb/mediatek/Makefile
+2-0sys/conf/options.arm64
+2-0sys/arm64/conf/NOTES
+1-0sys/arm64/conf/GENERIC
+49-06 files

FreeBSD/src cd20e8d — sys/conf files.arm64, sys/dev/clk/mediatek mt7986_apmixedsys.c

clk/mediatek: Add MT7986 APMIXEDSYS PLL controller

Add the eight MT7986 PLLs, all fed by the 40 MHz crystal.  MPLL,
NET1PLL and NET2PLL never stop: they feed the DRAM, bus and 26 MHz
clocks.  ARMPLL clocks the CPUs; to change its rate, a cpufreq driver
moves them to another clock first.  APMIXEDSYS attaches after the fixed
clocks.

The rates are the ones set by TF-A BL2, which also starts every PLL.
The register layout and the reset bar bit (CON0 bit 24 on NET2PLL,
MMPLL, WEDMCUPLL, NET1PLL and MPLL) follow MediaTek's TF-A [1][2].

[1] https://github.com/mtk-openwrt/arm-trusted-firmware/blob/a229810586d8/plat/mediatek/mt7986/drivers/pll/pll.c
[2] https://github.com/mtk-openwrt/arm-trusted-firmware/blob/a229810586d8/plat/mediatek/mt7986/drivers/pll/pll.h

Reviewed by:    mmel
Approved by:    markj (mentor)
Sponsored by:   Alchemilla Ventures Private Limited
Differential Revision:  https://reviews.freebsd.org/D61188
DeltaFile
+98-0sys/dev/clk/mediatek/mt7986_apmixedsys.c
+1-0sys/conf/files.arm64
+99-02 files

FreeBSD/src 316e388 — sys/conf files.arm64, sys/dev/clk/mediatek mtk_clk_gate.c mtk_clk.h

clk/mediatek: Add common MediaTek clock and reset support

MediaTek SoCs split their clock tree over several controllers built from
the same blocks.  Add a base driver that maps a controller's registers
and registers its table of clocks, and the node types the tables use:

 - PLL with the MT7986 register layout: the rate is set by the
   frequency control word and the post divider.  A new control word is
   only taken over when the PLL is enabled, so a running PLL is stopped
   while its rate is changed, and a PLL that cannot stop keeps its rate.
   Without a lock bit, a PLL that was never programmed cannot be told
   from a stopped one, so the node has no gate: firmware starts the
   PLLs, and a PLL that is off reports 0 Hz and cannot be set.
 - Mux with an optional gate bit and an optional update latch, changed
   by read-modify-write or, where the mux register is read-only,
   through set/clear registers.
 - Gate, changed in the same two ways.

Clocks of other controllers are linked clocks, so the registration order

    [15 lines not shown]
DeltaFile
+227-0sys/dev/clk/mediatek/mtk_clk.c
+214-0sys/dev/clk/mediatek/mtk_clk_pll.c
+164-0sys/dev/clk/mediatek/mtk_clk_mux.c
+135-0sys/dev/clk/mediatek/mtk_clk.h
+112-0sys/dev/clk/mediatek/mtk_clk_gate.c
+6-0sys/conf/files.arm64
+858-06 files

FreeBSD/src b803000 — sys/dev/uart uart_core.c uart.h

uart: Add a flags field to struct uart_bas

uart_bus_probe() sets UART_BAS_IN_PROBE in it while the hardware driver
probes.  The softc is then still a plain struct uart_softc, so code that
the probe method shares with attached devices can check the flag before
using the class specific fields.

No functional change.

Reviewed by:    mmel
Approved by:    markj (mentor)
Sponsored by:   Alchemilla Ventures Private Limited
Differential Revision:  https://reviews.freebsd.org/D61620
DeltaFile
+3-0sys/dev/uart/uart_core.c
+3-0sys/dev/uart/uart.h
+6-02 files

FreeBSD/src e7723c7 — sys/dev/uart uart_dev_ns8250.h uart_dev_ns8250.c

uart: Factor out the ns8250 baud rate generator code

Move the code that programs the divisor latch out of ns8250_param()
into ns8250_set_baudrate(), and the code that computes the rate from
it out of the UART_IOCTL_BAUD handler into ns8250_get_baudrate().

ns8250_get_divisor() now returns the input clock cycles per bit,
prescaler included, in units of 1 / NS8250_DIVISOR_SCALE, and the
rate, the delays and the rclk guess are derived from it.  This leaves
room for other prescalers and for fractional dividers.

ns8250_delay() is now computed in 64 bits with one formula.  The old
code split at a divisor of 134 to keep 16000000 * divisor within an int
(ebecffe93038), and above 134 divided by rclk / 1000 rounded down.  With
a clock that is not a multiple of 1 kHz this made the delay longer by
(rclk % 1000) / (rclk - rclk % 1000): 0.011% with a 1.8432 MHz clock,
e.g. 20002 instead of 20000 us at 50 baud.  Up to a divisor of 134 the
result is the same.  The delay is only a polling interval for
ns8250_drain() and the FIFO size probe.

    [7 lines not shown]
DeltaFile
+49-19sys/dev/uart/uart_dev_ns8250.c
+6-0sys/dev/uart/uart_dev_ns8250.h
+55-192 files

FreeBSD/src bff1e7c — sys/conf files.arm64, sys/dev/clk/mediatek mt7986_infracfg.c

clk/mediatek: Add MT7986 INFRACFG clock and reset controller

INFRACFG provides the clock muxes and gates of the infrastructure
peripherals, and is their reset controller (the binding requires
#reset-cells).  It attaches after TOPCKGEN.

The gate and mux status registers are read-only (checked on a Banana
Pi BPI-R3), so gates and muxes are changed through their set and clear
registers.

The resets come in three banks, each with an assert register, a deassert
register at +4 and a status register at +8.  Reset id n is bit n % 32 of
bank n / 32.  Bank 0 at 0x70 is the one MediaTek's TF-A uses for the
TRNG [1].  Banks 1 (0x80) and 2 (0x90) were found on a Banana Pi BPI-R3
by resetting known blocks.

The clocks follow the MT7986 drivers of Linux [2] and U-Boot [3], which
were used for hardware facts only, with two changes:


    [19 lines not shown]
DeltaFile
+265-0sys/dev/clk/mediatek/mt7986_infracfg.c
+1-0sys/conf/files.arm64
+266-02 files

FreeBSD/src b0cb5ad — sys/arm64/conf std.mediatek, sys/conf files.arm64

uart: Add MediaTek UART driver

The MediaTek UART is a 16550 with 32-bit spaced registers and a
fractional baud rate generator.  The driver gives that generator to the
ns8250 code through its set_baudrate, get_baudrate and get_divisor
functions, and uses the ns8250 code for everything else.  The low-level
console uses the ns8250 code too, so it keeps the rate the firmware set.

For the 30 MHz clock of Table 2-6 of the reference manual [1], the
divisor, SAMPLE_COUNT, SAMPLE_POINT and the number of extended bits are
the table's, except at 7200 baud, where one extended bit is closer than
the table's two.  Rates that need fewer than 8 samples per bit are
rejected: below that, the manual requires guard time from the sender.

Probe enables the clocks while it runs, attach applies the assigned
clocks and enables them, and detach releases them.  The console is
probed on the clocks the firmware left running and keeps its clocks on
detach.  Until there is an MT7986 pinctrl driver, UART1 and UART2 rely
on the firmware's pin setup.

    [9 lines not shown]
DeltaFile
+407-0sys/dev/uart/uart_dev_mtk.c
+3-0sys/arm64/conf/std.mediatek
+1-0sys/conf/files.arm64
+411-03 files

FreeBSD/src 49bd38b — sys/dev/uart uart_dev_ns8250.h uart_dev_ns8250.c

uart: Let ns8250 drivers provide their own baud rate generator

Add set_baudrate, get_baudrate and get_divisor function pointers to
struct ns8250_softc.  A driver for a UART with a baud rate generator of
its own sets them before calling ns8250_bus_attach(), which sets the
ones left NULL to the 16550 functions.  The param, ioctl, flush and
transmit methods use them, and ns8250_delay(), ns8250_drain() and
ns8250_flush() now take the softc to reach them.

While probing, the softc is not yet an ns8250_softc, so ns8250_delay()
uses the 16550 divisor when UART_BAS_IN_PROBE is set.  The low-level
console code, which has no softc, also uses the 16550 functions.

No functional change for existing drivers.

Reviewed by:    mmel
Approved by:    markj (mentor)
Sponsored by:   Alchemilla Ventures Private Limited
Differential Revision:  https://reviews.freebsd.org/D61611
DeltaFile
+42-18sys/dev/uart/uart_dev_ns8250.c
+14-0sys/dev/uart/uart_dev_ns8250.h
+56-182 files

FreeBSD/src 60a559d — sys/arm64/arm64 pmap.c

arm64/pmap: Ignore pmap_advise() for stage 2 pmaps

When vm_fault() handles a sequential fault that needs pager I/O, it
calls vm_fault_dontneed(), which passes MADV_DONTNEED to pmap_advise()
for the pages behind the fault.  For vmm(4) guest memory the pmap is a
stage 2 pmap, so a guest that reads paged-out memory sequentially
panics an INVARIANTS kernel on the stage 1 assertion in pmap_advise().

MADV_DONTNEED and MADV_FREE are only hints, so ignore them for stage 2
pmaps.

Reviewed by:    markj
Approved by:    markj (mentor)
Sponsored by:   Alchemilla Ventures Private Limited
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D61622
DeltaFile
+9-2sys/arm64/arm64/pmap.c
+9-21 files

LLVM/project 3115759 — llvm/lib/Transforms/Vectorize VectorCombine.cpp, llvm/test/Transforms/VectorCombine/AArch64 vector-deinterleave2-merge.ll

[VectorCombine] Fold deinterleave2 with smaller element size on big-endian (#243356)

The fold bailed out on big-endian targets because the vector bitcast
puts element 0 of the narrow vector in the high half of each wide
element there. The merge pattern that can be folded is therefore
mirrored: the low half of each merged element comes from the second
deinterleaved field. Swap the roles of the two fields when matching the
merge and swap the field indices of the newly created deinterleave
accordingly, so the fold applies to that mirrored pattern instead of
being disabled.

Fix comment:
https://github.com/llvm/llvm-project/pull/238626#discussion_r4483976228
DeltaFile
+187-0llvm/test/Transforms/VectorCombine/AArch64/vector-deinterleave2-merge.ll
+5-4llvm/lib/Transforms/Vectorize/VectorCombine.cpp
+192-42 files