LLVM/project 438811f — llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer DependencyGraph.h, llvm/lib/Transforms/Vectorize/SandboxVectorizer DependencyGraph.cpp

Reapply "[SandboxVec][DAG] Fix moveInstrNotifier on empty DAG" (#243968) (#243974)

This reverts commit a8f02ac69771b74a7329c399ace76fb1a5b86020.
DeltaFile
+21-0llvm/unittests/Transforms/Vectorize/SandboxVectorizer/DependencyGraphTest.cpp
+2-2llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/DependencyGraph.h
+3-0llvm/lib/Transforms/Vectorize/SandboxVectorizer/DependencyGraph.cpp
+26-23 files

LLVM/project 61408d7 — llvm/include/llvm/Target Target.td, llvm/test/TableGen RegClassByHwMode.td AsmMatcherCoerceFromRegClass.td

[nspr] initial commit
DeltaFile
+46-16llvm/utils/TableGen/AsmMatcherEmitter.cpp
+37-0llvm/test/TableGen/AsmMatcherCoerceFromRegClass.td
+26-2llvm/test/TableGen/RegClassByHwMode.td
+6-1llvm/include/llvm/Target/Target.td
+115-194 files

LLVM/project 1afb861 — llvm/lib/Target/RISCV RISCVRegisterInfo.td, llvm/test/TableGen AsmMatcherCoerceFromRegClass.td

[nspr] initial commit
DeltaFile
+105-15llvm/test/TableGen/AsmMatcherCoerceFromRegClass.td
+6-0llvm/lib/Target/RISCV/RISCVRegisterInfo.td
+111-152 files

LLVM/project 15dae8a — llvm/test/TableGen AsmMatcherCoerceFromRegClass.td, llvm/utils/TableGen AsmMatcherEmitter.cpp

[nspr] initial commit
DeltaFile
+22-4llvm/utils/TableGen/AsmMatcherEmitter.cpp
+10-0llvm/test/TableGen/AsmMatcherCoerceFromRegClass.td
+32-42 files

LLVM/project 119f001 — llvm/include/llvm/Target Target.td

[nspr] update
DeltaFile
+4-5llvm/include/llvm/Target/Target.td
+4-51 files

LLVM/project 8f95461 — llvm/lib/Target/CSKY CSKYRegisterInfo.td, llvm/lib/Target/CSKY/AsmParser CSKYAsmParser.cpp

[nspr] initial commit
DeltaFile
+5-30llvm/lib/Target/CSKY/AsmParser/CSKYAsmParser.cpp
+5-2llvm/lib/Target/CSKY/CSKYRegisterInfo.td
+10-322 files

LLVM/project 1c91cf1 — llvm/include/llvm/Analysis AliasAnalysis.h, llvm/lib/Analysis BasicAliasAnalysis.cpp

[BasicAA] Cache block reachability in EarliestEscapeAnalysis (NFC). (#243919)

Unless the capture comes before the context instruction in the same
block, the result only depends on the two blocks, so cache it, keyed by
block numbers.

Numbers of deleted blocks are not reused and the only CFG changes while
an EarliestEscapeAnalysis is live (critical edge splitting and block
merging in GVN) do not add paths between existing blocks, so the cache
does not need to be invalidated.

stage1-O3: -0.11%
stage1-ReleaseThinLTO: -0.12%
stage1-ReleaseLTO-g: -0.09%
stage1-aarch64-O3: -0.10%
stage2-O3: -0.11%
stage2-clang: -0.37%

Assisted-by: Opus 5.5

    [4 lines not shown]
DeltaFile
+22-2llvm/lib/Analysis/BasicAliasAnalysis.cpp
+11-2llvm/include/llvm/Analysis/AliasAnalysis.h
+33-42 files

LLVM/project 6ce654b — llvm/lib/Target/LoongArch LoongArchRegisterInfo.td, llvm/lib/Target/LoongArch/AsmParser LoongArchAsmParser.cpp

[nspr] initial commit
DeltaFile
+0-14llvm/lib/Target/LoongArch/AsmParser/LoongArchAsmParser.cpp
+3-1llvm/lib/Target/LoongArch/LoongArchRegisterInfo.td
+3-152 files

LLVM/project b89d9a0 — llvm/lib/Target/MSP430 MSP430RegisterInfo.td, llvm/lib/Target/MSP430/AsmParser MSP430AsmParser.cpp

[MSP430][MC] Use CoerceFromRegClass for GR8 operands (#241447)

Set `CoerceFromRegClass = GR16` on `GR8` so that the generated matcher
can do the register conversion. This allows removing the custom
`validateTargetOperandClass` override and stops doing operand mutation
during validation.

Assisted-by: AI tooling
DeltaFile
+0-49llvm/lib/Target/MSP430/AsmParser/MSP430AsmParser.cpp
+10-8llvm/lib/Target/MSP430/MSP430RegisterInfo.td
+10-572 files

LLVM/project ef208fa — llvm/test/TableGen AsmMatcherCoerceFromRegClass.td, llvm/utils/TableGen AsmMatcherEmitter.cpp

[TableGen][AsmMatcher] Emit arithmetic for linear register coercion. NFCI (#241974)

Sort `CoerceFromRegClass` mappings by source register enum value and
emit a range/stride assertion plus offset arithmetic when both source
and destination enum values have constant strides.

I checked that some simple linear switches are already optimized in
release builds, but some of the more complicated ones (e.g. GPRPairNoX0
and `GPRPairC`) still use lookup tables or even an actual jump table
like CSKY `FPR64`. Even for the ones that are optimized by Clang,
emitting it as arithmetic directly avoids bloating the generated file
with large switch statements that need to be optimized away.

I asked Gemini to summarize the improvements and this is what it said:
Across the converted targets (RISC-V, LoongArch, MSP430, CSKY):
- Better -O2 codegen (5): CSKY FPR64/sFPR64/sFPR64_V (avoids jump table)
  and RISC-V GPRPairNoX0/GPRPairC (avoids .rodata lookup table).
- Same -O2 codegen, smaller .inc / faster -O0 (10): RISC-V FPR16, FPR32,
  FPR32C, FPR128, FPR256, YGPR, YGPRNoX0, VRM8; LoongArch FPR64; CSKY

    [3 lines not shown]
DeltaFile
+56-13llvm/utils/TableGen/AsmMatcherEmitter.cpp
+44-9llvm/test/TableGen/AsmMatcherCoerceFromRegClass.td
+100-222 files

LLVM/project d6a282a — llvm/lib/Transforms/Vectorize VPlanTransforms.cpp

Reuse debugloc
DeltaFile
+2-3llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+2-31 files

LLVM/project 3ff8c8b — llvm/lib/Target/AArch64 AArch64InstrInfo.td, llvm/test/CodeGen/AArch64 and-imm32-from-i64.ll

[AArch64] Use 32-bit logical immediate for 64-bit AND (#242568)

use 32-bit logical immediate encoding for 64-bit AND when the mask is
not encodable as a 64-bit logical immediate.
DeltaFile
+63-0llvm/test/CodeGen/AArch64/and-imm32-from-i64.ll
+13-0llvm/lib/Target/AArch64/AArch64InstrInfo.td
+76-02 files

FreeBSD/src cd2ec1b — usr.bin/top display.c

top: fix off-by-one in screenbuf

There is a heap overflow for screenbuf originating from
the top import to the tree. The i_process()/u_process() functions
write a terminating NUL one byte past each screenbuf line slot
when the line fills the slot, which is a 1-byte heap overflow on the last slot.

The display_resize() function allocates screen_width bytes per line.
i_process() and u_process() cut lines to screen_width characters and
then stpcpy() them into the slot, which writes screen_width + 1 bytes.
line_update() can do the same with *old = ch. For inner slots,
the NUL lands in byte 0 of the next slot. This can corrupt the saved
contents used when updating the next line. For the last slot, it writes
one byte past the end of screenbuf.

Fix by allocating (screen_width + 1) bytes per line and updating the
line offsets to fit the terminating NUL.

Reviewed by:    kib

    [5 lines not shown]
DeltaFile
+3-3usr.bin/top/display.c
+3-31 files

LLVM/project 4408136 — llvm/lib/CodeGen CodeGenCommonISel.cpp, llvm/test/CodeGen/AArch64/GlobalISel legalizer-erased-def-debug-use.mir salvage-debug-info-bitcast-build-vector.ll

[GlobalISel] Salvage debug info for dead G_BITCAST and G_BUILD_VECTOR (#238591)

When a combine such as unmerge(bitcast(build_vector)) leaves the
G_BITCAST
and G_BUILD_VECTOR dead, salvageDebugInfo could describe neither, so
their
DBG_VALUE users were set to undef and the variable was reported as
optimized out.

Salvage G_BITCAST like a COPY by pointing the DBG_VALUE at its source,
and
replace a DBG_VALUE of a dead G_BUILD_VECTOR with one
DW_OP_LLVM_fragment
DBG_VALUE per element. Expressions that compute on the whole value are
not
split.
DeltaFile
+111-0llvm/test/CodeGen/AArch64/GlobalISel/salvage-debug-info-bitcast-build-vector.mir
+56-1llvm/lib/CodeGen/CodeGenCommonISel.cpp
+44-0llvm/test/CodeGen/AArch64/GlobalISel/salvage-debug-info-bitcast-build-vector.ll
+3-1llvm/test/CodeGen/AArch64/GlobalISel/legalizer-erased-def-debug-use.mir
+214-24 files

LLVM/project 92aa30f — llvm/lib/Transforms/Vectorize VPlanLowering.cpp VPlanTransforms.cpp, llvm/test/Transforms/LoopVectorize interleave_uncountable_exits.ll

Move scalar lowering to expandMaskBeforeFirst
DeltaFile
+9-4llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+0-10llvm/lib/Transforms/Vectorize/VPlanLowering.cpp
+1-2llvm/test/Transforms/LoopVectorize/interleave_uncountable_exits.ll
+10-163 files

LLVM/project b9441db — clang/lib/Basic AtomicLineLogger.cpp

[clang][Basic] Open AtomicLineLogger file with OF_Text (#243986)

When opening the log file in `AtomicLineLogger::openLogFile`, specify
`OF_Text` in addition to `OF_Append`.

On platforms like z/OS (`__MVS__`), omitting `OF_Text` tags the newly
created file as binary and disables auto-conversion. Consequently, log
lines written as ASCII/UTF-8 cannot be processed by native system tools
like `grep`, causing tests such as `ClangScanDeps/logging-two-threads.c`
to fail when grepping the log file. Adding `OF_Text` ensures the file is
opened in text mode with proper file tagging and character conversion.
DeltaFile
+2-1clang/lib/Basic/AtomicLineLogger.cpp
+2-11 files

LLVM/project 9665fc4 — llvm/lib/Target/AMDGPU SIISelLowering.cpp, llvm/test/CodeGen/AMDGPU addrspacecast-known-non-null-O0.ll

[AMDGPU] Pass the cast source to isKnownNonNull in lowerADDRSPACECAST

`lowerADDRSPACECAST` passes the cast node instead of its source to
`isKnownNonNull`. The cast node is never a frame index, a global address, or a
constant, so the check never succeeds, and SelectionDAG checks for null when it
casts an alloca or a global. At -O2 the `nonnull` flag that IR passes set on the
cast hides this, but at -O0 every such cast gets a compare and two selects. The
GlobalISel path already passes the source.

This PR was assisted by AI but I reviewed all the changes.
DeltaFile
+0-14llvm/test/CodeGen/AMDGPU/addrspacecast-known-non-null-O0.ll
+2-2llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+2-162 files

FreeBSD/ports 5b80f0c — www/opencloud Makefile

www/opencloud: Fix build on i386

Fix the build failure on architectures where vendored nats-server's
server/pse package lacks non-cgo FreeBSD implementation (such as i386).

PR:     300899
DeltaFile
+10-1www/opencloud/Makefile
+10-11 files

FreeBSD/src 5165da2 — sys/netpfil/pf pf_lb.c, tests/sys/netpfil/pf Makefile nat46.sh

pf: fix nat46 ICMP handling

When porting from OpenBSD I typo'd the variable where we store the ICMP
type, in the nat46 direction. The nat64 direction was correct. Fix this
so ICMP translation works for nat46.

Add a test case for this, as well as basic TCP and UDP cases because
nat46 was entirely untested.

PR:             300461
MFC after:      1 week
Submitted by:   Charles Marshall <charles at wozi.com> (pf patch)
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+190-0tests/sys/netpfil/pf/nat46.sh
+2-2sys/netpfil/pf/pf_lb.c
+1-0tests/sys/netpfil/pf/Makefile
+193-23 files

FreeBSD/src e536321 — sys/netpfil/pf pf_norm.c

pf: fix sctp normalisation cleanup

If we fail to allocate the dst scrub structure we should free the src
one too, but we passed src rather than src->scrub.

Reported by:    llm-postcr
MFC after:      1 week
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+1-1sys/netpfil/pf/pf_norm.c
+1-11 files

FreeBSD/src c589ea8 — tests/sys/netpfil/pf/ioctl Makefile validation.c

pf tests: run the ioctl tests in their own vnet too

Fix the validation:settflags test, because using a NULL buffer succeeds
if there's no table to set tflags in. Create a table to fix the test.

Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+8-0tests/sys/netpfil/pf/ioctl/validation.c
+4-0tests/sys/netpfil/pf/ioctl/Makefile
+12-02 files

FreeBSD/src 5131335 — tests/sys/netpfil/pf snmp.sh

pf tests: test pfTablesTblCount in snmp_pf

This works fine on main, but not on stable/15 so add a test.

PR:     300818
MFC after:      3 days
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+13-0tests/sys/netpfil/pf/snmp.sh
+13-01 files

OpenZFS/src d1a5b59 — .github/workflows/scripts qemu-6-tests.sh

CI: Temporarily ignore Lustre build result (#19946)

Lustre is currently having issues building against the Linux kernel.
Temporarily ignore the return code from the Lustre test build.

Signed-off-by: Tony Hutter <hutter2 at llnl.gov>
Reviewed-by: Tigerblue77 <37409593+tigerblue77 at users.noreply.github.com>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
DeltaFile
+6-0.github/workflows/scripts/qemu-6-tests.sh
+6-01 files

LLVM/project 2db791d — llvm/test/CodeGen/AMDGPU addrspacecast-known-non-null-O0.ll

[NFC][AMDGPU] Add a test for casts of known non-null pointers at -O0

At -O0, SelectionDAG checks for null when it casts an alloca or an LDS global
to flat, but GlobalISel does not.

This PR was assisted by AI but I reviewed all the changes.
DeltaFile
+99-0llvm/test/CodeGen/AMDGPU/addrspacecast-known-non-null-O0.ll
+99-01 files

LLVM/project 74a838f — flang/include/flang/Frontend CompilerInstance.h, flang/include/flang/Lower Bridge.h

[flang] Allow LLVM IR generation without a target backend (#240497)

Clang allows LLVM-IR generation even when the full backend for that
triple is not built. This commit updates flang to do the same, avoiding
the need for fixes like #240458.

Use the invocation target triple, CPU and features for semantics and FIR
lowering instead of requiring an LLVM TargetMachine. Allow the
optimization pipeline to run without a target machine while retaining
the backend requirement for assembly and object output.

The new test breaks convention by only running when x86 is *not* a
registered target. One alternative would be to pick a very obscure
backend so this test is run in more places. Suggestions are welcome.

Assisted-by: AI
DeltaFile
+19-18flang/lib/Frontend/FrontendActions.cpp
+17-0flang/test/Driver/no-backend.f90
+2-10flang/include/flang/Frontend/CompilerInstance.h
+5-6flang/lib/Lower/Bridge.cpp
+6-5flang/lib/Frontend/CompilerInvocation.cpp
+3-7flang/include/flang/Lower/Bridge.h
+52-464 files not shown
+66-5810 files

LLVM/project f23a276 — llvm/lib/CodeGen ExpandIRInsts.cpp WinEHPrepare.cpp

[CodeGen] Declare command line options of more passes in TableGen (#244099)

Renames, with the old spellings kept as aliases:

```
-disable-check-noreturn-call    -> -stack-protector-check-noreturn-call=false
-enable-selectiondag-sp         -> -stack-protector-selectiondag
-safestack-use-pointer-address  -> -safe-stack-use-pointer-address
```

Renames without an alias, as the old spellings are generic or unused:

```
-canon-nth-function  -> -mir-canonicalizer-nth-function
-disable-cleanups    -> -win-eh-prepare-cleanups=false
-disable-demotion    -> -win-eh-prepare-demotion=false
```

LLM-aided
DeltaFile
+81-0llvm/lib/CodeGen/CodeGenOptions.td
+18-40llvm/lib/CodeGen/PostRASchedulerList.cpp
+16-31llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp
+11-17llvm/lib/CodeGen/ImplicitNullChecks.cpp
+10-17llvm/lib/CodeGen/WinEHPrepare.cpp
+6-20llvm/lib/CodeGen/ExpandIRInsts.cpp
+142-12511 files not shown
+186-19217 files

LLVM/project 771bc0c — libc/cmake/modules LLVMLibCTestRules.cmake, libc/test/src/__support/regex CMakeLists.txt

[libc] Increase stack size in NVPTX matcher stress test (#244276)

Since #236569 landed, I've been seeing a GPU memory-access error while
running `matcher_test` (buildbot error
[here](https://lab.llvm.org/buildbot/#/builders/101/builds/47542)). The
new long-pattern cases exceed the test runner’s default 3 KiB device
stack.

This PR lets test-specific `ENV` entries override
`LIBOMPTARGET_STACK_SIZE` and gives `matcher_test` a 64 KiB stack to
prevent overflow.

Verified on a local GPU: the original 3 KiB setting reproduces the
memory-access error, while 64 KiB passes all 13 matcher tests.

Assisted-by: Devin
DeltaFile
+5-4libc/cmake/modules/LLVMLibCTestRules.cmake
+4-0libc/test/src/__support/regex/CMakeLists.txt
+9-42 files

LLVM/project 261a7a9 — llvm/lib/Target/AArch64 CMakeLists.txt AArch64IntrinsicsVerifier.cpp, llvm/test/TableGen AArch64IntrinsicFeatureChecks.td

[AArch64] Use guarded intrinsic table info in verifier
DeltaFile
+0-55llvm/test/TableGen/AArch64IntrinsicFeatureChecks.td
+28-0llvm/lib/Target/AArch64/AArch64IntrinsicFeatureInfo.cpp
+21-0llvm/lib/Target/AArch64/AArch64IntrinsicFeatureInfo.h
+8-10llvm/lib/Target/AArch64/AArch64IntrinsicsVerifier.cpp
+1-0llvm/lib/Target/AArch64/CMakeLists.txt
+58-655 files

LLVM/project dde4f59 — llvm/lib/Target/X86 X86ISelLowering.cpp, llvm/test/CodeGen/X86 prefetchi.ll

[X86] Drop instruction prefetch with unsupported operands in LowerPREFETCH (#225826)

Fixes #218236

The x86 `PREFETCHI` instruction set extension only supports instruction
read prefetch (`IsData = 0`, `RW = 0`) with `PREFETCHIT0` (locality 3)
or `PREFETCHIT1` (locality 2) hints in 64-bit mode.

Previously, `LowerPREFETCH` only checked `!IsData &&
!Subtarget.hasPREFETCHI()` before returning the unmodified `Op`. On
targets with `PREFETCHI` enabled (e.g., `znver5`, `graniterapids`), an
instruction prefetch with write intent (`RW = 1`), unsupported locality
(0 or 1), or in 32-bit mode was left unhandled, leading to SelectionDAG
aborts.

Assisted-by: Claude
DeltaFile
+57-0llvm/test/CodeGen/X86/prefetchi.ll
+8-3llvm/lib/Target/X86/X86ISelLowering.cpp
+65-32 files

LLVM/project 2c277dc — llvm/utils/gn/secondary/clang/include/clang/Basic BUILD.gn, llvm/utils/gn/secondary/clang/utils/TableGen BUILD.gn

[AArch64] Remove GN and Bazel changes for intrinsic feature guards
DeltaFile
+5-29utils/bazel/llvm-project-overlay/clang/BUILD.bazel
+0-8utils/bazel/llvm-project-overlay/llvm/BUILD.bazel
+2-2llvm/utils/gn/secondary/clang/include/clang/Basic/BUILD.gn
+0-1llvm/utils/gn/secondary/clang/utils/TableGen/BUILD.gn
+7-404 files