LLVM/project fad7797 — llvm/lib/Target/X86 X86FlagsCopyLowering.cpp, llvm/test/CodeGen/X86 flags-copy-lowering-inlineasm-br-error.mir flags-copy-lowering-inlineasm-br.mir

[X86] Handle more INLINEASM_BR shapes in X86FlagsCopyLowering

A copy before an INLINEASM_BR that leaves EFLAGS alone reaches the asm's
indirect targets, but the pass stopped at a later redefinition of EFLAGS
in the block and never rewrote the reads there. It could also hoist the
test position to the end of a block with an asm, which the indirect path
skips, and splitting a block between two conditional branches moved the
asm's indirect edges to the new block.

Follow the copy into the indirect targets of an asm that it reaches,
don't hoist the test into a block with an INLINEASM_BR, and keep the
asm's indirect edges in the first half of a split block. A block that
both the copy and an indirect path from an asm before it reach needs a
PHI, which the pass can't insert, so report it as it already does for a
use that the copy doesn't dominate.

Assisted-by: Claude Opus 5.5
DeltaFile
+261-0llvm/test/CodeGen/X86/flags-copy-lowering-inlineasm-br.mir
+129-32llvm/lib/Target/X86/X86FlagsCopyLowering.cpp
+69-0llvm/test/CodeGen/X86/flags-copy-lowering-inlineasm-br-error.mir
+459-323 files

LLVM/project ba132a4 — llvm/lib/Target/X86 X86FlagsCopyLowering.cpp

Use contains() to check for a visited block

Assisted-by: Claude Opus 5.5
DeltaFile
+1-1llvm/lib/Target/X86/X86FlagsCopyLowering.cpp
+1-11 files

LLVM/project 99ec082 — llvm/lib/Target/X86 X86FlagsCopyLowering.cpp, llvm/test/CodeGen/X86 flags-copy-lowering-inlineasm-br.mir

[X86] Fix EFLAGS copy lowering across INLINEASM_BR indirect edges

An INLINEASM_BR isn't a terminator, so it can branch to an indirect
target from the middle of its block, before the instructions after it
run. The EFLAGS that live into an indirect target are the ones at the
asm, not the ones at the end of the block, but X86FlagsCopyLowering
assumed the latter in two places.

When the pass lowers an EFLAGS copy, it rewrites the copy's uses in its
block and then in every successor that EFLAGS live into. For a copy
after an INLINEASM_BR, that includes the asm's indirect targets, which
the copy never reaches, so the pass removed their live-in and rewrote
their flag reads to use SETCCs computed after the asm, which only the
fallthrough path runs. The pass could also hoist the test position for
a copy in an indirect target into its predecessor, before the
terminator that follows the asm, where the indirect path never goes.

Don't follow a copy from its block into the indirect targets of an
INLINEASM_BR before it, and don't hoist the test position out of an

    [11 lines not shown]
DeltaFile
+147-0llvm/test/CodeGen/X86/flags-copy-lowering-inlineasm-br.mir
+23-3llvm/lib/Target/X86/X86FlagsCopyLowering.cpp
+170-32 files

LLVM/project 5e874ed — llvm/lib/Target/X86 X86FlagsCopyLowering.cpp

Constify the iterator in the for loop

Co-authored-by: Nick Desaulniers <ndesaulniers at google.com>
DeltaFile
+1-1llvm/lib/Target/X86/X86FlagsCopyLowering.cpp
+1-11 files

LLVM/project 36abab5 — llvm/lib/Target/X86 X86FlagsCopyLowering.cpp

Use braces for the nested loops over the copy's block
DeltaFile
+10-6llvm/lib/Target/X86/X86FlagsCopyLowering.cpp
+10-61 files

LLVM/project 873322a — llvm/test/CodeGen/AArch64 callbr-asm-outputs-indirect-isel.ll, llvm/test/CodeGen/X86 callbr-asm-outputs-indirect-isel-m32.ll callbr-asm-outputs-indirect-isel.ll

Regenerate callbr tests for label-must-be-emitted

