[BOLT][RISCV] Handle cross-fragment branches in split functions (#223958)
Function splitting can place RISC-V hot and cold fragments beyond the ±1
MiB JAL range, causing relocation overflows.
Add `RISCVLongJmpPass` before function finalization to redirect each
cross-fragment CFG edge through a stub in the source fragment. The stub
uses `PseudoJump`, which expands to AUIPC/JALR without modifying ra and
can be shortened by JITLink when the target is within range.
Since RISC-V has no ABI-reserved scratch register for arbitrary
intra-function branches, need to select a caller-saved GPR that is dead
at the target. Conservatively exclude registers referenced by CFI and
disable scratch selection when raw CFI escapes are present. If any edge
has no safe scratch register, cancel splitting for that function while
preserving its basic block layout order.
NAS-144823 / 27.0.0 / Add layout parameter to sharing.s3 (by anodos325) (#20042)
Add a new create-time-only field to sharing.s3 `layout` that indicates
whether the specified share is used as a normal truenas S3 bucket, which
implies a certain directory structure `s3data` contains the live data
export and `.truenas_s3` contains a side tree with versions, in-progress
multipart uploads, etc. Or a "whole dataset" bucket.
Whole dataset buckets are readonly and are used for cases where
administrators wish to export existing RW NFS / SMB shares over S3 in a
readonly manner.
The configuration knob used to determine the type of bucket to be
created (and once again, this is create-time only), is the new `layout`
parameter that supports two values:
* BUCKET - a conventional S3 oriented bucket that may optionally be
exported RO via NFS / SMB
[12 lines not shown]
games/xray-16: Fix g_actor assertion in minimap update
Since the CUIZoneMap::Update(const CActor*) refactor the minimap radar
is updated even when the current view entity is not an actor. Map
locations then call Actor() from CMapLocation::UpdateSpot(), which
asserts (debug) or dereferences NULL (release). Skip the radar update
when there is no actor.
PR: 299743
Sponsored by: UNIS Labs (vvd)
Co-authored-by: Vladimir Druzenko <vvd at FreeBSD.org>
MFH: 2026Q4
(cherry picked from commit 7ffddc938047e2dce2d47424585ceb4a5e6179a0)
games/xray-16: Fix g_actor assertion in minimap update
Since the CUIZoneMap::Update(const CActor*) refactor the minimap radar
is updated even when the current view entity is not an actor. Map
locations then call Actor() from CMapLocation::UpdateSpot(), which
asserts (debug) or dereferences NULL (release). Skip the radar update
when there is no actor.
PR: 299743
Sponsored by: UNIS Labs (vvd)
Co-authored-by: Vladimir Druzenko <vvd at FreeBSD.org>
MFH: 2026Q4
NAS-144823 / 28.0.0-BETA.1 / Add layout parameter to sharing.s3 (#20035)
Add a new create-time-only field to sharing.s3 `layout` that indicates
whether the specified share is used as a normal truenas S3 bucket, which
implies a certain directory structure `s3data` contains the live data
export and `.truenas_s3` contains a side tree with versions, in-progress
multipart uploads, etc. Or a "whole dataset" bucket.
Whole dataset buckets are readonly and are used for cases where
administrators wish to export existing RW NFS / SMB shares over S3 in a
readonly manner.
The configuration knob used to determine the type of bucket to be
created (and once again, this is create-time only), is the new `layout`
parameter that supports two values:
* BUCKET - a conventional S3 oriented bucket that may optionally be
exported RO via NFS / SMB
[20 lines not shown]
[LoongArch] Select branches on `V{ALL,ANY}_{,NON}ZERO` to consume $FCC directly (#230801)
Much like what's already done in #226814, this PR matches branches that
use `V{ALL,ANY}_{,NON}ZERO` on the LHS and 0 on the RHS, and tries to
consume `$FCC0` directly when possible.
Two new tests focusing on vector branch-against-zero intrinsics are
added, one for LSX and one for LASX.
Fixes: #229443
Depends-on: #230799
[mlir][linalg] Fix incorrect hoisting of transfers with mismatched masks (#232246)
`hoist_redundant_vector_transfers` can change the result of a loop when
the read and write have different mask operands.
For example, `%buffer` initially contains `[0, 0]`, `%mask` is `[true,
false]`, `%zero` is `0`, and `%ones` is `[1, 1]`:
```mlir
scf.for %i = %c0 to %c2 step %c1 {
%v = vector.transfer_read %buffer[%c0], %zero, %mask
{in_bounds = [true]} : memref<2xi32>, vector<2xi32>
%next = arith.addi %v, %ones : vector<2xi32>
vector.transfer_write %next, %buffer[%c0]
{in_bounds = [true]} : vector<2xi32>, memref<2xi32>
}
```
The masked read returns zero for the second element on every iteration.
[24 lines not shown]
[docs] Finish MyST migration for leftover docs
Clean up the rst2myst output for the lldb man pages, the VariableNames
proposal, and the lit, gn, cmake and OpenMP Modules READMEs. The man
pages keep generating byte-identical roff, and the READMEs use plain
GitHub-flavored Markdown because they are viewed on GitHub and are not
part of a Sphinx build. Declare Markdown as lit's long_description
content type now that its README is Markdown.
LLM-aided
[SimplifyCFG] Fix file comment about single-entry PHI elimination (NFC)
The file comment claimed SimplifyCFG "Eliminates PHI nodes for basic
blocks with a single predecessor." It doesn't do that in general: it only
folds single-entry PHIs as part of merging a block into its predecessor
(and in one branch-threading special case). Other single-entry PHIs are
deliberately left alone because they may be LCSSA PHIs, and InstSimplify
and InstCombine already remove them.
Fixes #5211.
Assisted-by: Claude Opus 5.5
[Attributor][NFC] Cleanup nofpclass-fma.ll (#234805)
Cleaned up the tests for `nofpclass-fma.ll` since I plan on working on
`KnownFPClass::fma`.
Updates to `--version 6`, removes `TUNIT`, and one duplicate test was
removed.
[NFC][clang][test] Split inline builtin tests and add strlen test (#234414)
Split `memcpy-inline-builtin-no-extern.c` into separate files for
`memcpy`,
`memcmp`, and `umask`, and use `--filter "call "` to keep the checks
concise.
Add `strlen-inline-builtin.c` to test `section` on an inline builtin.
Assisted-by: Gemini
[Clang][RISCV] Add packed byte horizontal multiply-accumulate intrinsics (#234484)
Add `__riscv_pm4adda_i8x8`, `__riscv_pm4addau_u8x8`, and
`__riscv_pm4addasu_i8x8` from the Packed Multiplication with Horizontal
Addition and Accumulate section of the P-extension intrinsic
specification.
The wrappers reuse the existing packed dot-product intrinsics and
generic vector addition. RV64 selects one byte multiply-accumulate
instruction; RV32 selects one for each word.
TableGen: Remember superclass results when finding derived definitions (#234807)
getAllDerivedDefinitions checks every def with isSubClassOf, which
searches the def's superclasses recursively. Most defs share a few
superclasses, so the same searches are repeated many times: for AMDGPU,
each uncached query checks 153000 defs. Remember the result for each
superclass during a query instead.
All 366 tablegen runs in an LLVM build with all targets:
Gigainstructions Gigacycles CPU seconds
Before 2277 1477 521
After 2264 (-0.5%) 1423 (-3.7%) 503 (-3.3%)
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
Merge tag 'hardening-v7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
Pull hardening updates from Kees Cook:
- Provide kmalloc_obj*-style API for devm_kmalloc()
- Improve seq_buf API for saner C String handling with several bug
fixes along the way (Kees Cook, Bill Wendling)
- Overflow helper readability improvements (Bill Wendling)
- Unexport native_write_cr4() (Dennis Chen)
- um: fix CONFIG_GCOV for built-in code (Johannes Berg)
- Improve stackinit test coverage (Justin Stitt)
- KMSAN: fix memset() when using fortify-source, again (Arnd Bergmann)
[32 lines not shown]
Merge tag 'execve-v7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
Pull execve update Kees Cook:
"Make CIs happier about the execve tests: report the skipped
binfmt_misc_bpf test on stderr (Sasha Levin)"
* tag 'execve-v7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
selftests/exec: report the skipped binfmt_misc_bpf test on stderr
Merge tag 'seccomp-v7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
Pull seccomp updates from Kees Cook:
- allow addfd to transfer O_PATH descriptors (Cong Wang)
- allow restarting interrupted unreceived notifications (Cong Wang)
- fix SECCOMP_ADDFD_FLAG_SEND when interrupted (Hui Peng)
- Various docs and test clean-ups
* tag 'seccomp-v7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
selftests/seccomp: Split fork_and_close into clone and close tests
seccomp: Document RESTART_BEFORE_RECV and O_PATH addfd
selftests/seccomp: test addfd with an O_PATH descriptor
seccomp: allow addfd to transfer O_PATH descriptors
docs/seccomp: describe the SECCOMP_FILTER_FLAG_RESTART_BEFORE_RECV flag
selftests/seccomp: cover restart of unreceived notifications
[2 lines not shown]
Merge tag 'pstore-v7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
Pull pstore updates from Kees Cook:
- don't leave an ERR_PTR in the ramoops zone pointer (Andrea Parri)
- reject persistent RAM zones too small for the buffer header (Andrea Parri)
- publish big_oops_buf after max_compressed_size (Jaidev Shastri)
* tag 'pstore-v7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
pstore: publish big_oops_buf after max_compressed_size
pstore: reject persistent RAM zones too small for the buffer header
pstore: don't leave an ERR_PTR in the ramoops zone pointer
[llvm-reduce] Skip landingpad clauses in operands-to-args (#219748)
Fixes #219667.
The operands-to-args delta pass could select a landingpad clause for
replacement with a function argument. Landingpad clauses must remain
constants, so this produced invalid IR and triggered the
`cast<Constant>`
assertion while the reducer verified a candidate.
Skip operands owned by `LandingPadInst`. The regression test runs only
the
operands-to-args pass with `--abort-on-invalid-reduction` and verifies
that
the function remains argument-free and that its catch clause remains
constant.
AI assistance disclosure: OpenAI Codex 5.6 Sol assisted with
implementation
[2 lines not shown]