[AArch64] Lower bitcast of wide <N x i1> masks without a stack spill in more cases (#203420)
vectorToScalarBitmask() lowers `bitcast <N x i1> to iN` to a
register-only movemask, but bailed when the mask's source vector type
`<N x ty>` is wider than 128 bits, leaving the bitcast to legalize
through a stack temporary.
The bail is unnecessary: the bitmask depends only on the lane count and
order, never on the per-lane width. Narrow the per-lane integer width to
128/NumElts bits so the mask fits one 128-bit register and the existing
register-only lowering applies.
Fixes #203414
Co-Authored-By: claude-code
---------
Co-authored-by: Claude Fable 5 <noreply at anthropic.com>
[CIR] Add global offset attribute (#220128)
Previously, if we attempted to compile code that used an offset from a
global variable that created a pointer to outside the global or to a
location that wasn't the exact start of an element of a global
structure, CIR codegen would either assert or hit an unreachable
statement. However, there are legal cases where such an offset can be
used.
This change introduces a new attribute, GlobalOffsetAttr, that provides
a way to describe a raw byte offset from a pointer and uses that
attribute to handle cases where we are unable to compute indices for a
global view attribute.
Assisted-by: Cursor / various models
Fix metadirective reachable path boundaries
Stop construct trait paths at the innermost target and retain the implicit
nothing fallback during unsupported-selector recovery.
Add coverage for actual and selected target boundaries and for nested
metadirectives reached through implicit fallback.
[AMDGPU] PromoteAlloca: split scalar accesses that span several elements (#217056)
promoteAllocaToVector already splits a *vector* access across several
elements when it is a multiple of the element size, but a *scalar*
access
had to be bitcastable to the element type, so an i64 load from an alloca
promoted to <8 x i32> was rejected as "not a supported access type" and
the object stayed in scratch.
Accept a scalar access that is a whole multiple of the element size and
route it through the existing subvector path, which already builds the
value from consecutive elements and bitcasts. Accesses with padding are
still rejected, since splitting those would put the pieces at the wrong
offsets, as are non-integer non-float types.
[CIR] Forward a byref argument loaded from a byref parameter
When a callee argument comes out of the calling function's own byref parameter,
that pointer already names the object its caller will destroy, so pass it along
as-is.
Assisted-by: Cursor / claude-opus-5
[LowerTypeTests] Support assembly summaries and migrate export tests (#220776)
Update `LowerTypeTestsModule::runForTesting` to read module summaries
using `parseSummaryIndexAssembly` with automatic fallback to YAML.
We need summaries with call graph edges and edge hotness metadata for
upcoming tests (e.g. for jump table layout optimizations). Instead of
extending the custom YAML format, we should use the documented LLVM
assembly format for module summaries (introduced in 08d5b4ef0d08 and
63ee0e73e44e, and documented in LangRef). The text IR summary
representation (`^... = gv: (...)`) natively supports call edges,
hotness types, and function summary attributes.
Migrate all tests that used `-lowertypetests-summary-action=export` with
YAML summary inputs in `Inputs/` to self-contained tests using
`split-file` and text IR summaries. This eliminates the legacy YAML
files
and simplifies the summary representation using omitted default flags
and
[12 lines not shown]
ZTS: cover change-key on a dataset whose key does not match its root
An incremental raw receive onto a dataset that was rewrapped locally
with 'zfs change-key -i' leaves it pointing at the local encryption root
while carrying the sending root's key material. Until the previous
commit, running 'zfs change-key' on such a dataset, or on its encryption
root, panicked in syncing context.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Michael Heller <75820586+mkhllr at users.noreply.github.com>
Closes #17425
Closes #18969
dsl_crypt: validate every key change-key will rewrap
spa_keystore_change_key_sync_impl() recurses through a dataset and its
children and VERIFY0()s spa_keystore_dsl_key_hold_dd() on each one,
while spa_keystore_change_key_check() only checks that the wrapping key
of the target's encryption root is loaded. A dataset whose DSL Crypto
Key can no longer be unwrapped with that wrapping key therefore turns a
'zfs change-key' into a panic in syncing context, which leaves txg_sync
blocked and the pool unusable until the machine is rebooted:
PANIC at dsl_crypt.c:1475:spa_keystore_change_key_sync_impl()
Walk the same dsl dirs in the check function and hold every DSL Crypto
Key the sync function will rewrap, so an unusable key is reported to
the caller as EACCES instead.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Michael Heller <75820586+mkhllr at users.noreply.github.com>
Closes #17425
Closes #18969
[clang-tidy] Add modernize-use-to-underlying check (#210459)
Add a new clang-tidy check to flag casts from a scoped enumeration to an integer
type and replaces them with a call to std::to_underlying (C++23).
Addresses #71543