Main now prints label-must-be-emitted on INLINEASM_BR indirect targets
(#234850).

Assisted-by: Claude Opus 5.5
DeltaFile
+3-3llvm/test/CodeGen/X86/callbr-asm-outputs-indirect-isel.ll
+1-1llvm/test/CodeGen/X86/callbr-asm-outputs-indirect-isel-m32.ll
+1-1llvm/test/CodeGen/AArch64/callbr-asm-outputs-indirect-isel.ll
+5-53 files

LLVM/project ed382e9 — llvm/lib/CodeGen/SelectionDAG SelectionDAGBuilder.cpp, llvm/test/CodeGen/X86 callbr-asm-error.ll

Move the asm error handling to its own PR

This PR now fixes only valid asm whose outputs crash the indirect targets.
Lowering a callbr whose asm has an error, which crashes after reporting
it, moves to its own PR stacked on this one.

Assisted-by: Claude Opus 5.5
DeltaFile
+0-37llvm/test/CodeGen/X86/callbr-asm-error.ll
+2-17llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+2-542 files

LLVM/project afcc450 — llvm/lib/CodeGen/SelectionDAG SelectionDAGBuilder.cpp

Remove the stale FollowCopyChain comment and unrelated comment changes

The comment that explained FollowCopyChain's walk was left above
visitCallBrLandingPad() when the walk was removed. Also put the BTI comment
in visitCallBr() back as it was, and fix a double space.

Assisted-by: Claude Opus 5.5
DeltaFile
+6-29llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+6-291 files

LLVM/project 352c87c — llvm/lib/CodeGen/SelectionDAG SelectionDAGBuilder.cpp

Don't add duplicate registers as live-in.

Co-authored-by: Nick Desaulniers <ndesaulniers at google.com>
DeltaFile
+1-1llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+1-11 files

LLVM/project 2166ded — llvm/test/CodeGen/AArch64 callbr-asm-outputs-indirect-isel.ll, llvm/test/CodeGen/RISCV callbr-asm-outputs.ll

Test more outputs that the indirect targets convert

Add the RISC-V shape of #143795, where an i32 output is sign-extended on
each path, a float in a specific physical register on x86, a double in a
pair of registers on i686, and a flag output on AArch64, whose NZCV is now
live into the indirect target. Also check that a callbr with direct and
indirect register outputs now only reports the error.

Assisted-by: Claude Opus 5.5
DeltaFile
+87-0llvm/test/CodeGen/RISCV/callbr-asm-outputs.ll
+39-0llvm/test/CodeGen/X86/callbr-asm-outputs-indirect-isel.ll
+39-0llvm/test/CodeGen/X86/callbr-asm-outputs-indirect-isel-m32.ll
+36-0llvm/test/CodeGen/AArch64/callbr-asm-outputs-indirect-isel.ll
+13-0llvm/test/CodeGen/X86/callbr-asm-indirect-output.ll
+214-05 files

LLVM/project a45e277 — llvm/include/llvm/CodeGen FunctionLoweringInfo.h, llvm/lib/CodeGen/SelectionDAG FunctionLoweringInfo.cpp SelectionDAGBuilder.h

Replay each output's read in the indirect targets

The indirect targets re-parsed the constraints, recomputed each output's
registers and types, and paired them with the recorded registers in order,
so they were right only if both computations agreed. Record each output's
operand info and registers when lowering the callbr instead, and read them
in the indirect targets with the same code as visitInlineAsm().

This also marks a flag output's register (NZCV on AArch64, CC on SystemZ)
live into the indirect targets, as a register output's already was. And the
indirect targets no longer create virtual registers they don't use, which
renumbers some in the AArch64 test.

Assisted-by: Claude Opus 5.5
DeltaFile
+65-93llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+14-0llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
+0-7llvm/include/llvm/CodeGen/FunctionLoweringInfo.h
+3-3llvm/test/CodeGen/AArch64/callbr-asm-outputs-indirect-isel.ll
+0-1llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
+82-1045 files

LLVM/project a6b97e8 — llvm/include/llvm/CodeGen FunctionLoweringInfo.h, llvm/lib/CodeGen/SelectionDAG FunctionLoweringInfo.cpp SelectionDAGBuilder.cpp

[SelectionDAG] Read callbr outputs from the INLINEASM_BR's registers

An indirect target of a callbr found the registers holding the asm's
outputs by walking back from the callbr's exported value through COPYs to
the INLINEASM_BR, and asserted that the chain held nothing else ("start of
copy chain MUST be COPY"). An output whose type differs from its register's,
such as a float in a general-purpose register, is converted, e.g. with
MOVDI2SSrr on x86, so the assertion fired. And the target didn't convert the
output to its result type, as visitInlineAsm() does.

After an error in the asm, nothing defines the exported value, so the walk
crashed, and the callbr block kept edges to the indirect targets with no
INLINEASM_BR to branch there, which later passes reject.

Record the registers that the INLINEASM_BR defines its outputs in when
lowering the callbr, and read the outputs from them in the indirect target,
converting each to its result type as visitInlineAsm() does. After an error,
give the indirect targets undefined outputs and no edges from the callbr.

Fixes #98379, #112914, #143795, #170100, #172657, and #173609.
DeltaFile
+122-110llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+76-0llvm/test/CodeGen/X86/callbr-asm-outputs-indirect-isel.ll
+37-0llvm/test/CodeGen/X86/callbr-asm-error.ll
+7-0llvm/include/llvm/CodeGen/FunctionLoweringInfo.h
+1-0llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
+243-1105 files

LLVM/project ba1e325 — llvm/lib/CodeGen/SelectionDAG SelectionDAGBuilder.cpp

Move a callbr output's operand info and registers into its record

Nothing reads them after the output is recorded, so they don't need to be
copied.

Assisted-by: Claude Opus 5.5
DeltaFile
+5-3llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+5-31 files

LLVM/project 945c8a5 — llvm/test/CodeGen/X86 callbr-asm-outputs-indirect-isel-m32.ll

Regenerate callbr tests for inline asm operand counts

Main now prints the operand count of an inline asm operand with more than
one register, such as "regdef:GR32_NOREX2 ops:2" (#235184).

Assisted-by: Claude Opus 5.5
DeltaFile
+1-1llvm/test/CodeGen/X86/callbr-asm-outputs-indirect-isel-m32.ll
+1-11 files

LLVM/project c8a8e93 — llvm/lib/CodeGen/SelectionDAG SelectionDAGBuilder.cpp

Refer to the recorded callbr outputs through SmallVectorImpl

The code that records them doesn't depend on the inline size.

Assisted-by: Claude Opus 5.5
DeltaFile
+1-1llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+1-11 files

LLVM/project 3813ac6 — llvm/lib/CodeGen/SelectionDAG SelectionDAGBuilder.cpp

Use "llvm_unreachable" instead of "assert(false && ...)"

Co-authored-by: Nick Desaulniers <ndesaulniers at google.com>
DeltaFile
+1-1llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+1-11 files

LLVM/project 278aaca — llvm/lib/CodeGen/SelectionDAG SelectionDAGBuilder.cpp, llvm/test/CodeGen/X86 callbr-asm-indirect-output.ll

[SelectionDAG] Report an error for a callbr's indirect register output

An indirect output with a register constraint, e.g. "=*r", is stored to its
pointer after the asm. But a callbr's asm can branch to an indirect target
before then, so the store was silently skipped on the indirect paths. Clang
emits such an output for a _Complex lvalue with a register constraint:

  _Complex float c;
  asm goto("" : "=r"(c) : : : l);

Report an error instead. A callbr without indirect targets has no such
path, so it's still allowed.

Assisted-by: Claude Opus 5.5
DeltaFile
+47-0llvm/test/CodeGen/X86/callbr-asm-indirect-output.ll
+8-0llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+55-02 files

LLVM/project 5eb9d47 — llvm/test/CodeGen/X86 callbr-asm-indirect-output.ll

use -filetype=null

Co-authored-by: Matt Arsenault <Matthew.Arsenault at amd.com>
DeltaFile
+1-1llvm/test/CodeGen/X86/callbr-asm-indirect-output.ll
+1-11 files

LLVM/project 01ec60d — llvm/lib/CodeGen/SelectionDAG SelectionDAGBuilder.cpp

Add braces for a large single statement.
DeltaFile
+2-1llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+2-11 files

LLVM/project 9de3e13 — llvm/lib/CodeGen MachineCSE.cpp, llvm/test/CodeGen/X86 machine-cse-inlineasm-br.mir

[MachineCSE] Don't reuse an instruction after an INLINEASM_BR elsewhere (#235939)

An INLINEASM_BR can branch to its indirect targets before the instructions
after it in its block run, but MachineCSE let those instructions replace
ones in any block that their block dominates, including the indirect
targets. E.g., when both paths out of a callbr sign-extend its output, the
indirect target reused the extension on the path to the default target and
read a register that its own path never wrote.

Reuse an instruction after an INLINEASM_BR only in its own block. MachineSink
already refuses to sink into an indirect target for the same reason.

Assisted-by: Claude Opus 5.5
DeltaFile
+243-0llvm/test/CodeGen/X86/machine-cse-inlineasm-br.mir
+11-0llvm/lib/CodeGen/MachineCSE.cpp
+254-02 files

FreeBSD/ports 19dadf7 — databases/pgdog Makefile Makefile.crates

databases/pgdog: Update 0.1.62 => 0.1.67

PR:              300463
DeltaFile
+155-255databases/pgdog/distinfo
+76-126databases/pgdog/Makefile.crates
+4-2databases/pgdog/Makefile
+235-3833 files

NetBSD/src QRXprhe — external/public-domain/xz Makefile.inc

   Also bump XZVERSION in Makefile.inc to 5.8.5.
VersionDeltaFile
1.8+2-2external/public-domain/xz/Makefile.inc
+2-21 files

LLVM/project b457338 — lldb/packages/Python/lldbsuite/test lldbplatformutil.py lldbutil.py, lldb/packages/Python/lldbsuite/test/make Makefile.rules

[lldb][test] Build and check test inferiors on OpenBSD (#249318)

The API tests could not build any inferior on OpenBSD.
finalize_build_dictionary() has no uname for the openbsd platform, so
every self.build() failed with KeyError: 'openbsd'.

Map openbsd to OpenBSD, and treat OpenBSD like the other BSDs in
Makefile.rules: do not link with -ldl, as OpenBSD has no libdl and
dlopen() is in libc; add the rpath for LLVM_LIBS_DIR; and use lld when
cross compiling from Darwin.

Assisted-by: Claude Opus 5.5
DeltaFile
+3-3lldb/packages/Python/lldbsuite/test/make/Makefile.rules
+1-1lldb/packages/Python/lldbsuite/test/lldbutil.py
+1-0lldb/packages/Python/lldbsuite/test/lldbplatformutil.py
+5-43 files

OpenBSD/src KnyQyDB — sys/dev/pci if_aq_pci.c

   AQ2 hardware does not generate an interrupt on link state changes, so we
   need to poll link state once a second.

   ok kettenis@
VersionDeltaFile
1.41+19-1sys/dev/pci/if_aq_pci.c
+19-11 files

FreeBSD/src 8b22917 — sys/net toeplitz.c

toeplitz: Bound the key by its length

toeplitz_hash() takes the length of the key but read RSS_KEYSIZE bytes
of it whatever that length was: past the end of a shorter key, and not
all of a longer one.  Bound it by the length it is given.  The callers,
the RSS hash and the multipath hash in in_fib.c and in6_fib.c, all pass
40-byte keys, RSS_KEYSIZE, so nothing changes for them.

toeplitz.c no longer needs <net/rss_config.h>.

Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+1-2sys/net/toeplitz.c
+1-21 files

LLVM/project c1944ab — llvm/lib/Target/X86 X86FastISel.cpp

[X86][FastISel] Cache import-call-optimization (NFC) (#248155)

`X86FastISel::fastLowerCall()` currently calls
`Module::getModuleFlag("import-call-optimization")` on every 64-bit
call, linearly scanning the `llvm.module.flags` metadata list each time.

Since `X86FastISel` is instantiated per function and module flags do not
change during instruction selection, lazily cache the lookup in a
`std::optional<bool>` on the first 64-bit call (0 lookups for leaf
functions, 1 lookup for call-heavy functions).

Tested locally with `llc -O0 -time-passes` on LLVM bitcode from
`rustc-perf` crates (`ripgrep`, `syn` at `-O0 -g1`): reduces `X86
DAG->DAG Instruction Selection` time by ~2.8% with bit-identical object
output.

Assisted-by: Gemini 4 Neon via Antigravity
DeltaFile
+11-3llvm/lib/Target/X86/X86FastISel.cpp
+11-31 files

NetBSD/pkgsrc-wip 2f647fe — ocicl TODO distinfo, ocicl/patches patch-systems_pure-tls-20261112-17da78e_src_context.lisp patch-src_ocicl.lisp

ocicl: fixed template issue
DeltaFile
+14-0ocicl/patches/patch-src_ocicl.lisp
+7-0ocicl/Makefile
+2-1ocicl/distinfo
+1-1ocicl/patches/patch-systems_pure-tls-20261112-17da78e_src_context.lisp
+1-1ocicl/TODO
+25-35 files

LLVM/project 481588b — lldb/tools/lldb-dap Server.h Server.cpp, lldb/tools/lldb-dap/tool lldb-dap.cpp

[lldb-dap] Move running the server to lldbDAP library. (#248937)

Move running the server out of `lldb-dap.cpp`, so it can be unit tested.

The server now registers only one deadline, and only shutdown if there
are no more clients. instead of creating a new callback for each client
that disconnects.
DeltaFile
+217-0lldb/tools/lldb-dap/Server.cpp
+4-159lldb/tools/lldb-dap/tool/lldb-dap.cpp
+130-0lldb/unittests/DAP/ServerTest.cpp
+96-0lldb/tools/lldb-dap/Server.h
+1-0llvm/utils/gn/secondary/lldb/tools/lldb-dap/BUILD.gn
+1-0lldb/unittests/DAP/CMakeLists.txt
+449-1591 files not shown
+450-1597 files

Linux/linux d14d00a — drivers/firewire core-topology.c core-device.c

Merge tag 'firewire-fixes-7.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394

Pull firewire fixes from Takashi Sakamoto:

 - Retry page batch allocation on failure

   A single call to alloc_pages_bulk() can fall under a specific
   configuration with CONFIG_SMP=n. Retry the page batch allocation
   in a loop to mitigate such failure

 - Fix some error paths

* tag 'firewire-fixes-7.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394:
  firewire: core: fix use-after-free in build_tree() error path
  firewire: core: defer old_rom assignment until kmemdup() succeeds
  firewire: ohci: retry page batch allocation in ar_context_init()
  firewire: core: retry page batch allocation in fw_iso_buffer_alloc()
DeltaFile
+11-2drivers/firewire/core-iso.c
+9-1drivers/firewire/ohci.c
+1-1drivers/firewire/core-topology.c
+1-1drivers/firewire/core-device.c
+22-54 files

NetBSD/pkgsrc-wip a1c3c00 — py-cloud-init distinfo TODO, py-cloud-init/patches patch-cloudinit_distros_netbsd.py patch-config_cloud.cfg.tmpl

py-cloud-init: Fix NTP support on NetBSD.

Patch the default cloud.cfg so that cloud-init knows where its
templates are and add a NetBSD ntp.conf template.

Also taught the NetBSD distro where libexec is. The error message on
the console saying that write-ssh-key-fingerprints can't be found is
now replaced by the ssh key fingerprints. It's not clear that this is
an improvement.
DeltaFile
+151-0py-cloud-init/patches/patch-templates_ntp.conf.netbsd.tmpl
+24-0py-cloud-init/patches/patch-cloudinit_config_cc__ntp.py
+12-0py-cloud-init/patches/patch-config_cloud.cfg.tmpl
+4-5py-cloud-init/TODO
+4-2py-cloud-init/distinfo
+1-1py-cloud-init/patches/patch-cloudinit_distros_netbsd.py
+196-86 files