[SLP] Fix crash in isCommutative for abs users of non-overflowing lanes
An or, xor or and lane converted to sub keeps its original opcode and has
no wrap flags, so querying nsw on it asserts. Such a lane does not clear
nsw of the vector sub either, so it is treated like a copyable lane: its
operands can be swapped only if abs is poison on INT_MIN.
Fixes #242907.
Pull-request: https://github.com/llvm/llvm-project/pull/242927
IR: Handle integers and pointers first in DataLayout::getTypeAllocSize
getTypeAllocSize is mostly called on integer and pointer types, but the
recursive array and struct cases made every call set up a large stack
frame. Move the other types to a separate function, so the common cases
don't need it. The pointer case also only looks up the pointer spec once.
callgrind instructions, opt -O3: sqlite3 -0.16%, consumer-typeset z08.bc
-0.13%, kimwitu++ k.bc -0.10%, SPASS cnf.bc -0.09%. CTMark
instructions:u: O3 -0.06%, ThinLTO -0.08%.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
mps(4): add support for hostboot
If the mps/mpr(4) device has corrupted or missing firmware then
it will fail to attach.
Add an interface to use firmware(9) to load the firmware at boot.
Loosely based on https://github.com/marcan/lsirec/
Assisted-by: Claude Code (Opus 5)
Reviewed by: imp
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D59854
IR: Make Type::getScalarSizeInBits inline for integers
getScalarSizeInBits is called very often from ValueTracking and
InstCombine, almost always on integer types. Return the integer width
directly instead of calling getPrimitiveSizeInBits out of line.
callgrind instructions, opt -O3: sqlite3 -0.18%, consumer-typeset z08.bc
-0.11%, SPASS cnf.bc -0.10%. CTMark instructions:u: O3 -0.06%,
ThinLTO -0.06%.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
postal: update to 0.76
(0.76)
* Updated control file to include homepage and git repository.
* #define PATH_MAX if it's not already defined, for HURD.
(0.75)
* Fix some compiler warnings.
* Stop autoconf controlling stripping.
(0.74)
* Add -b option to bind to an address to bhm
* Add changes from NMU and use Debhelper compat level 9.
* Fix buffer underrun.
* Made it build with GCC-6.
(0.73)
* Do not #include <gcrypt.h> when unnecessary.
* Stop linking against libgcrypt.
[23 lines not shown]
[NVPTX] Expand lrint and llrint for f32 and f64 (#242764)
marks `(l)lrint` as Expand for f32/f64 on NVPTX.
they defaulted to LibCall, since NVPTX has no libm, they crashed.
now they use the generic FRINT + FP_TO_SINT expansion.
from #240078
nuageinit: Skip ssh keys if default user adduser fails
Commit d9fa6016011e ("nuageinit; Skip SSH keys and doas/sudo if adduser
fails") handled nil return from a failing adduser when adding secondary
users, but the same issue also existed in the default user handling.
Reported by: llm-postcr
Reviewed by: dtxdf
Supported by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D61511
AMDGPU: Add named ArgRange classes for common builtin operands (#242552)
Name the ranges shared by many builtins after the operand they
constrain: byte/word select indexes, scale_sel, f8f6f4 matrix formats,
and wmma neg flags on variants that do not support negation. NFC.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
AMDGPU: Use ArgRange for prefetch cache policy bounds (#242551)
Only the reserved th value check remains in Sema.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[libclc][spirv] Add double support to Vulkan vstore_half/vstorea_half (#242829)
Implement `double` overloads for `vstore_half` and `vstorea_half` under
`cl_khr_fp64`. Round each element with the Vulkan boundary checks, then
forward it as `float` to the existing `vstore_half_N` and
`vstorea_half_N` helpers.
Prerequisite for google/clspv#1752; end-to-end tests will be added there
since `libclc/test` currently targets only AMDGPU.
I used AI assistance to prepare and review this patch.
I reviewed the entire change and take full responsibility for this PR.
Assisted-by: Antigravity Gemini 4 Hydrogen Extra reasoning
Assisted-by: Claude Code Opus 5.5 Max reasoning
toxcore: update to 0.2.25
- Ignore group sync responses we didn't request.
- Only sync group state once per roles checksum.
- Remove a group if loading its saved state fails.
- Limit how many peers and relay clients we keep.
- Only store group announces for up to 512 groups.
- Only queue up to 1024 priority packets per TCP connection.
- Don't free memory that's still stored elsewhere.
- Remove group peers added by requests that then fail.
- Check the handshake rate limit before adding a group peer.
- End call ringing for inactive calls.
- Try a friend's newest saved TCP relays first after 65536 of them.
- Compare wrapped counters and sequence numbers modulo their size.
- Only allow the 2 known conference types.
- Better handling of file or AV call cancelling.
- Don't read from evicted epoll TCP connections.
- Clean up minor group chat issue for early joins.
- Finish removals when array shrinking fails.
[2 lines not shown]
[KnownFPClass] improve deductions for fadd_self (#239257)
`fadd_self` is just multiplication by two. I removed the call to
`fadd_impl` and replaced it with the optimal conditions to rule out each
class, which improved deductions around NaN, infinity, and normal
classes. These refinements are valid for all rounding modes.
`fadd_impl` could not rule out NaN if both infinities were possible for
`fadd_self`: `fadd` produces NaN for `+inf + -inf` and `-inf + +inf`,
which are both impossible for `fadd_self`.
I avoided using `ldexp` so we do not have to pass in the `APFloat`
semantics into `fadd_self`.
[SLP] Keep original type for values with non-demoted vectorized users
A vectorized user, which stays in the original type, consumes the
extension of the demoted value with the wrong upper bits and may keep
poison-generating flags. Keep sext/zext nodes, demoted below their source
width, in the original type for such users, and check the flags of these
users for other demoted nodes.
Fixes #242864
Pull-request: https://github.com/llvm/llvm-project/pull/242915
[VPlan] Don't pack predicated values only used as scalars. (#242903)
When only scalars are used, avoid the vector round trip by skipping
packing the scalars in a vector, and instead using them via their scalar
phis.
Add a helper to determine whether only scalars are used, to be re-use in
follow-up.
[CodeGen] Stop trailing debug instructions from changing liveness queries (#235667)
When `computeRegisterLiveness` exhausts its bounded forward scan on the
block's last ordinary instruction, a trailing debug instruction or
pseudo
probe leaves the iterator short of `end()`. The end-of-block successor
live-in check is missed, so the fallback scan can return `LQR_Live` or
`LQR_Unknown` where `LQR_Dead` is expected. In `X86FixupLEAs`, this
keeps a
two-address LEA instead of converting it to ADD.
Skip trailing debug instructions and pseudo probes before the
end-of-block
check. Extend the existing X86FixupLEAs MIR test with the exact
ten-instruction boundary. A C reproducer emits `leaq (%rax,%rsi), %rax`
with
`-g` and `addq %rsi, %rax` with `-g0`; the patch makes both use ADD.
This issue was found by a non-AI automated testing tool. AI assisted
with the analysis and development of the fix.
[ARM] Preserve Thumb1 compare elimination across debug instructions (#237505)
A debug value between a Thumb1 multiply and compare prevents the
existing `MULS/MOVS/MOVS/CMP` reorder. As a result, debug builds retain
a redundant compare that is eliminated without debug information.
Move the intervening `MOVS` instructions before the multiply instead of
moving the multiply past the debug value. This keeps debug values after
the definitions they describe while allowing the compare to be
eliminated.
Fixes #227925
This issue was found by a non-AI automated testing tool. AI assisted
with the analysis and development of the fix.
[X86] Mark vXi64 int to fp undesirable without AVX512DQ
Without avx512dq there is no vector conversion from i64 elements to f32
or f64, so widening the conversion of a source truncated with nsw or nuw
back to i64 makes it slower.
avx512fp16 converts i64 elements to f16 directly, so the widening folds
now pass the node and the check sees the result type.
Assisted-by: Claude Code Opus 5.5
[DAGCombiner] Mark uint_to_fp widened through trunc nuw as nneg
The source of a trunc nuw fits in a strictly narrower type, so it is
non-negative. Without nneg x86 lowers the widened conversion through the
unsigned i64 expansion.
Assisted-by: Claude Code Opus 5.5
[NFC][X86] Add tests for int to fp of a trunc nuw or nsw source
Without avx512dq a vector i64 source truncated with nsw or nuw is
converted one element at a time or through the unsigned i64 expansion.
A scalar source truncated with nuw takes the expansion without avx512f.
avx512fp16 converts i64 to half directly even without avx512dq.
Assisted-by: Claude Code Opus 5.5