LLVM/project 3adc3bc — llvm/lib/Transforms/Vectorize VPlanTransforms.cpp

[VPlan] Match induction before querying truncate lane usage (#233651)

Only query a truncate's lane usage after establishing that its operand
is an optimizable induction. Lane usage is irrelevant when the operand
cannot be narrowed, so checking induction eligibility first avoids
unnecessary use-chain traversal. Truncates without a matching induction
are rejected regardless of lane usage; matching candidates still undergo
the same lane-use and profitability checks before any transformation.
Reordering the checks therefore preserves the narrowing decision in all
cases.

Assisted-By: Opus 5.5
DeltaFile
+5-5llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+5-51 files

NetBSD/pkgsrc IwpVr5f — doc TODO CHANGES-2026

   doc: Updated devel/nss to 3.131.1
VersionDeltaFile
1.28208+2-1doc/TODO
1.7137+2-1doc/CHANGES-2026
+4-22 files

NetBSD/pkgsrc t9YhHGn — devel/nss Makefile distinfo

   nss: update to 3.131.1.

   This release removes trust in the following root certificates:

      - Bug 2083709 <https://bugzilla.mozilla.org/show_bug.cgi?id=2083709> - emSign Root CA - C1
      - Bug 2083709 <https://bugzilla.mozilla.org/show_bug.cgi?id=2083709> - emSign ECC Root CA - C3
      - Bug 2084101 <https://bugzilla.mozilla.org/show_bug.cgi?id=2084101> - emSign ECC Root CA - G3
VersionDeltaFile
1.221+4-4devel/nss/distinfo
1.306+2-2devel/nss/Makefile
+6-62 files

LLVM/project 1bd7349 — llvm/lib/Target/WebAssembly WebAssemblyTargetMachine.cpp WebAssemblyLowerEmscriptenEHSjLj.cpp, llvm/test/CodeGen/WebAssembly eh-option-errors.ll

WebAssembly: Use reportFatalUsageError for eh option errors

Avoid using the deprecated report_fatal_error, and add missing
error test coverage.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+29-5llvm/test/CodeGen/WebAssembly/eh-option-errors.ll
+3-3llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp
+1-1llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
+33-93 files

LLVM/project 634f85f — llvm/include/llvm/CodeGen LexicalScopes.h, llvm/lib/CodeGen LexicalScopes.cpp

[CodeGen] Avoid per-function DenseMap growth in LexicalScopes and InstructionOrdering. NFC (#229990)

LexicalScopes::scanFunction keeps a DenseMap from each range's first
instruction to its scope, but only looks it up while walking the ranges
in order. Store the scope next to its range instead.

InstructionOrdering::initialize inserts every instruction of the
function; reserve the map up front.

LLM-aided. O0-g instructions:u: -0.26%
DeltaFile
+11-18llvm/lib/CodeGen/LexicalScopes.cpp
+4-5llvm/include/llvm/CodeGen/LexicalScopes.h
+1-0llvm/lib/CodeGen/AsmPrinter/DbgEntityHistoryCalculator.cpp
+16-233 files

LLVM/project c9266df — llvm/include/llvm/CodeGen AsmPrinter.h, llvm/include/llvm/MC MCAsmInfo.h

MC: Remove MCAsmInfo::ExceptionsType

The exception model now comes from the module, and the MCAsmInfo
predicates that depend on it take the model as a parameter. The
target's default model is still available from
Triple::getDefaultExceptionHandling.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+0-17llvm/lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp
+0-11llvm/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp
+0-6llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.cpp
+0-4llvm/lib/CodeGen/CodeGenTargetMachineImpl.cpp
+0-4llvm/include/llvm/MC/MCAsmInfo.h
+2-2llvm/include/llvm/CodeGen/AsmPrinter.h
+2-4418 files not shown
+2-7424 files

LLVM/project 18afacf — llvm/test/CodeGen/PowerPC peephole-elim-extsw-subreg-input.mir

PPC: Add MIR examples for missed extsw+word-load fold on subregister input

A gprc LWZ/LWZX feeding EXTSW_32_64 folds into a sign-extending LWA/LWAX
load. The equivalent 64-bit zero-extending word loads (LWZ8/LWZX8) whose
sub_32 feeds EXTSW_32_64 are not folded, leaving a redundant lwz+extsw
(or lwzx+extsw) pair. Add MIR examples documenting the missed fold.

Co-authored-by: Claude (Claude Opus 4.8, claude-opus-4-8) <noreply at anthropic.com>
DeltaFile
+152-6llvm/test/CodeGen/PowerPC/peephole-elim-extsw-subreg-input.mir
+152-61 files

LLVM/project 45ac47a — llvm/lib/Target/PowerPC PPCMIPeephole.cpp, llvm/test/CodeGen/PowerPC peephole-elim-extsw-subreg-input.mir

PPC: Fold 64-bit zero-extending word load feeding extsw subregister

A gprc LWZ/LWZX feeding EXTSW_32_64 is rewritten into a sign-extending
LWA/LWAX load. Extend the same fold to the 64-bit zero-extending word
loads LWZ8/LWZX8 when the EXTSW_32_64 reads their sub_32 subregister,
producing a single LWA/LWAX instead of a redundant lwz+extsw pair.

Co-authored-by: Claude (Claude Opus 4.8, claude-opus-4-8) <noreply at anthropic.com>
DeltaFile
+12-12llvm/test/CodeGen/PowerPC/peephole-elim-extsw-subreg-input.mir
+13-3llvm/lib/Target/PowerPC/PPCMIPeephole.cpp
+25-152 files

LLVM/project f0f0da6 — llvm/lib/Target/PowerPC PPCMIPeephole.cpp

review-comments
DeltaFile
+3-3llvm/lib/Target/PowerPC/PPCMIPeephole.cpp
+3-31 files

LLVM/project fd77cd9 — clang/lib/CodeGen BackendUtil.cpp, llvm/include/llvm/MC MCAsmInfo.h

CodeGen: Remove TargetOptions::ExceptionModel

The exception model now comes only from the "exception-model" module
flag. Remove the TargetOptions field and its copy into MCAsmInfo, so
MCAsmInfo only knows the target's default model.

The WebAssembly model checks move from the TargetMachine constructor
into the Emscripten EH/SjLj lowering pass. Clang relied on the backend
to reject non-wasm models for wasm targets, so it now rejects them
itself.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+2-32llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
+13-17llvm/include/llvm/MC/MCAsmInfo.h
+22-4llvm/test/CodeGen/AMDGPU/exception-model.ll
+13-4llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp
+0-11clang/lib/CodeGen/BackendUtil.cpp
+4-5llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+54-7320 files not shown
+98-11026 files

LLVM/project a0142bf — llvm/lib/Target/PowerPC PPCMIPeephole.cpp, llvm/test/CodeGen/PowerPC peephole-elim-extsw-subreg-input.mir

review comments
DeltaFile
+3-4llvm/lib/Target/PowerPC/PPCMIPeephole.cpp
+1-1llvm/test/CodeGen/PowerPC/peephole-elim-extsw-subreg-input.mir
+4-52 files

LLVM/project eda4f36 — llvm/include/llvm/Target TargetMachine.h, llvm/lib/Target TargetMachine.cpp

Let targets override the supported exception models
DeltaFile
+38-32llvm/lib/Target/TargetMachine.cpp
+18-4llvm/include/llvm/Target/TargetMachine.h
+56-362 files

LLVM/project e136222 — llvm/lib/Target/PowerPC PPCMIPeephole.cpp

Remove NarrowSubReg check
DeltaFile
+1-2llvm/lib/Target/PowerPC/PPCMIPeephole.cpp
+1-21 files

LLVM/project d531790 — llvm/lib/CodeGen TargetPassConfig.cpp, llvm/lib/Passes CodeGenPassBuilder.cpp

CodeGen: Read the exception model from the module flag

Module::getExceptionModel() now falls back to the triple's default
model instead of falling back to the TargetMachine.

The pass pipeline is built before the module is known, so schedule each
EH preparation pass when the target supports a model, and let the pass
check the module's model. Add TargetMachine::supportsExceptionModel so
the pass config can skip definitely irrelevant passes. SjLjEHPrepare is
now scheduled on every target with exception handling, and WinEHPrepare
only on COFF and Wasm targets. WinEHPrepare and WasmEHPrepare are
scheduled for Wasm by the base pass configs, replacing the WebAssembly
override.

This is almost the last step towards removing TargetOptions::ExceptionModel.

Co-authored-by: Claude Opus <noreply at anthropic.com>
DeltaFile
+38-35llvm/lib/CodeGen/TargetPassConfig.cpp
+35-34llvm/lib/Passes/CodeGenPassBuilder.cpp
+69-0llvm/test/CodeGen/X86/exception-model-flag-eh-prepare.ll
+64-0llvm/test/CodeGen/X86/exception-model.ll
+31-0llvm/lib/Target/TargetMachine.cpp
+25-0llvm/test/CodeGen/AMDGPU/exception-model.ll
+262-6940 files not shown
+361-15146 files

LLVM/project 1bb2513 — llvm/lib/Target/PowerPC PPCMIPeephole.cpp, llvm/test/CodeGen/PowerPC peephole-elim-extsw-subreg-input.mir

PPC: Fix extsw elimination when the input reads a subregister

The EXTSW_32_64 sign-extend elimination previously assumed its input
was a full register value. It would then try using that value as the
source of the new (unnecessary) INSERT_SUBREG.

The new test would then hit this verifier error:

```
bb.0:
  liveins: $x3
  %0:g8rc = COPY killed $x3
  %1:g8rc = RLDICL killed %0:g8rc, 0, 33
  %3:g8rc = IMPLICIT_DEF
  %2:g8rc = INSERT_SUBREG %3:g8rc(tied-def 0), %1:g8rc, %subreg.sub_32
  $x3 = COPY killed %2:g8rc
  BLR8 implicit $lr8, implicit $rm, implicit killed $x3

*** Bad machine code: INSERT_SUBREG expected inserted value to have equal or lesser size than the subreg it was inserted into ***

    [8 lines not shown]
DeltaFile
+27-12llvm/lib/Target/PowerPC/PPCMIPeephole.cpp
+30-0llvm/test/CodeGen/PowerPC/peephole-elim-extsw-subreg-input.mir
+57-122 files

LLVM/project d0e2b01 — llvm/test/tools/llvm-readobj/ELF stack-sizes.test, llvm/tools/llvm-readobj ELFDumper.cpp

[llvm-readobj][ELF] Print the address of each --stack-sizes entry (#232331)

In a linked file, print the function address that each .stack_sizes
entry holds as Address in the LLVM and JSON output. Until now the entry
only gave the function's names, so tools had to look the function up by
name to match the entry with other per-function data.

Assisted-by: Gemini
DeltaFile
+23-10llvm/tools/llvm-readobj/ELFDumper.cpp
+25-2llvm/test/tools/llvm-readobj/ELF/stack-sizes.test
+48-122 files

LLVM/project 77d19e8 — llvm/docs/CommandGuide llvm-readobj.md llvm-readelf.md

[llvm-readobj][docs] Update the --stack-sizes description (#232335)

The description said that --stack-sizes is only implemented for GNU
style output, which hasn't been the case for a while. Describe the LLVM
and JSON output instead, including the address that each entry in a
linked file now has.

Assisted-by: Gemini
DeltaFile
+3-2llvm/docs/CommandGuide/llvm-readobj.md
+3-2llvm/docs/CommandGuide/llvm-readelf.md
+6-42 files

LLVM/project 2bf80d2 — llvm/test/tools/llvm-readobj/ELF stack-sizes.test, llvm/tools/llvm-readobj ELFDumper.cpp

[llvm-readobj][ELF] Clear the Thumb bit from --stack-sizes addresses (#232338)

On ARM, the address of a Thumb function has bit 0 set, but that bit is
not part of the function's address. --stack-sizes looked up function
symbols at the address with the bit set, so Thumb functions were
reported as unknown, with a warning.

Clear the bit before the lookup, with a helper that is also used by the
two places in the call graph dumping code that already cleared it.

Assisted-by: Gemini
DeltaFile
+114-0llvm/test/tools/llvm-readobj/ELF/stack-sizes.test
+11-10llvm/tools/llvm-readobj/ELFDumper.cpp
+125-102 files

LLVM/project eff6cca — llvm/docs AMDGPUUsage.rst

[AMDGPU][NFC] Document buffer_inv without scope bits on GFX942 (#233528)

In the CDNA3/4 ISAs `buffer_inv` without `sc0/sc1` is documented to be a
no-op (see table 51/52 respectively in the ISA pdfs). Implicit to those
documents is that `buffer_inv` increments `VM_CNT` (this is since
`buffer_inv` is a MUBUF instruction and `VM_CNT` is incremented every
time a MUBUF instruction is issued). This PR documents these behaviors
in the AMD GPU docs.

As part of preparing this PR I verified `VM_CNT` is incremented (both
when `EXEC` is and isn't zero), benchmarked walltime of `buffer_inv` on
mi300+mi350, and detected whether the operand-less invocation
invalidates any cache. I put the code in
[danzimm/buffer-inv-bench](https://github.com/danzimm/buffer-inv-bench).
Full transparency: the benchmarks were coauthroed with claude. I audited
and then tweaked the benchmarks myself (e.g. originally claude didn't
use IB_STS, and used timing info to detect cache usage, as opposed to
rocprof as it does now). The full results can be found
[here](https://github.com/danzimm/buffer-inv-bench/blob/main/results.md),

    [19 lines not shown]
DeltaFile
+5-0llvm/docs/AMDGPUUsage.rst
+5-01 files

LLVM/project edfc0f2 — llvm/lib/Target/RISCV RISCVISelLowering.cpp, llvm/test/CodeGen/RISCV half-convert-strict.ll

[RISCV] Return the chain for strict FP_TO_FP16 on RV64 (#230948)

When F or D is available but Zfh is not, RISC-V custom lowers FP_TO_FP16
and STRICT_FP_TO_FP16 to a libcall. On RV64, the lowering returned only
the result, without the chain, even for the strict node. As a result,
strict conversions to half (for example fptrunc from float, or sitofp to
half) hit the assertion `Illegal result number!`.

This happens for any `_Float16` arithmetic with `-ffp-model=strict` on
RV64 without Zfh, because clang computes it in float and rounds the
result back to half.

Merge the chain on RV64 as well, as RV32 already does.

Assisted-by: Claude Opus 5.5
DeltaFile
+387-0llvm/test/CodeGen/RISCV/half-convert-strict.ll
+4-3llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+391-32 files

LLVM/project 9dcbf7a — clang/lib/Parse ParseExprCXX.cpp ParseStmt.cpp, clang/test/C/C2y n3267.c

[Clang][C2y] Reject declarations in the condition of a while loop

N3356 only extends the selection statements (`if` and `switch`), but the
shared condition parsing accepted `while (int x = 12) {}` in C as a C2y
extension. `while` passes a null init-statement into
`ParseParenExprOrCondition`, so use that to diagnose a condition
declaration as "expected expression" (matching GCC) instead of emitting
the compatibility/extension warning.

Also only emit the extension warning for a non-simple declaration in the
first clause when the declaration is actually permitted there.

Fixes #233839

Co-Authored-By: Claude Fable 5.1 <noreply at anthropic.com>
DeltaFile
+41-0clang/test/C/C2y/n3267.c
+12-4clang/lib/Parse/ParseStmt.cpp
+16-0clang/test/Parser/c2y-if-decl-while.c
+4-1clang/lib/Parse/ParseExprCXX.cpp
+73-54 files

LLVM/project 3332fc5 — llvm/lib/Transforms/IPO AttributorAttributes.cpp Attributor.cpp, llvm/test/Transforms/Attributor callsite-returned-type-mismatch.ll

Attributor: Don't use callee return attributes for mismatched call types

A call site returned position took the state and attributes of the
callee's returned position, even if the call uses a different return type
than the callee, e.g. calling a void function as returning ptr. This
asserted in AANonNull::isImpliedByIR on the non-pointer callee return
type, and put the callee's nofpclass on calls returning another FP type.
Ignore the callee's returned position, and its returned arguments, if the
types differ.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>



DeltaFile
+118-0llvm/test/Transforms/Attributor/callsite-returned-type-mismatch.ll
+6-2llvm/lib/Transforms/IPO/Attributor.cpp
+5-0llvm/lib/Transforms/IPO/AttributorAttributes.cpp
+129-23 files

LLVM/project 551497e — llvm/lib/Target/AMDGPU FLATInstructions.td

[AMDGPU][True16] Fix flat/global/scratch 16-bit load patterns (#232855)

Replace the raw (EXTRACT_SUBREG inst, lo16) in the _t16 load patterns
with the vgpr32_lo16 OutPatFrag so the extracted value carries the
VGPR_16 register class instead of relying on type inference.

Also remove the non-t16 pattern class for the sext/zext 16-bit atomic
global load: These are duplicated patterns

NFC.

Co-authored-by: Claude Opus 5 (1M context) <noreply at anthropic.com>
DeltaFile
+8-11llvm/lib/Target/AMDGPU/FLATInstructions.td
+8-111 files

LLVM/project 194e2e7 — lldb/source/Plugins/Process/Utility RegisterInfos_arm64.h lldb-riscv-register-enums.h, lldb/source/Register/Arch lldb-riscv-register-enums.h

Merge branch 'main' into users/zGoldthorpe/licm-bug/take-tag-subset
DeltaFile
+0-4,730lldb/source/Plugins/Process/Utility/lldb-riscv-register-enums.h
+4,730-0lldb/source/Register/Arch/lldb-riscv-register-enums.h
+4,185-0llvm/test/Transforms/LoopVectorize/WebAssembly/dequantize.ll
+1,079-468llvm/test/Analysis/CostModel/AArch64/free-widening-casts.ll
+1,174-0llvm/test/CodeGen/AArch64/sve-streaming-mode-fixed-length-fp-to-int.ll
+0-818lldb/source/Plugins/Process/Utility/RegisterInfos_arm64.h
+11,168-6,0161,328 files not shown
+66,130-29,3981,334 files

FreeBSD/src 07ab87b — sys/powerpc/powerpc mp_machdep.c

powerpc: powerpc_ipi_handler(): Stop first, preempt last

Preemption should happen last so that other IPIs have a chance to be
executed in due course, in particular hardclockintr().  So, move
handling of IPI_PREEMPT at the end.

An IPI_STOP/IPI_STOP_HARD request should be processed immediately to
avoid risks that further processing changes the system state on panic,
or worse itself causes another panic on corrupted kernel state.

While here, move IPI_AST handling just before IPI_PREEMPT.  We currently
do not need to do anything for it, but if we were to, it is likely that
would have to happen after other IPIs but IPI_PREEMPT.

Reviewed by:    jhibbits
Fixes:          9d5a22b928c2 ("MFp4: SMP support")
Fixes:          12640815f815 ("MFp4: SMP support")
Fixes:          7ed09a6778d3 ("powerpc: Rework IPI message processing")
MFC after:      1 week

    [2 lines not shown]
DeltaFile
+17-11sys/powerpc/powerpc/mp_machdep.c
+17-111 files

FreeBSD/src 3a0e2ca — sys/x86/x86 mp_x86.c

x86: ipi_bitmap_handler(): Account for IPIs correctly on COUNT_IPIS

A preemption could occur before the updates to the initial CPU's IPI
counters, leading to a potential non-atomic updates of these counters
from another CPU.

Reviewed by:    kib
Fixes:          ff326a187907 ("x86: Restore the critical section (...)")
MFC after:      1 week
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D60862
DeltaFile
+12-13sys/x86/x86/mp_x86.c
+12-131 files

FreeBSD/src b83bd6f — sys/x86/x86 mp_x86.c

x86: ipi_bitmap_handler(): Preempt last, reduce critical section

Preemption should happen last so that other IPIs have a chance to be
executed in due course, in particular hardclockintr().  So, move
handling of IPI_PREEMPT at the end.

Reduce the critical section to be in force only around hardclockintr(),
which needs it to execute entirely without preemption (because of code
it calls that can enter a critical section; interrupts are already
disabled in this handler, as usual).

The critical_exit() following hardclockintr() may cause preemption if
due.  If that happens, there is no need to preempt again on IPI_PREEMPT,
so make sure sched_preempt() is not called in this case.

This fixes inadvertent removal of the optimization that sched_preempt()
should be called outside of a critical section to perform an immediate
context switch in the case of IPI_HARDCLOCK and IPI_PREEMPT being
handled at the same time.

    [10 lines not shown]
DeltaFile
+27-18sys/x86/x86/mp_x86.c
+27-181 files

LLVM/project f0f9020 — llvm/lib/CodeGen AtomicExpandPass.cpp, llvm/lib/Target/AVR AVRTargetMachine.cpp

AVR: Run AtomicExpand (#233207)

Atomics wider than 16 bits were lowered to __sync_* calls. No AVR
runtime provides __sync_* or __atomic_*, but __sync_* requires a
lock-free implementation, which AVR cannot provide at those sizes.
Use the __atomic_* calls instead.

Alternatively it may be appropriate to change getDefaultThreadModel to
singlethread for avr so all atomics are lowered into non-atomic
sequences.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+2-2llvm/test/CodeGen/AVR/atomics/swap.ll
+2-2llvm/test/CodeGen/AVR/atomics/store.ll
+2-2llvm/test/CodeGen/AVR/atomics/load64.ll
+2-2llvm/test/CodeGen/AVR/atomics/load32.ll
+2-2llvm/lib/CodeGen/AtomicExpandPass.cpp
+1-0llvm/lib/Target/AVR/AVRTargetMachine.cpp
+11-101 files not shown
+12-107 files

LLVM/project 8122135 — llvm/lib/Target/RISCV RISCVISelLowering.cpp, llvm/test/CodeGen/RISCV rvp-simd-64.ll

 [RISCV][P-ext] Combine (zext_invec (punzipe X, Y)) -> (ppaire X, 0) (#233713)

For RV64, the avgfloor combine creates truncates for both inputs
and an extend fo the result. Those truncates are type legalized to
shufflevectors and bitcasts. The shufflevectors are pulled through
the avgfloor to create a single shuffle after. Then we match that
to PUNZIPE. Now we have a PUNZIPE followed by zext_invec.

For the signed case, the sext_invec is legalized to
aext_invec+sext_inreg. The aext_invec is legalized to zext_invec.
This leaves a redundant pzext.h.b or pzext.w.h.

We could instead combine earlier in shuffle form before the
PUNZIPE is matched, but that would be more complex.
DeltaFile
+108-18llvm/test/CodeGen/RISCV/rvp-simd-64.ll
+18-0llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+126-182 files

LLVM/project 8fbe171 — llvm/include/llvm/CodeGen/GlobalISel LegalizerHelper.h, llvm/lib/CodeGen/GlobalISel LegalizerHelper.cpp

GlobalISel: Add a lowering of G_FCONSTANT to G_CONSTANT

RISCV and ARM both custom legalized G_FCONSTANT into a G_CONSTANT with
the same bits. Add LegalizerHelper::lowerFConstantAsConstant and use it
in both.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+2-10llvm/lib/Target/RISCV/GISel/RISCVLegalizerInfo.cpp
+2-8llvm/lib/Target/ARM/ARMLegalizerInfo.cpp
+8-0llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
+2-0llvm/include/llvm/CodeGen/GlobalISel/LegalizerHelper.h
+14-184 files