[AMDGPU][GlobalISel] Remove dependency on legal ruleset (#197371)
This fills in always legal rules, to remove the dependency on the legacy
ruleset. This is not guaranteed to be all the rules, just the ones that
appear in tests.
[llvm] Re-format aarch64-apple-tuning-features.td. NFC (#197777)
It's much easier to review diffs with each feature on its own line. Also
add an -implicit-check-not so we don't miss any CPUs going forward.
[SPIRV] Allow casting between CodeSectionINTEL and Generic storage classes (#197556)
In the previous versions of the SPV_INTEL_function_pointers
[spec](https://github.com/intel/llvm/blob/sycl/sycl/doc/design/spirv-extensions/SPV_INTEL_function_pointers.asciidoc),
casts between the CodeSectionINTEL storage class (used for function
pointers) and the Generic storage class were illegal.
The spec was updated a few months ago, and the new version allows the
cast, specifying `CodeSectionIntel` as one of the overloaded storage
classes that can be represented by Generic, alongside `WorkGroup`, etc.
I also confirmed with a spec author that one of the intentions of the
spec updates was to allow the cast.
Update the SPIR-V backend to allow the cast. This is basically required
to use function pointers in real world use cases.
---------
Signed-off-by: Nick Sarnie <nick.sarnie at intel.com>
[libc][NFC] Fix #endif comments in hdr/ proxy headers (#198313)
The #endif closing the LIBC_FULL_BUILD guard used the CMake variable
name LLVM_LIBC_FULL_BUILD in its comment rather than the preprocessor
macro LIBC_FULL_BUILD that the #ifdef above references. These are
distinct: LLVM_LIBC_FULL_BUILD is the CMake option; LIBC_FULL_BUILD is
the C macro defined via -DLIBC_FULL_BUILD when that option is ON.
Fixed 113 files under libc/hdr/ with a mechanical substitution.
Assisted-by: Automated tooling, human reviewed.
freebsd-update: Skip /etc/ssl/cert.pem
We already run `certctl rehash` at the end, there is no point in asking
users upgrading from 15.0 to 15.1 to manually merge the trust store.
MFC after: 3 days
Reviewed by: cperciva
Differential Revision: https://reviews.freebsd.org/D57028
[SLP] Preserve profitable trees when subtree trimming would reduce to buildvector-only
In calculateTreeCostAndTrimNonProfitable, the subtree trim loop returns
Invalid when trimming node Idx==1 under an InsertElement root would
leave only a buildvector, to avoid infinite vectorization attempts.
This is too aggressive when the original untrimmed tree is already
profitable (Cost < -SLPCostThreshold). In that case, undo any partial
trims and return the original cost instead of rejecting the tree.
Original Pull Request: https://github.com/llvm/llvm-project/pull/197763
Recommit after unrelated revert in https://github.com/llvm/llvm-project/pull/198265
Reviewers:
Pull Request: https://github.com/llvm/llvm-project/pull/198336
zap: split objset+object implementations to use a dnode
For the functions that don't (yet) have _by_dnode() variants, give them
the same treatment as the previous commit - pull their implementation
into a _by_dnode() function, with the original as a simple wrapper.
This lets them all follow the same uniform pattern, and lays the
groundwork for further cleanup in other non-dnode parts of the ZAP
subsystem.
Note that it would be trivial to expose these new _by_dnode() functions,
but there's no need to do that until there's an external need for them.
Also note that there's no change yet to the following, which are not
simple zap_t operations in the same way:
- zap_contains: wrapper around other ops
- zap_increment: wrapper around other opts
- zap_*_int(): wrappers around other ops
[8 lines not shown]
zap: make the _by_dnode() op variants be the primary implementation
The existing pattern for each operation is to have a "frontend" function
that takes an object referenced by either a objset+object pair (eg
zap_add()) or an existing dnode (eg zap_add_by_dnode()). Those functions
obtain a locked zap_t for the given object from either zap_lockdir() or
zap_lockdir_by_dnode(). That zap_t, the operation args, and the refcount
tag for lockdir() are then passed through to through to the "backend"
function (eg zap_add()), which does the work and then releases calls
zap_unlockdir() to release the zap_t.
This pattern is overcomplicated, in at least three ways:
- Both frontends for each operation have to make the call to
zap_lockdir(), which has multiple args that must be the same for both.
- Frontends need to pass the refcount tag to the backend so it can
call zap_unlockdir() correctly, which makes the signature more
complicated.
[28 lines not shown]
[CI] Run libc tests on clang changes (#198295)
The libc tests are relatively lightweight, and given we build libc with
a just built clang, it's very easy for clang changes to cause issues in
libc, especially with -Werror. For example, #187860 broke libc due to
adding a new warning that libc was not clean on.
Fix failfast default and usage
The feature that added a failfast property to vdevs unfortunately did
not correctly set the default at creation time, so many vdevs do not
actually have the property set. In addition, when the property is
used, the failfast flag is not checked correctly, resulting in the
feature mostly not working as intended.
Set the failfast property to the default value at vdev allocation time.
The value will be read in from the ZAP as normal when the vdev metadata
is loaded. Allow the property to be set on any vdev and have it be
inherited from the root or top-level vdev.
Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Reviewed-by: Alexander Motin <alexander.motin at TrueNAS.com>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Tony Hutter <hutter2 at llnl.gov>
Signed-off-by: Paul Dagnelie <paul.dagnelie at klarasystems.com>
Closes #18410
18108 libtopo reports the wrong errno on enumeration failure
Reviewed by: Robert Mustacchi <rm at fingolfin.org>
Reviewed by: Toomas Soome <tsoome at me.com>
Approved by: Dan McDonald <danmcd at edgecast.io>
18106 Update AMD microcode to 20251202
Reviewed by: Bill Sommerfeld <sommerfeld at hamachi.org>
Reviewed by: Toomas Soome <tsoome at me.com>
Approved by: Dan McDonald <danmcd at edgecast.io>
[SLP] Prefer VF-matching scalar-set match in gather-shuffle lookup
In isGatherShuffledSingleRegisterEntry, the perfect-match search accepted
an entry that isSame(TE->Scalars) regardless of the entry's vector factor.
isSame can succeed via ReuseShuffleIndices on an entry whose actual VF is
smaller than TE->Scalars.size(); the subsequent mask construction then
copies TE->getCommonMask() indices that overrun the chosen source's lanes,
producing wrong shufflevector masks and a more-poisonous result than the
scalar code.
Fixes #197765
Reviewers:
Pull Request: https://github.com/llvm/llvm-project/pull/198334
[LLVM] Precise error message for intrinsic signature verification (1/n) (#196802)
Generate more precise error message when intrinsic signature
verification fails. Keep track of the current position/component of the
intrinsic signature being checked and print a more descriptive error
message which includes the position/element of the signature that failed
and the reason it failed.
Note that not all cases in `matchIntrinsicType` generate errors, so have
a temporary fallback to keep generating a generic error message in those
cases. This fallback will be eventually removed.
Added a C++ unit test for testing intrinsic struct return type that is
either an identified struct or a packed struct, as these cases cannot be
created from a .ll file directly (since autoupgrade in the parser fixes
them up).
[SelectionDAG] Fix miscompile in known-0/1 setcc fold with XOR (#196804) (#197767)
When simplifySetCC folds `(xor X, C) != 0` (where the XOR result is
known 0/1) into `TRUNCATE(XOR X, C)`, later DAG combines can incorrectly
fold the XOR back into its source operand, losing the NOT semantics.
This causes the x86 backend to test the original value instead of the
XOR result, inverting the condition and producing wrong code.
Fix by folding `(xor X, C) ==/!= N1` directly into `setcc(X, N1^C,
cond)` instead of returning TRUNCATE(XOR). The SETCC form is canonical
and immune to the problematic DAG combine.
Fixes #196804.
Revert "[lldb] Make CommandObject::GetTarget filter out the dummy target (#198026)" (#198325)
This reverts commit d90baa054dfc7d9f53148e4739effbf9fd7ac27a.
Fails in CI in `TestMultipleBinaryCorefile.py` when running `image list
-g` in `test_corefile_binaries_dsymforuuid` because `TargetModulesList`
currently asserts we have a target even with the `-g` flag set.
Original PR https://github.com/llvm/llvm-project/pull/198026
NAS-141011 / 27.0.0-BETA.1 / webshell: replace sudo gating with per-shell-type RBAC + audit (#18950)
The shell websocket handler used to wrap VM/APP/CONTAINER commands in
`sudo -H -u <user>` for users without ALL-sudo, then run unwrapped
otherwise. In practice the wrapped form failed at root-owned libvirt/
docker sockets, so authorization was effectively "do you have
unrestricted sudo?" — coarse, surprising, and not auditable. The reason
why we did this historically was because the shell feature here was
added before we actually had RBAC.
Replace it with an explicit role gate keyed on the requested shell type:
HOST -> web_shell privilege only (unchanged) -- login as user
VM -> web_shell + VM_WRITE
CONTAINER -> web_shell + CONTAINER_WRITE
APP -> web_shell + APPS_WRITE
`auth.get_token_for_shell_application` now takes the shell_type and
returns structured errors (WEB_SHELL_DENIED, MISSING_ROLE) along with
[10 lines not shown]
NAS-141004 / 27.0.0-BETA.1 / add zpool.query events (by yocalebo) (#18964)
UX team is switching to `zpool.query` in 26-RC.1 for a new feature and
they need events for this endpoint. This adds said events based on a
discussion with them and understanding the specific fields they need.
This sends the events along-side the other `pool.query` events to keep
it simple.
Original PR: https://github.com/truenas/middleware/pull/18962
---------
Co-authored-by: Caleb St. John <30729806+yocalebo at users.noreply.github.com>
Co-authored-by: Logan Cary <logan.cary at ixsystems.com>