[RISCV] Add subtarget feature to disable use of vector avgceil/floor nodes. (#231609)
The cost of the vxrm write makes using these instruction not profitable
on 525.x264_r on current SiFive OoO cores.
[Clang] Avoid assertions for unevaluatable object size kinds (#231793)
Constant-evaluated calls to __builtin_object_size and
__builtin_dynamic_object_size may have a second argument that cannot be
evaluated. The legacy evaluator incorrectly assumed it was a known
constant integer, which could trigger an assertion.
Evaluate the argument through the current evaluator and propagate
evaluation failures instead of calling EvaluateKnownConstInt.
Add regression coverage for division by zero, function calls, runtime
parameters, volatile reads, and null pointer dereferences. The tests
cover both object-size builtins and both constant evaluators.
AI assistance was used to generate additional regression test cases,
which I reviewed and adapted.
Fixes https://github.com/llvm/llvm-project/issues/231108
[2 lines not shown]
[RISCV][P-ext] Use ISD::AVGSUBFLOOR(S/U) for (p)asub(u).
This replaces RISCVISD::ASUB(U) with ISD::AVGSUBFLOOR(S/U).
Co-Authored-By: Claude Sonnet 5.5 <noreply at anthropic.com>
[SelectionDAG] Add AVGSUBFLOORS/AVGSUBFLOORU opcodes
These represent a halving subtract: trunc(shr(sub(ext(X), ext(Y)), 1)),
rounding towards negative infinity. They correspond to AArch64 shsub/uhsub
and RISC-V P extension asub/asubu.
Includes some legalization, known bits, constant folding, and
a DAGCombiner fold from (sr[al] (sub nsw/nuw x, y), 1).
The operation is not legal any target yet. That will be done in
follow ups.
Co-Authored-By: Claude Sonnet 5.5 <noreply at anthropic.com>
[AMDGPU][SwLowerLDS] Rebase flat to LDS addrspacecasts to buffer offsets (#227985)
**Issue:**
In `amdgpu-sw-lower-lds` pass:
- LDS is moved/lowered into an `__asan_malloc_impl` buffer. AS3 pointers
hold offsets into it, and each LDS access is rewritten to `buf +
offset`.
- LDS to flat casts produce `buf + offset`. Casting that back to AS3
kept the full address, so the next access went out of bounds.
**Fix:**
- Collect flat to LDS casts and rewrite them as
`inttoptr(trunc(ptrtoaddr(flat) - ptrtoaddr(buf)))` to get the offset
back. The existing translation handles the users.
- Covers kernels and already-lowered non-kernels.
**Note :**
- Non-kernels that only take a flat pointer are handled in a follow-up
#228043.
Assisted by: claude opus 5.5
graphics/photivo: the port had been slightly improved (+)
- Stretch out CMAKE_MINIMUM_REQUIRED() version range to
accommodate for upcoming CMake 4.x and beyond
- Drop `dos2unix' from USES in favor of PATCH_ARGS+=-l
Address review findings in license apply rework
This commit fixes the issues found while reviewing the license apply rework: KMIP now resolves its push/pull direction through the entitlement check so a daemon blip never pulls keys and the integration tests exercise the real path, the KMIP tests expect escrow references to be kept when the server is unreachable, HA delegate steps are isolated from each other, the remote client cannot be started twice on a first HA license, and the apply/journal replay paths no longer race the upload lock.
An admin's explicit upload on the active node is now authoritative. It is propagated through a private endpoint which skips the stale/test license refusals on the standby and a marker keeps the reconnect push from reverting it until the peer has accepted it. TNC and reconnect deliveries keep those refusals.
[compiler-rt] Remove dlsym interceptor and support `-shared-libsan` for CSan
Summary:
Follow the UBSan offload runtime. Offload now resolves HSA through the
global scope, so the `dlsym` interceptor is no longer needed. The real
HSA entry points are still taken from the loaded HSA library rather than
`RTLD_NEXT`, since every DSO with a static runtime exports the same
wrappers and they would otherwise chain back into each other.
Build `libclang_rt.csan.so` with the offload objects folded in. The
exported HSA wrappers report failure when HSA is absent and warn when HSA
was loaded ahead of the runtime. The preinit hook moves to a separate
`csan_offload-preinit` archive for executables.
[compiler-rt] Add 'csan' library for the concurrency sanitizer
Summary:
Adds the runtime for the concurrency sanitizer, both CPU and GPU.
Fundamentally, this works using the following pseudocode:
```c
static u64 watchpoints[N]; // Hash-indexed, zero is empty.
// Emitted before the access, so we never trip on our own write.
void check_access(volatile void *addr, u32 size, u32 type) {
// Every access probes. A read conflicts only with a watched write, a
// write conflicts with either.
if (u64 *wp = find_watchpoint(addr, size, type))
consume(wp, this_pc()); // Hand our location to the owner.
if (!should_sample()) // Wave-uniform, 1-in-N chance.
return;
[17 lines not shown]
[Clang] Support `-shared-libsan` for offload CSan
Summary:
Follow the UBSan handling. The shared runtime embeds the HSA
interceptors, so `csan_offload` is only linked with static runtimes and
executables pull in `csan_offload-preinit` to initialize early.
[Clang] Add support for the `-fsanitize=concurrency` runtime
Summary:
Add the frontend sanitizer kind, function attributes, pass pipeline
integration, predefined macro, driver handling, and documentation for
ConcurrencySanitizer.
security/vuxml: add FreeBSD SAs issued on 2026-10-14
FreeBSD-SA-26:70.tcp affects 15.1R
FreeBSD-SA-26:71.sound affects all supported releases
FreeBSD-SA-26:72.bhyve affects all supported releases
[ClangIR] Support bool-returning await_suspend (#227527)
Support bool-returning `await_suspend` in ClangIR:
- Add an optional boolean condition operand to `cir.coro.suspend_point`
to signal whether suspension takes effect or is vetoed.
- In CIRGen, evaluate the `await_suspend` expression as boolean when
`SuspendReturnType::SuspendBool` and pass the condition to
`cir.coro.suspend_point`.
- Update control flow and successor regions for `cir.await` accordingly.
- Add MLIR and CodeGen test coverage.
Closes #227404