FreeBSD/ports 55d43c8 — multimedia/obs-studio pkg-plist, multimedia/obs-studio/files patch-plugins_obs-browser_CMakeLists.txt patch-plugins_obs-browser_panel_browser-panel.cpp

obs-studio: add BROWSER option to enable CEF framework

OBS studio can now display a web browser in it's streaming setup..

- The BROWSER option works now: it depends on www/cef and points the
  build at it (CEF_ROOT_DIR=${LOCALBASE}/lib/cef). It is on by default
  on amd64 and not offered where www/cef does not build.
- Use the CMake switch obs-browser actually reads (ENABLE_BROWSER) and
  turn off the What's New dialog, which has no FreeBSD code path.
- obs-browser: FreeBSD support in its CMake files and __linux__ code
  paths; load libcef.so from the CEF directory (RPATH) instead of
  copying CEF into lib/obs-plugins, and let CEF find its own locales;
  build with C++20 as the CEF 152 headers require; include
  <netinet/in.h> for sockaddr_in.

PR:     299341
DeltaFile
+71-0multimedia/obs-studio/pkg-plist
+29-0multimedia/obs-studio/files/patch-plugins_obs-browser_obs-browser-source.cpp
+22-0multimedia/obs-studio/files/patch-plugins_obs-browser_cmake_os-linux.cmake
+20-0multimedia/obs-studio/files/patch-plugins_obs-browser_panel_browser-panel.cpp
+20-0multimedia/obs-studio/files/patch-plugins_obs-browser_obs-browser-plugin.cpp
+19-0multimedia/obs-studio/files/patch-plugins_obs-browser_CMakeLists.txt
+181-07 files not shown
+262-813 files

LLVM/project ae814af — clang/test/CodeGen/AArch64/sve maxnmv.c, clang/test/CodeGen/AArch64/sve-intrinsics acle_sve_maxnmv.c

