[MLIR] Fix regression in linking to `MLIRAnalysisBase` via dylib (#236359)
Fix the regression introduced in #232793 where the `MLIRTestIR` library
ends up linking directly to `MLIRAnalysisBase` rather than to `MLIR`
dylib, and therefore duplicate it and all the static libraries it
depends on the linker command line.
Signed-off-by: Michał Górny <mgorny at gentoo.org>
[AArch64][ISel] Fix crash for partial reduction actions (#236179)
getPartialReduceMLAAction assumed that the provided VTs would always be
simple, and crashed if not. So we should just bail out in such cases
(e.g. invalid non-power-of-two element types) by defaulting to Expand.
NAS-144867 / 28.0.0-BETA.1 / Fix `set_password` corrupting password history (by themylogin) (#20078)
`user.set_password` joined the hashes with `', '` while every reader
splits on whitespace. Each hash but the last kept a trailing comma and
no longer matched the password that produced it. Commas never appear in
a crypt hash, so dropping them recovers the original hash.
Original PR: https://github.com/truenas/middleware/pull/20047
---------
Co-authored-by: themylogin <themylogin at gmail.com>
[AArch64] Allow selecting shifted register from and with UBFX. (#233882)
For LSL/LSR, it required a mask or field extending to MSB, but UBFX can
extract smaller fields.
NAS-144937 / 28.0.0-BETA.1 / Fix flaky UPS alerts (#20076)
* Receiving any message that was not in `alert_mapping` (i.e. `NOCOMM`,
`FSD` and `SHUTDOWN`) removed all alerts with some probability
* Alert creation raced with deletion (this commit introduces long
overdue `oneshot_replace`)
* Fix test utils. The dummy driver only notices whole-second mtime
changes, so sometimes fake data was not published at all.
(cherry picked from commit c8ef9e0fe83b285e9b528e46a3cf8e7b281dab2a)
[libc++] Make __thread_hardware_concurrency() an alias to an existing symbol (#234575)
This PR changes `__thread_hardware_concurrency()` to be an alias to
`std::thread::hardware_concurrency()`, which is already exported from
the ABI.
Also adds the `_LIBCPP_ABI_NAMESPACE_LEN` macro to simplify the name
mangling.
[CVP] Restructure pass to use `CVPImpl` implementation class, unify style (NFC) (#236038)
CorrelatedValuePropagation instruction-processing routines and helpers
have been abstracted out into a dedicated implementation class, so as to
avoid threading LVI, among other things. Minor opportunity to modernize
code and unify style where possible.
[mlir] Read the attr dictionary directly in getDialectAttrs (#236339)
getAttrs also copies attrs from properties on every call, but dialect
attrs are never stored there
LLVM IR translation calls getDialectAttrs() on every op, skipping the
dictionary rebuild for ops with properties makes translation faster,
visible on large modules
[lldb][test] Disable TestAttachWaitConnected.py on Linux (#236357)
It has been flaky on the AArch64 Linux buildbot and I do not think the
reason will be related to the architecture.
See #236354.
[SPARC] Enable +ua2007 for -Av8plusd/-Av9d (#234060)
FMA instructions are modeled under ua2007, but the mappings for
-Av8plusd/-Av9d omitted it, so `fmadds` failed to assemble with
"instruction requires a CPU feature not currently enabled". Add +ua2007
to match GNU as.
Fix #225925.
[SCEV][NFC] Factor getMonotonicPredicate out of getLoopInvariantPredicate
Move the code that finds a monotonic predicate into a private utility.
For a compare of an AddRec against an invariant, it returns the
predicate with the AddRec on the left, and whether the predicate
turns to false or to true as the loop runs.
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
[SCEV] Prove monotonic predicates from loop entry
SCEV's isKnownOnEveryIteration proves a predicate on every iteration
of a loop by proving it on loop entry and on the backedge. The
backedge part often fails, e.g. when the loop exit only bounds the IV
from above.
Now, if the predicate compares a recurrence of the loop with a
loop-invariant value and can only change from false to true as the
loop runs, prove it from loop entry alone.
In iv-widen-elim-ext.ll, the comment on @foo3 said its zext must stay.
The zext is now removed: the add it extends is non-negative on every
iteration.
One exit truncation loses nuw: the exit test is now on the wide IV,
so IndVars rewrites it with a new truncation that has no nuw. It is
marked with TODO.
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
[SCEV][NFC] Factor isKnownOnEveryIteration out of isKnownViaInduction
Move the check that proves a predicate on loop entry and on the backedge
from isKnownViaInduction into a private utility isKnownOnEveryIteration.
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
[LoopVectorize][NFC] Add tests for runtime checks with a widened IV index
In
if (start <u len && start - 32 <u len)
for (int32_t i = start; i < n; i++) a[i] = a[i - 32];
the distance between a[i] and a[i - 32] is always 32, but
if the vectorizer receives this loop with a widened IV to i64,
the vectorization is applied, but a runtime alias check is inserted
because widened loop may contain trunc/zext through which the
vectorizer cannot infer constant access distance.
If the loop IV is not widened, no runtime check is inserted.
Add tests for both forms.
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
[IndVarSimplify][NFC] Add tests for IV facts known on entry
If an IV start is non-negative and the IV increments with nsw, it is
non-negative on every iteration.
SCEV can't prove this, so, for example, IndVars can't compute
i - 32 in i64 in
if (start >= 32)
for (int32_t i = start; i < n; i++)
use(zext(i - 32));
Add tests for it.
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
[IndVarSimplify][NFC] Add tests for samesign compares of an IV
Add tests for folding a samesign compare of an IV with a loop-invariant
value, when the compared operands may have different signs on loop entry,
and so they can be poison.
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
[IndVarSimplify][NFC] Add a negative test for zext elimination
Add a test for a zext of an nsw add of a sign-extended IV, where the
add may be negative, so the zext must stay.
Also remove stale comment in a test.
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
NAS-144937 / 28.0.0-BETA.1 / Fix flaky UPS alerts (#20076)
* Receiving any message that was not in `alert_mapping` (i.e. `NOCOMM`,
`FSD` and `SHUTDOWN`) removed all alerts with some probability
* Alert creation raced with deletion (this commit introduces long
overdue `oneshot_replace`)
* Fix test utils. The dummy driver only notices whole-second mtime
changes, so sometimes fake data was not published at all.