[ProfCheck] Add expand-multi-result.ll to profcheck-xfail.txt (#223614)
From #218634
Added for the same reason as other
`PreISelIntrinsicLowering/AArch64/expand-*` tests. Fixes `profcheck`
failure.
[AMDGPU] Scale the frame register in place when lowering scalar frame indices (#221972)
Lowering a scalar frame index needs a scalar temporary, and under full
SGPR pressure the scavenger emergency-spills instead, which flips EXEC
with `s_not_b64` and clobbers SCC, With SCC live the spill builder gives
up with `error: unhandled SGPR spill to memory`.
Use `FrameReg` itself as the temporary and restore it after the
instruction with `S_MUL_I32`, which unlike `S_LSHL_B32` does not write
SCC, folding a non-zero offset back through an
`S_ADDC_U32`/`S_BITCMP1_B32`/`S_BITSET0_B32` sequence when SCC is still
live.
This is restricted to SALU instructions with a single frame index that
do not otherwise touch `FrameReg`; everything else keeps the existing
path, including the emergency spill.
Assisted-by: Claude Opus 5
[LAA] Allow zero-distance dependences between mixed-width accesses (#221531)
Allow zero-distance dependences between mixed-width accesses to be
classified as `Forward` when they have a common byte stride.
`getDependenceDistanceStrideAndSize` already requires non-zero strides
in the same direction, each a multiple of the corresponding type's
allocation size. A common byte stride is therefore at least as large as
either access. With equal starting addresses, accesses from different
iterations cannot overlap.
Alive2: https://alive2.llvm.org/ce/z/KN6Hke
Fixes #218320
[Docs][TySan] Correct optimisation remarks (#205577)
I think I got my wires crossed here between TySan and other sanitizers
when I was using their docs for reference on how to structure this file.
If a strict aliasing violation was going to cause problems, by the time
higher level optimizations come through and restructure the code, say by
removing a load/store, you no longer have the behaviour TySan would pick
up on.
Remove google-site-verification files from www.freebsd.org
We no longer use Google services for our website.
Approved by: carlavilla
Fixes: 7a3abf9d3e (Remove Google Analytics)
[AMDGPU] Model the cost of the expanded integer to/from floating point casts
No instruction converts to or from a 64 bit integer, and narrow vector
lanes are converted one at a time. Price these expansions by the FP64
rate, sdwa and 16 bit instruction support, and price i33 to i63 like
i64 and bf16 like f32 plus rounding.
Assisted-by: Claude Code Opus 5
[NFC][AMDGPU] Add cost tests for integer to/from floating point casts
Cover i48, i64, i128, bf16, fp128 and narrow vector lanes across FP64
rates, 16 bit instructions, sdwa and both cost kinds.
Assisted-by: Claude Code Opus 5
Convert the zfs.resource services to the typesafe pattern
## Context
`zfs.resource`, `zfs.resource.snapshot` and `zfs.resource.pool` were already half-converted: public methods carried `@api_method(check_annotations=True)` and most in-process consumers already went through `call2`. What was missing was the structural half - the service classes still held the implementation. `resource_crud.py` and `snapshot_crud.py` were 800+ lines each, mixing the create pipeline, destroy validation, path helpers and per-method exception translation in with the API surface.
## Solution
**Lean shims delegating to module functions.** The three services keep only their `Config`, decorators and docstrings, and hand off to plain functions taking a `ServiceContext` - the same shape `truenas`, `catalog` and `update_` already use here. The logic lands in `resource_{query,create,destroy,ops}.py`, `snapshot_ops.py` and `prefetch_ops.py`. `create_rules.py`'s pool-inspecting helpers now take a `ServiceContext` rather than an untyped `service`, and while touching that file it picks up `from __future__ import annotations` so its annotations stop being quoted strings.
**Each service sits in a module named after its namespace** - `resource.py`, `snapshot.py`, `prefetch.py`, `tier.py` - leaving `plugins/zfs/__init__.py` empty. That is deliberate and worth keeping: a lot of modules elsewhere import cheap leaves of this package (`exceptions`, `zvol_utils`, `utils`, `encryption`), and `test/integration/assets/pool.py`, which most of the api2 suite pulls in on the client side, is one of them. Keeping the services out of `__init__.py` holds `from middlewared.plugins.zfs.exceptions import ZFSPathNotFoundException` to a handful of modules and drags in neither `middlewared.service` nor the `truenas_pylibzfs` C extension, which `tests/requirements.txt` does not install.
**`zfs.resource.pool` becomes a sub-service** of `zfs.resource` instead of only being picked up by the plugin loader, which gives it a `self.s` path. That was the last thing forcing untyped string calls into this namespace - `pool.dedup`, the failover event handler and the `pool.post_import` hook all use `call2` now, and no string call to `zfs.resource*` survives outside the over-the-wire tests. `Middleware.create_task` picks up its annotations here because the typed `pool.post_import` handler is the first thing to call it under the strict mypy run.
**Dead code dropped.** `object_count_impl.py` and the `zfs.resource.estimate_object_count` shim lost their last caller when `filesystem_/utils.py` moved to `fstatvfs`.
Two pieces of the 27.0.0 version are deliberately left out because they do not apply to this branch: the rewritten RST docstrings, which belong to the separate public-API docstring pass that has not landed here, and the entitlement gate inventory update - this branch asserts a path-agnostic `MINIMUM_GATES` floor rather than a frozen list of files, so moving the DEDUP gate into `resource_create.py` needs no change there.
[Polly][NFC] Fix loop index in C comments of tests with nested loops (#220589)
The C pseudo-code in tests declares `long i, j`, but the inner loop
reuses `i` instead of `j`, which would overwrite the outer loop counter
and describe a different program than the IR below it.
LICM: Drop -licm-force-thread-model-single in favor of the module flag
Now that the threading model is carried by the "thread-model" IR module flag,
the hidden -licm-force-thread-model-single override is redundant: a test can
select the single-threaded model by setting the module flag directly.
isThreadLocalObject reads only Module::getThreadModel.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
CodeGen: Replace TargetOptions::ThreadModel with module flag
Migrate the threading-model consumers off TargetOptions::ThreadModel and onto
the "thread-model" module flag. The main user was ARM's pass config, which is
moved into AtomicExpand, which now performs the single-thread expansion
directly.
Few tests use the -thread-model flag, so delete it and migrate those cases
to use the module flag.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
LowerAtomic: Preserve the volatile flag when lowering atomicrmw and cmpxchg (#223544)
These utility functions built the replacements without copying the
volatile flag from the original instruction.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
[AArch64] Use firstp for SVE2.2 cttz.elts (#221182)
Preserve zero-is-poison cttz.elts as a distinct AArch64ISD node.
This lets instruction selection choose firstp for SVE2.2 and SME2.2.
Keep brkb/cntp for no-poison uses and for older targets.
Correct handling of DST when converting dates
Timestamps conversion was ignoring Daylight Savings Time (DST) causing
date conversions to be +/-1 hour under some circumstances.
bz4004; from Khush Patel, ok deraadt
[AArch64] Promote unpacked SVE f16/bf16 compressstores 32/64-bit (#222321)
To support compressstore for unpacked 16-bit SVE floats (e.g., nxv2f16),
we need to expand the compressstore before type legalization. If we
expand after type legalization the `VECTOR_COMPRESS` node inserted won't
be promoted to a 32/64-bit element size (which means we'd have to
duplicate some type legalization in the lowering).
sk-usbhid: preserve UV requirement for resident keys
When loading resident credentials, derive SSH_SK_USER_VERIFICATION_REQD
directly from the credential's credProtect policy.
The previous code only preserved the flag when the authenticator did not
report the uv capability. As a result, UV_REQUIRED credentials downloaded
from authenticators with built-in UV were saved with flags 0x21 instead
of 0x25.
Do not make preservation of the credential policy depend on the
authenticator's current UV capability. Keep compatibility with libfido2
versions without fido_cred_prot().
GHPR701 from Savely Krasovsky
sftp: don't crash when glob(3) results lack stat information
Avoid NULL deref crashes when remote glob(3) results lack stat
information. This can happen if the sftp server selectively fails
a stat/lstat operation.
GHPR707 from Nguyễn Anh Bình