[SandboxVec][LoadStoreVec] Vectorize store chains whose loads have external uses (#245737)
Loads that feed a store chain blocked vectorization whenever they had
more than one use. Now the store chain can be vectorized even if the
loads have external uses. Once the scalar stores are erased, each
original load is rebuilt from the lanes it occupies in the new vector
load, and reinterpreted back to its original type if needed, using
canUnpackLoads() and unpackLoads().
Stacked on top of #245732
Assisted by Cursor
Co-authored-by: Cursor <cursoragent at cursor.com>
[mlir][acc] Read 128-bit values in `acc.atomic.read` with `cmpxchg`
`acc.atomic.read` reads `x` with an `atomicrmw or` of zero on an integer
of the size of `x`. For a `complex<f64>`, that is an `i128`, which
the LLVM dialect verifier does not accept for integer operations of
`atomicrmw` ([LLVMMemoryOps.cpp#L509-L511][verifier]):
```mlir
acc.atomic.read %v = %x : !fir.ref<complex<f64>>, !fir.ref<complex<f64>>, complex<f64>
```
failed with:
```
'llvm.atomicrmw' op expected LLVM IR integer type
```
Read values wider than 64 bits with a `cmpxchg` of zero with zero
instead, and take the loaded value. It only stores zero where the value
[11 lines not shown]
[mlir][acc] Assert that the `acc.atomic.capture` value converts to `v`
Both capture lowerings modify the IR before they convert the captured
value to the type of `v`, so they cannot fail cleanly afterwards. The
conversion only fails for types Fortran cannot assign to each other,
e.g. `real` and `logical`, so assert instead of returning a failure.
Assisted-by: Claude Code
[mlir][acc] Fix `acc.atomic.capture` lowering when `v` and `x` differ in type
The `acc.atomic.read` in an `acc.atomic.capture` allows `v` and `x` of
different types, like a standalone `acc.atomic.read`, and the captured
value is converted to the type of `v`. The LLVM lowering stored the
captured value into `v` without converting it. For example:
```mlir
acc.atomic.capture {
acc.atomic.read %v = %x : !fir.ref<i32>, !fir.ref<f64>, f64
acc.atomic.write %x = %val : !fir.ref<f64>, f64
}
```
stored the `f64` value into the 4 bytes of `v`:
```mlir
llvm.store %old, %v : f64, !llvm.ptr
```
[6 lines not shown]
[MLIR][MemRefToLLVM] Fixing the type conversion of alloca_scope results (#247907)
This PR addresses an issue in the lowering of `memref.alloca_scope` to
the LLVM dialect, where the original result types and return operands
are used to create the continuation block and the `llvm.br` operation,
respectively.
This creates invalid IR when the returned values require type
conversion, as is the case with `index`.
The current fix converts the result types using the LLVM type converter
and retrieves the remapped operands before creating the branch.
Fixes #246572.
py-authlib: updated to 1.9.11
1.9.11
Security
JsonWebSignature.deserialize_json() rejects a JWS JSON Serialization with more than 16 signatures. Set JsonWebSignature.MAX_SIGNATURES to change the limit. Each signature used to hash the whole payload again, so one message could cost seconds of CPU. GHSA-7j7q-pr24-2r3f
A validate hook in a shared claims_options dict, such as the one given to authorize_access_token(), runs for every token. It used to run only for the first token, because the claims classes removed it from the dict. In the OpenID Connect provider, a shared dict returned by get_client_claims no longer carries claims from one ID token to the next. GHSA-j9px-qhmf-w8c3
fetch_token(authorization_response=...) raises MissingCodeException when the callback URL has no code. It used to skip the state check and fetch a token with the client_credentials grant. GHSA-2c3j-qwxw-7hg9
The client registration and configuration endpoints reject a client_uri, logo_uri, tos_uri or policy_uri whose scheme is not http or https, per RFC 7591 §2. A javascript: URL used to be accepted, and could run a script on a consent page that shows these links. Clients registered before keep their values: check them, as an update with the same value is now rejected. GHSA-vg67-6p2g-mfhc
py-fakeredis: updated to 2.41.0
2.41.0
Features
feat(geo): GEOSEARCH/GEOSEARCHSTORE support BYBOX
feat(streams): XREAD/XREADGROUP support MAXCOUNT and MAXSIZE (Redis 8.10)
Bug Fixes
fix: support redis-py 8.2: client creation no longer crashes or emits deprecation warnings, and FakeAsyncRedis sends commands again
fix: EXPIRE/PEXPIRE/EXPIREAT reject expire times that overflow a 64-bit ms timestamp, like Redis
fix(json): JSON.DEL on array index/slice paths no longer deletes extra elements or over-counts
fix(geo): GEOSEARCH/GEOSEARCHSTORE validate their options and return Redis' errors
fix(streams): blocking XREADGROUP returns already-available entries, and with COUNT waits for new ones instead of returning at once
fix(streams): XREADGROUP with COUNT ≤ 0 reads everything, like Redis and Valkey
fix(streams): on Valkey 9.1.4+, XINFO GROUPS reports lag for emptied or over-trimmed streams like Valkey/Redis 7.4
fix(transactions): on Valkey 9.2, EXEC outside MULTI with arguments and invalid IFEQ/IFNE/NX/XX conditions fail like Valkey; valid conditions are not supported yet
LinuxKPI: add SPACEMIT PCI IDs
Those were found in an updated wireless driver.
MFC after: 3 days
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D60632
LinuxKPI: 802.11: point vif->bss_conf.bssid at vif->cfg.ap_addr
In lkpi_sta_scan_to_auth(), vif->bss_conf.bssid was assigned directly to
ni->ni_bssid inside the ephemeral struct ieee80211_node. When
lkpi_sta_auth_to_scan() (or an error path in lkpi_sta_scan_to_auth())
reset vif->cfg.ap_addr and freed ni via ieee80211_free_node(ni),
vif->bss_conf.bssid was left dangling.
Subsequent driver accesses to link_conf->bssid / vif->bss_conf.bssid
while unassociated (for example ether_addr_copy(info.tsf_bssid,
link_conf->bssid) in iwl_mld_handle_scan_complete_notif()) then
dereferenced the freed ieee80211_node, triggering a deterministic 6-byte
UMAUseAfterFree panic under KASAN (and reading freed/reused UMA memory
without KASAN).
Point vif->bss_conf.bssid at vif->cfg.ap_addr in both
lkpi_ic_vap_create() and lkpi_sta_scan_to_auth(). vif->cfg.ap_addr is
embedded in struct ieee80211_vif with the same lifetime, is initialized
to ieee80211broadcastaddr at VAP creation, updated in
[12 lines not shown]
LinuxKPI: adjust return value of __ffs64
ffsll() returns an int; there is no need for __ffs64 to return an
unsigned long; reduce it to an unsigned int which callers may expect.
As the result is undefined for no bits set we do not have to worry about
the -1.
MFC after: 3 days
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D60715
LinuxKPI: 802.11: remove old key from driver on re-key
On a WPA group rekey, the LinuxKPI 802.11 compat layer installs the
new key but never tells the driver to remove the old one.
With hw_crypto enabled, at least iwlwifi keeps one firmware key slot
per installed key and only has 16, so after about 14 rekeys the table
is full. The next key install fails and the card carries on decrypting
with the old group key, so broadcast and multicast traffic stop arriving.
For now remove the key immediately as net80211 tries to install a new
key in the same slot. In theory this should be a deferred operation,
so leave an IMPROVE().
PR: 301069
MFC after: 3 days
[CMake] Fix Windows resource version fields (#243542)
Windows version resources can report 0 instead of strings such as
24.0.0git because CMake interprets the version string as a condition.
Preserve nonempty version strings and explicit overrides, and keep the
fallback for missing or empty values. Set numeric ProductVersion to
match numeric FileVersion instead of leaving it at zero.
AI assisted.
[mlir][reducer] Register dialect extensions in mlir-reduce (#247759)
mlir-reduce registered all dialects but not their extensions, so any
pass that needs an interface provided by a dialect extension failed. For
example running the inliner on IR with 'func' calls:
mlir-reduce input.mlir -opt-reduction-pass="opt-pass=inline test=..."
aborts in asserion builds with:
LLVM ERROR: checking for an interface (`mlir::DialectInlinerInterface`)
that was promised by dialect 'func' but never implemented. This is
generally an indication that the dialect extension implementing the
interface was never registered.
This PR calls `registerAllExtensions()` before creating the
`MLIRContext`, matching mlir-opt and links `MLIRRegistrAllExtensions`.
Size change: mlir-reduce grows from 137.3 MB to 142.3 MB (+3.8%). For
reference, mlir-opt which already registers all extensions is 225.0 MB.
[AMDGPU] Fold NOT into S_AND_SAVEEXEC to form S_ANDN1_SAVEEXEC (#247608)
When the condition of a divergent branch is the negation of a lane mask
that was computed in another block, the NOT cannot be folded into a
compare and we end up with:
s_n = S_NOT s_i
s_o = S_AND_SAVEEXEC s_n
Use S_ANDN1_SAVEEXEC, which sets EXEC to ~s_i & EXEC, instead. This is
available from GFX9.
This also handles the case where s_n and s_i are the same register, as
long as the result of the NOT has no other uses.
Assisted-by: Claude Fable 5.2 <noreply at anthropic.com>
[DAGCombiner] Extend the pass-through in masked load and gather ext folds (#247672)
`visitSIGN_EXTEND_INREG` and `visitAND` fold a `sign_extend_inreg` or an
AND mask of a masked load or masked gather into an extending load or
gather. All four folds passed the old pass-through to the new node.
After type promotion the pass-through lanes have unspecified upper bits,
which the removed `sign_extend_inreg` or AND used to set, so those lanes
reached the result unextended. On AArch64 with SVE this gives wrong
results from plain C at `-O2` (#246968): a pass-through of -31 converted
with `scvtf` gives 4294967265.
This applies the same extension to the pass-through, as
`tryToFoldExtOfMaskedLoad` already does for `sext` and `zext`. When the
masked load is frozen, the pass-through is frozen first, or replaced
with zero if it is undef or poison. An undef, poison or zero
pass-through folds away, so the usual vectorized loops don't change.
`masked_sload_passthru_sitofp`, `masked_zload_passthru_uitofp` and
`masked_gather_passthru_zext` are new tests for three of the folds. The
[7 lines not shown]
[SandboxVec][LoadStoreVec] Vectorize store chains whose loads have external uses
Loads that feed a store chain used to block vectorization whenever they
had more than one use. The store chain can now be vectorized even if the
loads have external uses. Once the scalar stores are erased, each
original load is rebuilt from the lanes it occupies in the new vector
load, and reinterpreted back to its original type if needed.
The legality check, canUnpack(), runs before any IR is created, so a load
whose lanes cannot be reinterpreted (for example, a non-integral pointer)
rejects the whole chain instead of leaving a partially rewritten block.
The unpacking itself is done by unpackIfNeeded() after the scalar stores
have been removed.
Co-authored-by: Cursor <cursoragent at cursor.com>
[lldb] Pass fortran compiler to lldb test suite. (#208298)
Modifies the LLDB test suite infrastructure to support passing a Fortran
compiler to the tests.
Specifically, this patch makes the following changes:
- Adds the --fortran-compiler argument to lldb-dotest, with
auto-detection fallback compilers.
- Adds FC to the build command so tests have access to the designated
Fortran compiler.
- Updates Makefile.rules to handle Fortran test file compilation via
F_SOURCES.
Part of the Add Fortran support to LLDB GSoC 2026 project.
[SPARC] Emit STT_SPARC_REGISTER symbols for .register (#246970)
The assembler ignored .register. GNU as records each application
register that 64-bit code declares as #scratch or with a symbol name
in an STT_REGISTER symbol, so that the linker can catch objects that
use %g2, %g3, %g6 or %g7 in conflicting ways. Do the same.
The symbol is global and undefined, its value is the register number,
and a #scratch register gets a symbol with an empty name. #ignore and
32-bit code emit no symbol. Like GNU as, reject a register declared
again in a different way and a symbol name that is already defined,
and check the .register syntax instead of skipping the line.
The code generator already declares %g2 and %g3 as #scratch in each
function that uses them, so those objects now get the symbols too.
Emit each register's symbol only once.
Keep the declarations in the target streamer, so that they are checked
across inline asm statements and against the declarations the code
[2 lines not shown]