[RISCV][GISel] Add GlobalISel equivalent of the SplatPat_simm5 complex pattern (#248144)
Add a GIComplexPatternEquiv for SplatPat_simm5 and implement
selectVSplatSimm5 in the GlobalISel instruction selector, mirroring
RISCVDAGToDAGISel::selectVSplatSimm5. The importer can now use the
patterns that need it, so vector operations with a constant splat
operand that fits in a 5-bit signed immediate select to the .vi forms,
for example vadd.vi instead of vmv.v.i + vadd.vv.
Part of #246831
[clangd] Avoid C++ name qualification in C (#242500)
Fixes https://github.com/clangd/clangd/issues/2691
The
[PopulateSwitch](https://searchfox.org/llvm/rev/1d3ecdca6144f75ba30ee2a07fabead1ae486772/clang-tools-extra/clangd/refactor/tweaks/PopulateSwitch.cpp#202)
tweak currently generates C++ style labels for anonymous enums inside
structs in C.
`getQualification()` is a shared clangd AST utility that finds the scope
prefix needed when spelling a name at a destination location. Populate
Switch uses the returned prefix when spelling enum constant names in
generated switch case labels.
The fix returns an empty qualification in non-C++ language modes. This
prevents C++ qualifiers in C and Objective-C while preserving
qualification in C++ and Objective-C++.
Tests:
[6 lines not shown]
stand: Support jumping to UEFI setup
Add support to reboot to UEFI setup. This basically add indication to
OsIndications then reboot. OsIndicationsSupported is checked before
making any decision.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D61996
[Xtensa] Fix decoding of immediate offsets for ESP32-S3 instructions (#235094)
Several ESP32-S3 offset decoders restored the operand scaling
incorrectly and did not sign-extend.
1. They only shifted `Imm` when its low bits were non-zero. The decoder
always receives the scaled-down field, so encoded values with zero low
bits (e.g. 16) were returned unscaled.
2. The result never sign-extended, so negative offsets decoded as
positive numbers (or triggered range assertion failures when enabled).
- Always restore the scale, and sign-extend signed operands at the
appropriate bit width.
- Tighten assertions to match the encoded widths.
- Add an llvm-objdump round-trip test covering the boundary values of
each operand.
Co-authored-by: Andrei Safronov <safronov at espressif.com>
libcbor: updated to 0.15.1
0.15.1 (2026-12-02)
- [Fix `cbor_encode_half` rounding of values too small for half precision](https://github.com/PJK/libcbor/pull/477) (by [sage-mode-hunter](https://github.com/sage-mode-hunter))
- Subnormal singles now encode as signed zero instead of unrelated non-zero values, and values in [2^-25, 2^-24) round to 2^-24 instead of zero
- [Fix use-after-free in `cbor_array_replace`, `cbor_array_set`, and `cbor_tag_set_item` when the new value is, or is owned by, the item being replaced](https://github.com/PJK/libcbor/pull/479) (reported by [mzfr](https://github.com/mzfr))
- [Fix NULL dereference in `cbor_copy`, `cbor_copy_definite`, and `cbor_describe` when a tag has no item set](https://github.com/PJK/libcbor/pull/480)
- [Fix `cbor_string_codepoint_count` returning 0 for valid indefinite strings](https://github.com/PJK/libcbor/pull/482)
- It now returns the sum of the chunks' codepoint counts, or 0 if any chunk is not valid UTF-8
- [Assert in Debug builds that `cbor_string_length`, `cbor_string_handle`, `cbor_bytestring_length`, and `cbor_bytestring_handle` are given definite items, as documented](https://github.com/PJK/libcbor/pull/482)
openvpn: updated to 2.7.10
2.7.10
Security fixes
- avoid crash bug on sufficiently-malformed incoming UDP packets
(CVE-2026-142094). Those could be sent from hosts on the same
link as an OpenVPN server, or by authenticated TAP VPN clients
through the tunnel.
- avoid CPU starvation bug in TLS handshake on mbedTLS builds when
receiving oversized certificiates (CVE-2026-135412).
- harden DNS config mechanism (`--dns-updown` + runner) on Non-Windows-
Platforms mechanisms against abuse (CVE-2026-142125)
[analyzer] Put PostVisit after EagerlyAssume (#239123)
In general, `PostVisit` is the last thing we do with a statement;
`EagerlyAssume` has no good reason to run after it.
After this `PostStmt<UnaryOperator>` and `PostStmt<BinaryOperator>`
callbacks will be able to see the effects of `EagerlyAssume`, which
should be more useful than the status quo.
There were only three checkers with `PostStmt` callbacks for unary or
binary operators:
- `ArrayBoundChecker.cpp` is unaffected, its `UnaryOperator` callback
only cares for `UO_Deref` and ignores `UO_LNot`.
- In `IteratorModeling.cpp` the `UnaryOperator` callback is unaffected
(only cares for increment and decrement), and the `BinaryOperator`
callback is perturbed, but it is prepared to see either concrete or
symbolic results from the equality checks, so should be fine.
- In `UndefResultChecker` the `BinaryOperator` callback is uanffected
because it only cares for operator expressions with Undefined result,
[15 lines not shown]
[clang][bytecode] Only implicitly destroy locals for EvalEmitter (#248064)
For bytecode, we want to avoid the double destroy ops. We need to call
`destroyLocals()` so we can use the return value. When evaluating
directly, we need to destroy locals in the destructor too so we don't
leak memory when a one of our visit functions returns an error early.
[MLIR][XeGPU] Fix shape_cast layout inference when a split dim is followed by others (#245127)
For a shape_cast that splits source dims, inferShapeCastSourceLayout
collapsed the result dim groups from first to last. Collapsing a group
shifts the dim indices of the groups after it. For 32x64 -> 8x4x64, the
groups are [[0, 1], [2]]. After [0, 1] is collapsed, [2] is out of
bounds and collapseDims crashes.
The PR fix it by collapsing the groups from the last one, so earlier
groups keep their indices.
assisted-by-claude
.
---------
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
Define synchronization scope and clamp scopes to execution scope
- Add a Synchronization Scope section defining syncscope and syncscope instance.
- Clamp syncscope and A/V scope to execution scope when specified smaller.
- Clarify default A/V scope for synchronizing vs. other A/V operations.
- Simplify the Inclusive Scopes wording to refer to any two operations.
Assisted-by: AI
[lld-macho] Pad markLive worklist shards and move stack on idle
Avoid false cache-line sharing on Worklist's 16-byte header across
threads by aligning each nextLevel/level shard to 128 bytes. In drain(),
move the worker's stack directly into its empty nextLevel shard and
return once anyWorkerIdle is observed. Also drop an outdated sentence in
drain()'s comment.
[asan] Find the block of a large chunk without scanning all large chunks (#243675)
When a large chunk leaves the quarantine, `GetBlockBegin()` scans all
large blocks under a lock, so programs that hold thousands of them slow
down. These blocks are page aligned. Look for a `LargeChunkHeader` at
the start of the chunk header's page first, and scan only if it doesn't
point back at the chunk.
x86_64 Linux CPU time: about -30% for a `malloc(132K)`/`free` loop with
10,000 blocks live, -3.5% for a synthetic numpy script with 20,000
arrays. No change on llvm-test-suite or ASan clang.
`GetBlockBegin()`'s two header CHECKs are repeated in `Deallocate()`,
for all sanitizers. A `free()` with a forged `LargeChunkHeader` now
crashes instead of returning silently.
Assisted-by: Claude. I have reviewed every line of this PR.
CloneFunction: Check invokes for memprof metadata when pruning
The pruning cloner reports whether the cloned code contains !memprof
or !callsite metadata, but only looked at non-terminator calls. The
inliner uses this to decide whether to strip the metadata from the
copied calls if the original call site has no !callsite metadata.
As a result, the metadata was not stripped from an inlined invoke
unless the callee also had a call with the metadata.
Assisted-by: Claude
[Hexagon] Add relocation application helpers and use them in RuntimeDyld (#244507)
Add target-side helpers for applying ELF relocations to Hexagon
instruction encodings. Hexagon instruction operands may occupy
non-contiguous bit fields, so the helpers use the scalar
instruction-encoding table and the Hexagon ABI relocation descriptions
to scatter relocated values into the correct bits.
Expose a C-linkage API in llvm/Target/Hexagon/HexagonRelocation.h so
that RuntimeDyld and other Hexagon toolchain components do not depend on
private declarations:
* LLVMHexagonApplyRelocation: apply a relocation to an instruction.
* LLVMHexagonGetRelocationInfo: query the ABI properties of a relocation
(effective bits, bit mask, alignment, shift, signedness and whether
range and alignment are verified) through the LLVMHexagonRelocInfo
struct.
* LLVMHexagonVerifyRange, LLVMHexagonVerifyAlignment and
LLVMHexagonIsTruncated: relocation validation checks for diagnostics.
[34 lines not shown]
AddressSanitizer: Declare runtime functions with RuntimeLibcallsInfo
Declare the asan runtime functions with RuntimeLibcallsInfo, so they
get the signatures and attributes from the libcall definitions. The
ELF globals registration functions are only declared for ELF targets,
which are the only users.
It is now an error to run the pass for a target that does not provide
the asan runtime. Tests with no triple, or a triple without an OS, now
use a Linux triple.
The experiment report functions are only used by a hidden testing
option, so keep declaring them by name and drop their RuntimeLibcalls
entries.
The kind of hacky part of this is the pass is now reasoning directly
in terms of LibcallImpl, instead of looking up the LibcallImpl from
the Libcall. This is because at the moment non-codegen passes don't
have a simple way of using LibcallLoweringInfo. There arguably should
[4 lines not shown]
[orc-rt] Install headers via a CMake file set. (#248335)
The public headers were installed via the PUBLIC_HEADER property, which
flattened the directory structure and dropped files with duplicate names
in different directories.
Switch orc-rt-headers to a HEADERS file set so that the directory
structure is preserved.
Assisted-by: claude
[mlir][XeGPU] Do not widen leading-dim inst_data for multi_reduction (#245106)
#240592 made layout propagation keep a reused slice parent's larger
inst_data on every non-reduced dim of a vector.multi_reduction source.
When that dim comes before the last two, blocking produces tiles such as
2x8x16. Lane-level distribution of multi_reduction only supports sources
whose leading dims are unit, so the blocked op then fails to legalize.
This PR keeps the parent's inst_data only on the last two dims. Leading
dims keep inst_data[i] = lane_layout[i] * lane_data[i], so they stay
unit.
assisted-by-claude
---------
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[-Wunsafe-buffer-usage] Allow safe `memset(&x, val, sizeof(T))` calls (#247816)
`-Wunsafe-buffer-usage` currently treats `memset(&x, val, sizeof(x))` as
safe (via `isUnsafeMemset`), but warns on `memset(&x, val, sizeof(T))`
even when `x` has type T. This causes the checker to flag glibc's
`CPU_ZERO(&cpuset)` macro (which expands to `__builtin_memset(&cpuset,
'\0', sizeof(cpu_set_t))`)as unsafe.
This patch updates `isUnsafeMemset` to also consider `memset(&x, val,
sizeof(T))` safe when `x` is a `DeclRefExpr` whose type matches `T`.
---
*Disclosure: AI assistance was used in the development and
implementation of this change.*