RuntimeLibcalls: Add missing attributes to libm libcalls
Add the function and memory attributes inferLibFuncAttributes would
give the scalar libm functions.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
RuntimeLibcalls: Add missing attributes to memory and allocator libcalls
Add the attributes inferLibFuncAttributes would give these functions.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
ZTS: refreserv_004_pos fails: its space limits are off
The test sets a dataset's refreservation to the dataset's available
space and expects any larger value to fail. But a refreservation also
covers the space the dataset already uses, so it can grow to available +
used; setting available + 1 succeeds. The test is listed as a known
failure on every platform.
It also writes a file into the refreservation while the parent is at its
quota. That write can fail with EDQUOT however small it is: a
transaction's worst-case space estimate is far larger than the data, and
the part that exceeds the unused refreservation is charged to the
parent. The write only goes through while the parent is a few KiB short
of its quota, which for the pool's root dataset ends as soon as the MOS
grows.
Check that available + used + 1 MiB fails. The margin is needed because
the kernel checks against the on-disk available space, which differs
from the avail property by the writes in flight. Drop both writes; the
[9 lines not shown]
Linux: log size changes and punches before dropping the range lock
zfs_freesp() makes the change under a range lock in zfs_trunc(),
zfs_extend() or zfs_free_range(), drops the lock, and only then
assigns TX_TRUNCATE in a second transaction. zfs_setattr() calls it
with log=FALSE and logs the new size later still, in TX_SETATTR.
zpl_iter_write() takes no inode lock, so a write can run in between.
Its TX_WRITE is assigned first, and replay applies the write before
the size change or the punch: a write fsync'ed after ftruncate()
returned is cut off at the new size, and one written into a punched
hole is zeroed again.
Take the range lock in zfs_freesp() and hold it until TX_TRUNCATE is
assigned, with the helpers running under it. As before, the lock
covers the whole file when the size may change and only the range
otherwise; the choice between extending, truncating and freeing is
now made under it. The page cache is still truncated after the lock
is dropped.
[27 lines not shown]
[MLIR][XeVM] Use findProgramByName to locate tools on PATH (#240622)
SerializeGPUModuleBase::findTool looked up tools on PATH via
llvm::sys::Process::FindInEnvPath, which checks for the exact file name.
On Windows the tool is named e.g. `ocloc.exe`, so the lookup always
failed with "Couldn't find the `ocloc` binary" even when the tool was on
PATH.
Use llvm::sys::findProgramByName instead, which handles executable
extensions on Windows and behaves the same on POSIX.
interfaces: defer PPP to after rc.bootup completes
This may have several benefits like drivers only slowly becoming
ready during interface configuration and dhcp6c coming up more
gracefully.
PR: https://forum.opnsense.org/index.php?topic=52824.0
[ValueTracking] Teach LLVM that rem_euclid is always positive (#236900)
Teach ValueTracking to infer that scalar Euclidean remainder expressions
R + (R < 0 ? A : 0) are non-negative, where R = srem X, Y and A is
either Y (when known non-negative) or abs(Y). Enables folding
comparisons of the result against zero.
Fixes #224449
[ConstraintElim] Split signed min/max across their operands when checking a compare
The existing constraint systems only record the bounds that hold for both
operands of a min/max (smax(a, b) >= a and >= b, smin(a, b) <= a and <= b). The
other direction is a disjunction, which cannot be recorded as a fact. When a
compare of signed decompositions involves a min/max result, split it into its
operands: the decomposition is monotonic in that result, so it is the max or min
of its values on each side, and the relation holds for all or for either side
respectively.
https://alive2.llvm.org/ce/z/zsGkJ-
[ConstraintElim] Prove sadd/ssub.with.overflow cannot overflow from the exact sum
Decompose the operands and show that the sum lies in the range of the type. This
handles patterns like A + (B - A), as well as sums involving signed min/max
results, which are split across their respective operands using monotonicity
(for example start + smax(end - start - 1, 0) <= end).
https://alive2.llvm.org/ce/z/ze8LCk
[SLP][NFC] Pre-commit tests for compare chains feeding heterogeneous sinks (#240778)
Add tests covering compares that feed a uniform single-use chain whose
sinks are heterogeneous. vectorizeCmpInsts() roots the SLP tree at the
compares, so today only the compares are vectorized and the chain they
feed is left scalar, with one extract per lane.
No functional change.
Co-authored-by: Balakrishna Bandlapalli <bbandlap at gmail.com>
[SLP]Fix bit pack lane cost for interchangeable lanes
A lane like add %x, 0 in the shl node is an interchangeable shl, so
check the op it matches instead of its own opcode.
Fixes #241471
Pull-request: https://github.com/llvm/llvm-project/pull/241485
spa: keep ZIL claims relative to the loaded txg
5f1957a15 numbers the new txgs after a load of an explicitly requested
txg above every uberblock still on disk, by raising spa_first_txg.
spa_min_claim_txg() returned spa_first_txg, so the threshold for "log
block not yet committed" moved with it. A writable 'zpool import -T'
doesn't clear the log (only the rewind retry path does), so zil_claim()
then treats log blocks and WR_INDIRECT data born after the loaded txg,
which are free in its space maps, as already committed and doesn't
claim them. Debug builds fail the assertion at the end of zil_claim();
release builds free those log blocks unclaimed when the log is
destroyed: a double free, or a free of space that has been reused since.
Record the claim threshold before raising spa_first_txg and return it
from spa_min_claim_txg(). It is fixed for the life of the import, as
dsl_scan and traverse also use it after the load. The threshold is
also stored as zh_claim_txg, which replay and the log's frees compare
births against, so it has to stay the txg after the loaded one.
[11 lines not shown]
[X86][ACEV1] Address review comments
- Drop the AMX_TILE dependency; under acev1 enable only the AMX
instructions that ACE v1 actually shares.
- Namespace the ACE-invented intrinsics under llvm.x86.acev1.* and leave
the shared AMX-AVX512 ones in the flat llvm.x86.* namespace.
- Sync the public intrinsic and builtin names with GCC, and add the
helper macros from the ACE v1 spec.
- Tighten Sema checking of the outer-product group bits, and add driver,
preprocessor and feature-error test coverage.
- Spell BSR0 literally in the AsmStrings with Defs/Uses instead of
carrying it as a custom operand, which removes the bespoke handling
from X86AsmParser and both instruction printers.
- Drop the unused BSR register class; like TMMCFG, BSR0 needs only its
X86Reg definition and the getReservedRegs entry.
- Adopt the operand-type record naming convention, 't' for a TILE and
'e' for a GR32 index, on both the instructions and their pseudos,
retiring the ad-hoc _REG suffix.
- Use WriteSystem rather than WriteVecLogic for the tile outer products
[3 lines not shown]
Add NTS support for NTP servers
- Add `nts` to system.ntpserver, rendered as chrony's `nts` option, and
list it in `_datastore_sql_filters`
- Without `force`, probe NTS-KE (TLS 1.3, ALPN ntske/1) and the
negotiated NTP server on save
- Cap `maxpoll` at 21 for NTS servers
- Reject line breaks and whitespace in ntpserver `address`
- Render `authselectmode prefer` in chrony.conf, or `require` with the
new system.security `require_nts` (default off). Changing it restarts
chronyd, which service.control propagates to the other controller
- With `require_nts`: refuse enabling without an NTS server, saving
servers without NTS and deleting the last NTS server
- Read NTS key state from the chronyd socket (AUTH_DATA,
NTP_SOURCE_NAME); name failing NTS servers in the NTP health alert
- Add NTS-aware advice to directory services clock skew errors
- Use absolute clock offsets in the NTP alert and AD health check
- Add NTS-KE client in middlewared.utils.ntp
- Support IPv6 and non-default ports in the NTP reachability probe
[13 lines not shown]
[lldb][test] Write the Shell tests' lit-lldb-init files from lit (#236887)
The %lldb substitutions source lit-lldb-init-quiet from the test
execution root, and CMake wrote that file and lit-lldb-init into the
build directory. Write them from the lit config instead, when the
substitutions are set up. The test execution root is where lit already
writes test outputs, so this works for any build system that can run lit
with a writable execution root, including ones that cannot add generated
files to it ahead of time, like Bazel.
ZTS: test a writable import -T of a pool with a live ZIL
Run a synchronous writer so the ZIL is never empty and freeze the pool
while it runs: the log keeps growing, but nothing after the freeze txg
reaches the disk. Stop the writer, export, and import the pool
read-write at the txg before the newest uberblock, so the log blocks
written while the newest txg was open are born after the imported txg.
The import must succeed, and after another export and import the pool
must scrub clean and pass zdb's leak check. (Freezing keeps the test
deterministic: a pool that syncs more txgs before the export can reuse
blocks freed after the imported txg, and the rewound pool then has
data errors.)
Since 5f1957a15 the new txgs after such an import are numbered above
the newest uberblock on disk, and spa_min_claim_txg() follows them, so
the log is claimed against the wrong txg.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Will Rouesnel <wrouesnel at wrouesnel.com>
[2 lines not shown]
[X86] combineBasicSADPattern - incorrect vector element count (#240005)
Ensure we determine the vector element count from the reduction ROOT,
not the first vector in the chain - to correctly handle cases where the
ROOT is split during reduction
Fixes #239204
[mlir][vector] Reject `vector.mask` on Xfer ops that have a mask operand (#240797)
`vector.transfer_{read,write}` already have a _mask operand_, so
wrapping them in `vector.mask` gives two ways to express the same thing
and risks double masking. This PR makes `vector.mask` reject a masked
Xfer op that already has a mask operand.
Changes:
- Add a check to `MaskOp::verify` that fails if the op has a mask
operand.
- Add two _negative_ tests for `vector.transfer_{read,write}`.
Part of #239511.
RFC:
https://discourse.llvm.org/t/rfc-unify-masking-in-the-vector-dialect/92675
---------
Signed-off-by: Federico Bruzzone <federico.bruzzone.i at gmail.com>
[GitHub][libc] Bump LLVM to 24 in container image (#241368)
Otherwise we get errors about having an out of date clang (e.g., CMake
error in libc-fullbuild on AMDGPU).