[clang][CIR] Add tests for SVE MAXNMV intrinsics (#232198)

adds CIR tests for `svmaxnmv` (plain SVE) intrinsics.

Moves and adapts `sve-intrinsics/acle_sve_maxnmv.c` to `sve/maxnmv.c`

Part of #223963
DeltaFile
+85-0clang/test/CodeGen/AArch64/sve/maxnmv.c
+0-75clang/test/CodeGen/AArch64/sve-intrinsics/acle_sve_maxnmv.c
+85-752 files

LLVM/project 78ed659 — clang/test/CodeGen/AArch64/sve minnmv.c, clang/test/CodeGen/AArch64/sve-intrinsics acle_sve_minnmv.c

[clang][CIR] Add tests for SVE MINNMV intrinsics (#232199)

adds CIR tests for `svminnmv` (plain SVE) intrinsics.

Moves and adapts `sve-intrinsics/acle_sve_minnmv.c` to `sve/minnmv.c`

Part of #223963
DeltaFile
+85-0clang/test/CodeGen/AArch64/sve/minnmv.c
+0-75clang/test/CodeGen/AArch64/sve-intrinsics/acle_sve_minnmv.c
+85-752 files

FreeBSD/ports 845e75a — devel/mongo-c-driver Makefile distinfo

devel/mongo-c-driver: Update 2.3.3 => 2.5.6

Changelogs:
https://github.com/mongodb/mongo-c-driver/releases/tag/2.4.0
https://github.com/mongodb/mongo-c-driver/releases/tag/2.5.0
https://github.com/mongodb/mongo-c-driver/releases/tag/2.5.1
https://github.com/mongodb/mongo-c-driver/releases/tag/2.5.2
https://github.com/mongodb/mongo-c-driver/releases/tag/2.5.3
https://github.com/mongodb/mongo-c-driver/releases/tag/2.5.4
https://github.com/mongodb/mongo-c-driver/releases/tag/2.5.5
https://github.com/mongodb/mongo-c-driver/releases/tag/2.5.6

PR:             299416
Sponsored by:   UNIS Labs (vvd, commit patch)
MFH:            2026Q4

(cherry picked from commit 892c91f061d5967e6cd462237b44e1efc6126cb4)
DeltaFile
+66-50devel/mongo-c-driver/pkg-plist
+3-3devel/mongo-c-driver/distinfo
+2-2devel/mongo-c-driver/Makefile
+71-553 files

FreeBSD/ports ed7470f — devel/libbson Makefile distinfo

devel/libbson: Update 2.3.3 => 2.5.6 (3 CVEs)

Changelogs:
https://github.com/mongodb/mongo-c-driver/releases/tag/2.4.0
https://github.com/mongodb/mongo-c-driver/releases/tag/2.5.0
https://github.com/mongodb/mongo-c-driver/releases/tag/2.5.1
https://github.com/mongodb/mongo-c-driver/releases/tag/2.5.2
https://github.com/mongodb/mongo-c-driver/releases/tag/2.5.3
https://github.com/mongodb/mongo-c-driver/releases/tag/2.5.4
https://github.com/mongodb/mongo-c-driver/releases/tag/2.5.5
https://github.com/mongodb/mongo-c-driver/releases/tag/2.5.6

PR:             299415
Security:       CVE-2026-106438
Security:       CVE-2026-106437
Security:       CVE-2026-106431
Sponsored by:   UNIS Labs (vvd, commit patch)
MFH:            2026Q4

(cherry picked from commit d7b29bff29ecd5c4999918e54df43ab2ea5a8e66)
DeltaFile
+3-3devel/libbson/distinfo
+1-1devel/libbson/Makefile
+4-42 files

FreeBSD/ports 892c91f — devel/mongo-c-driver Makefile distinfo

devel/mongo-c-driver: Update 2.3.3 => 2.5.6

Changelogs:
https://github.com/mongodb/mongo-c-driver/releases/tag/2.4.0
https://github.com/mongodb/mongo-c-driver/releases/tag/2.5.0
https://github.com/mongodb/mongo-c-driver/releases/tag/2.5.1
https://github.com/mongodb/mongo-c-driver/releases/tag/2.5.2
https://github.com/mongodb/mongo-c-driver/releases/tag/2.5.3
https://github.com/mongodb/mongo-c-driver/releases/tag/2.5.4
https://github.com/mongodb/mongo-c-driver/releases/tag/2.5.5
https://github.com/mongodb/mongo-c-driver/releases/tag/2.5.6

PR:             299416
Sponsored by:   UNIS Labs (vvd, commit patch)
MFH:            2026Q4
DeltaFile
+66-50devel/mongo-c-driver/pkg-plist
+3-3devel/mongo-c-driver/distinfo
+2-2devel/mongo-c-driver/Makefile
+71-553 files

LLVM/project 8059237 — llvm/docs RISCVUsage.md

[RISCV][Docs] Rename Extensions section in RISCVUsage to 'Ratified Extensions' (#232488)

We have separate sections for Experimental and Vendor so let's name this
what it is.
DeltaFile
+1-1llvm/docs/RISCVUsage.md
+1-11 files

OpenBSD/src 1oVwoOx — sys/dev/pci/drm/amd/amdkfd kfd_priv.h kfd_device_queue_manager.c

   drm/amdkfd: align SDMA doorbell base for shader doorbell writes

   From Saleel Kudchadker
   f009879ed99067e825512f7b759a174660edd703 in linux-6.18.y/6.18.57
   f145d5b3f740de05d85257acdc82f6877180f5c6 in mainline linux
VersionDeltaFile
1.33+26-6sys/dev/pci/drm/amd/amdkfd/kfd_device_queue_manager.c
1.25+7-0sys/dev/pci/drm/amd/amdkfd/kfd_priv.h
+33-62 files

FreeBSD/ports d7b29bf — devel/libbson Makefile distinfo

devel/libbson: Update 2.3.3 => 2.5.6 (3 CVEs)

Changelogs:
https://github.com/mongodb/mongo-c-driver/releases/tag/2.4.0
https://github.com/mongodb/mongo-c-driver/releases/tag/2.5.0
https://github.com/mongodb/mongo-c-driver/releases/tag/2.5.1
https://github.com/mongodb/mongo-c-driver/releases/tag/2.5.2
https://github.com/mongodb/mongo-c-driver/releases/tag/2.5.3
https://github.com/mongodb/mongo-c-driver/releases/tag/2.5.4
https://github.com/mongodb/mongo-c-driver/releases/tag/2.5.5
https://github.com/mongodb/mongo-c-driver/releases/tag/2.5.6

PR:             299415
Security:       CVE-2026-106438
Security:       CVE-2026-106437
Security:       CVE-2026-106431
Sponsored by:   UNIS Labs (vvd, commit patch)
MFH:            2026Q4
DeltaFile
+3-3devel/libbson/distinfo
+1-1devel/libbson/Makefile
+4-42 files

OpenBSD/src SwMCTmM — sys/dev/pci/drm/i915/gt intel_rps.c

   drm/i915/gt: Unmask interrupts only when ACTIVE is true

   From Krzysztof Karas
   0b4a0fb98b9ffeac36798bbd369c821605cae70f in linux-6.18.y/6.18.57
   5346b1cec6afa4f9b4b49a9f84e3cfef95a3f7bb in mainline linux
VersionDeltaFile
1.10+2-1sys/dev/pci/drm/i915/gt/intel_rps.c
+2-11 files

OpenBSD/src JRSmfd9 — sys/dev/pci/drm/i915/gem i915_gem_execbuffer.c

   drm/i915/gem: Prevent overstepping exec array boundary

   From Krzysztof Karas
   152fb5083b9333a1cb8629572f9e0f276a404ba6 in linux-6.18.y/6.18.57
   ebe162db655881a38de43301151ff7ac940602b5 in mainline linux
VersionDeltaFile
1.17+1-1sys/dev/pci/drm/i915/gem/i915_gem_execbuffer.c
+1-11 files

OpenBSD/src LXn4zPb — sys/dev/pci/drm drm_fb_helper.c

   drm/fb-helper: defer setup when fbdev_probe() fails, not just on -EAGAIN

   From Nguyen Ngoc Thang
   4e7b508c7c60dec7a86b7eb2a1b7e6d174afa457 in linux-6.18.y/6.18.57
   755c94d178b7e972bb766199d34e4ba4f63a89eb in mainline linux
VersionDeltaFile
1.50+3-3sys/dev/pci/drm/drm_fb_helper.c
+3-31 files

FreeBSD/ports 8df4505 — net-im/gomuks Makefile distinfo, net-im/gomuks/files/packagejsons package.json package-lock.json

net-im/gomuks: Update 26.08 => 26.09

Changelog:
https://github.com/gomuks/gomuks/releases/tag/v0.2609.0

PR:             298713
Sponsored by:   UNIS Labs (vvd, commit patch)
DeltaFile
+1,064-2,525net-im/gomuks/files/packagejsons/package-lock.json
+7-7net-im/gomuks/distinfo
+4-4net-im/gomuks/files/packagejsons/package.json
+2-2net-im/gomuks/Makefile
+1,077-2,5384 files

LLVM/project ee70066 — lldb/source/Plugins/Process/Utility RegisterContextLinux_x86_64.cpp RegisterInfoLinux_x86_64.cpp, lldb/unittests/Process/Utility RegisterContextFreeBSDTest.cpp RegisterInfoFreeBSDTest.cpp

[lldb] Rename OS register metadata providers (#231564)

Rename platform/arch-specific RegisterContext* to RegisterInfo* under
Process/Utility as these files contain classes derived from
RegisterInfoInterface not RegisterContext.
DeltaFile
+0-494lldb/unittests/Process/Utility/RegisterContextFreeBSDTest.cpp
+494-0lldb/unittests/Process/Utility/RegisterInfoFreeBSDTest.cpp
+0-233lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_powerpc.cpp
+233-0lldb/source/Plugins/Process/Utility/RegisterInfoFreeBSD_powerpc.cpp
+0-186lldb/source/Plugins/Process/Utility/RegisterContextLinux_x86_64.cpp
+186-0lldb/source/Plugins/Process/Utility/RegisterInfoLinux_x86_64.cpp
+913-91369 files not shown
+2,868-2,86975 files

LLVM/project b6a4240 — llvm/lib/CodeGen/SelectionDAG TargetLowering.cpp, llvm/test/CodeGen/X86 asm-constraints-rm-callbr-fold.ll asm-constraints-rm-isel.ll

[TargetLowering][X86] Prefer 'r' over 'm' for foldable "rm" inline asm operands

An "rm" (register-or-memory) inline asm operand has always resolved to
'm', because getConstraintPreferences() picks the most general
constraint present, and 'm' is more general than 'r'. That's safe, since
memory can't run out, but it forces a value that could stay in a
register through a stack slot even when there's no register pressure
(https://github.com/llvm/llvm-project/issues/20571).

Prefer 'r' instead where the register allocator can fold the register
back to a stack slot when it runs out of registers, and mark the
register operand foldable (InlineAsm::Flag::setRegMayBeFolded()) so it
does. Both allocators can: the greedy allocator folds an operand when it
spills its value, and the fast allocator folds operands up front when
the asm's register operands wouldn't fit.

ParseConstraints() sets AsmOperandInfo::MayFoldRegister for an operand
whose constraint codes include 'r' and 'm' and are otherwise only
immediate codes, above -O0, on a target that opts in through the new

    [26 lines not shown]
DeltaFile
+788-0llvm/test/CodeGen/X86/asm-constraints-rm-pressure.ll
+767-0llvm/test/CodeGen/X86/asm-constraints-torture.ll
+227-0llvm/test/CodeGen/X86/inline-asm-callbase.ll
+157-0llvm/test/CodeGen/X86/asm-constraints-rm-isel.ll
+73-2llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+74-0llvm/test/CodeGen/X86/asm-constraints-rm-callbr-fold.ll
+2,086-29 files not shown
+2,175-1715 files

LLVM/project f254d47 — llvm/lib/CodeGen RegAllocFast.cpp, llvm/test/CodeGen/X86 regallocfast-inline-asm-fold.mir regallocfast-inline-asm-fold-pressure.mir

[RegAllocFast] Fold foldable inline asm operands under register pressure

An inline asm register operand marked foldable (from an "rm" constraint)
may be replaced with a stack slot when the register allocator runs out
of registers. The greedy allocator does that when it spills the value.
The fast allocator can't: it assigns the operands of an instruction one
at a time, and folding replaces the instruction. So it reported
"inline assembly requires more registers than available" instead.

Before allocating a block, estimate from each inline asm's own operands
whether they fit in registers, and fold as many foldable registers as
needed to make them fit, so the common case without pressure still gets
a register. Values that only live across the asm don't count, since the
allocator spills them when it needs their registers. The estimate
follows allocateInstruction():

- First all defs get distinct registers, avoiding physreg defs; then all
  uses, along with the defs still occupied while the uses are read
  (early-clobber and tied defs, see isLiveThroughDef()), get distinct

    [26 lines not shown]
DeltaFile
+479-0llvm/test/CodeGen/X86/regallocfast-inline-asm-fold-pressure.mir
+320-0llvm/lib/CodeGen/RegAllocFast.cpp
+80-0llvm/test/CodeGen/X86/regallocfast-inline-asm-fold.mir
+879-03 files

LLVM/project 7775e28 — llvm/lib/CodeGen/GlobalISel InlineAsmLowering.cpp, llvm/lib/CodeGen/SelectionDAG SelectionDAGBuilder.cpp

[CodeGen] Address review: error for "=m|r" direct outputs too

A direct output whose chosen alternative is memory, e.g. "=m|r", still
crashed SelectionDAG, which exempted multiple-alternative operands from the
check and then asked for the address of an output with no value. Drop the
exemption and test "=m|r" with both instruction selectors. Name the
selector explicitly in the RUN lines rather than relying on -O levels,
since X86 GlobalISel can't lower inline asm and both X86 lines ran
SelectionDAG anyway. Drop "yet" from the error: Clang never emits a
direct memory output, so there are no plans to support one.

Assisted-by: Claude Opus 5.5
DeltaFile
+14-10llvm/test/CodeGen/X86/inline-asm-direct-mem-output-error.ll
+11-3llvm/test/CodeGen/AArch64/inline-asm-direct-mem-output-error.ll
+5-4llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+1-1llvm/lib/CodeGen/GlobalISel/InlineAsmLowering.cpp
+31-184 files

LLVM/project ad733e8 — llvm/lib/CodeGen/GlobalISel InlineAsmLowering.cpp, llvm/lib/CodeGen/SelectionDAG SelectionDAGBuilder.cpp

[CodeGen] Report an error for a direct inline asm output in memory

An inline asm output returned by value has no memory to write to, yet a
constraint such as "=rm" picks memory, the most general constraint, as
does "=m". SelectionDAG asserted on that ("Can only indirectify direct
input operands!"), and GlobalISel dereferenced a null pointer. Clang
never emits such an output, since it passes the address of a memory
output, but other IR can. Report "cannot handle direct memory outputs
yet for constraint 'm'" instead, like the other inline asm errors there.

Assisted-by: Claude Opus 5.5
DeltaFile
+31-0llvm/test/CodeGen/X86/inline-asm-direct-mem-output-error.ll
+16-6llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+13-0llvm/test/CodeGen/AArch64/inline-asm-direct-mem-output-error.ll
+10-0llvm/lib/CodeGen/GlobalISel/InlineAsmLowering.cpp
+70-64 files

LLVM/project 8bcccd8 — mlir/include/mlir/IR OperationSupport.h, mlir/lib/IR AsmPrinter.cpp

[MLIR][AsmPrinter] Add alwaysUseAliases printing flag (#232518)

Per-function IR dumps print a nested op, which takes the non top-level
path where types and attributes expand in full. For passes over
functions with heavy types this buries the dump in noise that aliases
would fold away.

Add OpPrintingFlags::alwaysUseAliases plus the
mlir-print-always-use-aliases tool option. When set, printing
initializes aliases and takes the top-level path for any op, so nested
dumps use aliases. The flag takes precedence over local scope on
purpose: pass instrumentation prints nested ops with local scope, so
without precedence the per-function dumps this flag targets would never
use aliases.

Reusing one AsmState across prints must not carry the previous op
aliases or dialect resources into the next print, so initialize now
starts both fresh.

Assisted-by: Muse Code (Muse)
DeltaFile
+29-4mlir/lib/IR/AsmPrinter.cpp
+20-0mlir/test/Pass/ir-printing-always-use-aliases.mlir
+13-0mlir/include/mlir/IR/OperationSupport.h
+62-43 files

LLVM/project 843c021 — clang/lib/Headers riscv_packed_simd.h, clang/test/CodeGen/RISCV rvp-intrinsics.c

[RISCV][P-ext] Add missing packed pair (#232202)

Add missing v2i32 packed pair intrinsics.
DeltaFile
+104-0clang/test/CodeGen/RISCV/rvp-intrinsics.c
+58-0llvm/test/CodeGen/RISCV/rvp-simd-64.ll
+56-0cross-project-tests/intrinsic-header-tests/riscv_packed_simd.c
+9-1clang/lib/Headers/riscv_packed_simd.h
+3-3llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+4-0llvm/lib/Target/RISCV/RISCVInstrInfoP.td
+234-46 files

FreeBSD/ports 71c413d — math/octave-forge-femoctave Makefile, math/octave-forge-femoctave/files patch-DESCRIPTION

math/octave-forge-femoctave: Fix version number in DESCRIPTION.

- Bump portrevision.
DeltaFile
+1-1math/octave-forge-femoctave/files/patch-DESCRIPTION
+1-0math/octave-forge-femoctave/Makefile
+2-12 files

LLVM/project 9ce13e3 — llvm/test/CodeGen/X86 greedy-inline-asm-fold.mir

[TargetInstrInfo] Address review: autogenerate greedy-inline-asm-fold.mir checks

Generate the checks with update_mir_test_checks.py so that the spills and
reloads around each folded inline asm are verified, not just the INLINEASM
itself. Fix the "=r" comment to describe the C "+r" operand, note that which
"+rm" pair greedy folds is its own choice, and add a "+&rm" case on an
uninitialized value showing that folding a pair whose tied use is undef
stores to the slot without loading from it.

Assisted-by: Claude Opus 5.5
DeltaFile
+94-8llvm/test/CodeGen/X86/greedy-inline-asm-fold.mir
+94-81 files

NetBSD/pkgsrc lj5cc6N — doc CHANGES-2026

   doc: Added graphics/photoc version 0.7.1
VersionDeltaFile
1.7002+2-1doc/CHANGES-2026
+2-11 files

LLVM/project ec94ac5 — llvm/include/llvm/ADT APFloat.h, llvm/lib/Support APFloat.cpp

[APFloat][NFCI] Move x87DoubleExtended next to the other native IEEE types (#223193)

Reordered the `APFloatBase::Semantics` so that `S_x87DoubleExtended` is
placed after the IEEE types and before the DoubleDouble types.

Previously, `S_x87DoubleExtended` was the very last `enum` value,
meaning that `SemanticsToEnum`/`bitcastToAPInt`/`initFromAPInt` would
test if `Sem` is one of the 13 GPU floating point types before testing
if `Sem` is `x87DoubleExtended`. Given that `x87DoubleExtended` is more
commonly used and a native LLVM IR type, I thought a better heuristic
would be to test if `Sem` is a `x87DoubleExtended` type before testing
if it is one of the 13 GPU floating point types.

I also made the order of other functions/fields more consistent across
`APFloat`.
DeltaFile
+26-25llvm/lib/Support/APFloat.cpp
+13-13mlir/test/Conversion/ArithAndMathToAPFloat/arith-to-apfloat.mlir
+9-9llvm/include/llvm/ADT/APFloat.h
+6-6mlir/test/Conversion/ArithAndMathToAPFloat/math-to-apfloat.mlir
+54-534 files

NetBSD/pkgsrc 5qGzIru — graphics/photoc distinfo Makefile, graphics/photoc/patches patch-tests_test__scan.c patch-tests_test__review__state.c

   photoc helps you review, organize, and prepare photos from the
   terminal: summarize a shoot, read metadata, find blurry shots and
   exact duplicates, rename and sort into folders, make contact sheets
   and smaller copies, or remove GPS before sharing. Most commands
   work in shell scripts; `review` needs a terminal. Inspection commands
   can print JSON. Large JPEGs may use temporary in-memory previews,
   which do not change the originals. photoc reads JPEG files and
   metadata from Sony ARW RAW files as of now.
VersionDeltaFile
1.1+25-0graphics/photoc/patches/patch-src_commands_review__state.c
1.1+24-0graphics/photoc/patches/patch-src_core_fs.c
1.1+21-0graphics/photoc/Makefile
1.1+16-0graphics/photoc/distinfo
1.1+15-0graphics/photoc/patches/patch-tests_test__review__state.c
1.1+14-0graphics/photoc/patches/patch-tests_test__scan.c
+115-09 files not shown
+230-015 files

LLVM/project 57441a2 — clang/test/CIR/CodeGen sve-vector-arith-ops.c, clang/test/CodeGen arm_neon_intrinsics.c

Merge branch 'main' into revert-231420-users/arsenm/clang/reapply-targetid-parsing-amdgpu-targetparser
DeltaFile
+1,461-0clang/test/CIR/CodeGen/sve-vector-arith-ops.c
+324-324clang/test/CodeGen/arm_neon_intrinsics.c
+224-356llvm/test/CodeGen/AMDGPU/llvm.is.fpclass.f16.ll
+490-0mlir/lib/Conversion/OpenACCToLLVM/ACCKernelLaunchPatterns.cpp
+437-3llvm/test/Transforms/SLPVectorizer/AArch64/or-reduction-byte-pack.ll
+435-0mlir/test/Conversion/OpenACCToLLVM/kernel-launch.mlir
+3,371-683161 files not shown
+7,826-2,119167 files

LLVM/project f2b77e8 — llvm/lib/CodeGen/SelectionDAG TargetLowering.cpp, llvm/test/CodeGen/X86 asm-constraints-rm-callbr-fold.ll asm-constraints-rm-isel.ll

[TargetLowering][X86] Prefer 'r' over 'm' for foldable "rm" inline asm operands

An "rm" (register-or-memory) inline asm operand has always resolved to
'm', because getConstraintPreferences() picks the most general
constraint present, and 'm' is more general than 'r'. That's safe, since
memory can't run out, but it forces a value that could stay in a
register through a stack slot even when there's no register pressure
(https://github.com/llvm/llvm-project/issues/20571).

Prefer 'r' instead where the register allocator can fold the register
back to a stack slot when it runs out of registers, and mark the
register operand foldable (InlineAsm::Flag::setRegMayBeFolded()) so it
does. Both allocators can: the greedy allocator folds an operand when it
spills its value, and the fast allocator folds operands up front when
the asm's register operands wouldn't fit.

ParseConstraints() sets AsmOperandInfo::MayFoldRegister for an operand
whose constraint codes include 'r' and 'm' and are otherwise only
immediate codes, above -O0, on a target that opts in through the new

    [26 lines not shown]
DeltaFile
+788-0llvm/test/CodeGen/X86/asm-constraints-rm-pressure.ll
+767-0llvm/test/CodeGen/X86/asm-constraints-torture.ll
+227-0llvm/test/CodeGen/X86/inline-asm-callbase.ll
+157-0llvm/test/CodeGen/X86/asm-constraints-rm-isel.ll
+73-2llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+74-0llvm/test/CodeGen/X86/asm-constraints-rm-callbr-fold.ll
+2,086-29 files not shown
+2,169-1615 files

LLVM/project 6ee8cbc — llvm/lib/CodeGen RegAllocFast.cpp, llvm/test/CodeGen/X86 regallocfast-inline-asm-fold.mir regallocfast-inline-asm-fold-pressure.mir

[RegAllocFast] Fold foldable inline asm operands under register pressure

An inline asm register operand marked foldable (from an "rm" constraint)
may be replaced with a stack slot when the register allocator runs out
of registers. The greedy allocator does that when it spills the value.
The fast allocator can't: it assigns the operands of an instruction one
at a time, and folding replaces the instruction. So it reported
"inline assembly requires more registers than available" instead.

Before allocating a block, estimate from each inline asm's own operands
whether they fit in registers, and fold as many foldable registers as
needed to make them fit, so the common case without pressure still gets
a register. Values that only live across the asm don't count, since the
allocator spills them when it needs their registers. The estimate
follows allocateInstruction():

- First all defs get distinct registers, avoiding physreg defs; then all
  uses, along with the defs still occupied while the uses are read
  (early-clobber and tied defs, see isLiveThroughDef()), get distinct

    [26 lines not shown]
DeltaFile
+479-0llvm/test/CodeGen/X86/regallocfast-inline-asm-fold-pressure.mir
+320-0llvm/lib/CodeGen/RegAllocFast.cpp
+80-0llvm/test/CodeGen/X86/regallocfast-inline-asm-fold.mir
+879-03 files

LLVM/project 1d7b2ca — llvm/lib/CodeGen/GlobalISel InlineAsmLowering.cpp, llvm/lib/CodeGen/SelectionDAG SelectionDAGBuilder.cpp

[CodeGen] Report an error for a direct inline asm output in memory

An inline asm output returned by value has no memory to write to, yet a
constraint such as "=rm" picks memory, the most general constraint, as
does "=m". SelectionDAG asserted on that ("Can only indirectify direct
input operands!"), and GlobalISel dereferenced a null pointer. Clang
never emits such an output, since it passes the address of a memory
output, but other IR can. Report "cannot handle direct memory outputs
yet for constraint 'm'" instead, like the other inline asm errors there.

Assisted-by: Claude Opus 5.5
DeltaFile
+31-0llvm/test/CodeGen/X86/inline-asm-direct-mem-output-error.ll
+16-6llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+13-0llvm/test/CodeGen/AArch64/inline-asm-direct-mem-output-error.ll
+10-0llvm/lib/CodeGen/GlobalISel/InlineAsmLowering.cpp
+70-64 files

LLVM/project cd89df6 — llvm/lib/CodeGen TargetInstrInfo.cpp, llvm/test/CodeGen/X86 greedy-inline-asm-fold.mir

[TargetInstrInfo] Fix folding inline asm operands next to tied operands

foldInlineAsmMemOperand() swapped a register operand for the target's
memory operands with MachineInstr::removeOperand(), which asserts when a
later operand is tied, because moving it would break the tie. Inline asm
lists every input after every output, so folding any operand that comes
before another tied pair asserted, e.g. an "rm" input followed by the
input of a "+r" operand, or one of two "+rm" operands. Without
assertions, the moved operands kept stale tie indices. Untie the
operands, rebuild the operand list, and re-tie the remaining pairs at
their new positions.

It also gave up when the register appears in more than one operand, e.g.
one value passed to two "rm" operands, which left the greedy allocator
unable to spill that value at all. Fold every such operand into the
stack slot.

Finally, take MayLoad from the folded operands rather than from every
read of the register: a folded def whose tied use is another virtual

    [9 lines not shown]
DeltaFile
+85-32llvm/lib/CodeGen/TargetInstrInfo.cpp
+108-0llvm/test/CodeGen/X86/greedy-inline-asm-fold.mir
+193-322 files