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
[VPlan] Support non-constant steps for VPScalarIVSteps in getSCEVExpr (#242896)
The IV operand of a VPScalarIVStepsRecipe already advances by the
recipe's step in each iteration, so its SCEV is the recipe's value for
the first lane of the current scalar iteration, independent of the step.
Return it for any step, instead of only constant steps.
Also return SCEVCouldNotCompute for recipes with a start index, which
add StartIndex * Step. Start indices are only set by unrolling and
replication, after the users of getSCEVExprForVPValue that pass a loop,
so this is defensive and does not change behavior.
The only use is the VPlan-based cost model, and VPRelpicateRecipes fall
back to legacy cost model in fewer places with the change.
[LV] Add tests for predicated udivs used by replicated recipes (NFC). (#242895)
Add tests where a predicated udiv with various uses in different regions
and cost tests