[Clang][RISCV] Add packed subvector extract intrinsics (#224429)
Add the Packed Subvector Extract intrinsics:
- `__riscv_pget_i8x8_i8x4`
- `__riscv_pget_u8x8_u8x4`
- `__riscv_pget_i16x4_i16x2`
- `__riscv_pget_u16x4_u16x2`
Each extracts the 32-bit packed subvector selected by a constant index
(0 = low, 1 = high) from a 64-bit packed vector. The index is
range-checked with `__enable_if__`, as for the element extract
intrinsics.
This is header-only: the shuffle is selected without backend changes, so
no new IR intrinsics or builtins are required.
[RelLookupTableConverter] Reject volatile loads (#224414)
The pass converts absolute pointer lookup tables to relative lookup
tables and replaces the table load with a call to `@llvm.load.relative`.
However, `@llvm.load.relative` is an intrinsic with `memory(argmem:
read)` and cannot represent volatile access semantics. Replacing a
volatile load with `@llvm.load.relative` drops volatile side effects.
[Clang][RISCV] Add scalar saturating add/sub, absolute value and rev intrinsics (#224377)
First batch of the P extension `Scalar Intrinsics` group, covering the
operations that map onto a single existing LLVM IR intrinsic
(llvm.sadd.sat, llvm.uadd.sat, llvm.ssub.sat, llvm.usub.sat, llvm.abs,
llvm.bitreverse) that the backend already selects, so no codegen changes
are needed.
[CSSPGO] [Pseudo-Probe] Avoid infinite loop on cyclic invoke destinations (#221630)
SampleProfileProber::getOriginalTerminator() walks invoke normal
destinations (and ignored single-successor blocks) so the CFG hash stays
stable across call-to-invoke conversion. That walk assumes the chain is
acyclic.
Valid IR can have a self-looping invoke (normal dest == the invoke
block). The walk then never returns, and opt -passes=pseudo-probe hangs.
Example Testcase:
```cpp
void f1();
void test() {
try {
for (;;)
f1();
} catch (...) {}
}
[4 lines not shown]
[AMDGPU] Fix noalias metadata for calls that capture a pointer earlier (#219887)
A call could get `!noalias` against a kernel noalias argument even when
that argument was captured into a global earlier and the call can reach
it that way
Only calls that touch just their own argument pointees are actually safe
to mark this way
[mlir][xegpu] Fix lane-local classification for packed-lane-data reductions (#223077)
isReductionLaneLocal decided whether a subgroup vector.multi_reduction
reduces within a lane by comparing the result vector type against its
distributed type. This assumes the lane_layout along the non-reduction
dim is always larger than 1, which is not always true.
This PR fixes it by checking the source's lane_layout along the
reduction dimension is 1.
assisted-by-claude
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply at anthropic.com>
ice: Report SR-IOV VF status
Report the VF MAC, allocated transmit and receive queues, exact trunk
VLAN-filter count and capacity, negotiated virtchnl API, configured MAC,
VLAN, spoof-check, and promiscuous-mode policy, automatic link-state
policy, PF traffic permission, and fault containment through iflib.
Expose mirror configuration and active hardware rules, precise
malicious-driver isolation and counters, software mailbox-overflow
isolation and counters, VF-owned MAC-filter count and limit, and reset
diagnostics through a versioned driver.ice extension. Distinguish a
failed VF reset from a required VSI rebuild, which may still be pending
rather than failed. Keep the namespace schema local to the driver so
future extensions need no changes to common network headers or the
formatter.
Invalidate cached VF handshakes during preparation for an externally
initiated device reset, before releasing the context lock to wait for
hardware. Mark the VFs as requiring rebuild even if an early PF rebuild
[14 lines not shown]
[flang] Fix RecordType sizes, TRANSFER lowering, and BIND(C) ABI on SystemZ/PPC64le (#220377)
### Summary
`fir::getTypeSizeAndAlignment` had two bugs in its `RecordType` branch:
1. **Packed records**: `isPacked()` was ignored. LLVM packed structs
advance by `getTypeAllocSize` per field (not `getTypeStoreSize`), so
each component occupies `alignTo(storeSize, ABIalign)` bytes with no
inter-field or tail padding, and the struct ABI alignment is 1. For
example, a packed `{i32, f64}` on x86-64 is 12 bytes, not 16.
2. **Tail padding**: the unpacked field loop returned the raw summed
size without the final `alignTo(size, align)`. For example, `{i32, i8}`
(sum = 5 bytes, align = 4) was returned as 5 bytes instead of the
correct allocation size 8 bytes.
### Changes
[30 lines not shown]
[clang-tidy] Fix readability-redundant-parentheses false positive on typeof (#223512)
Preserve the required parentheses around the operand of `typeof`,
`typeof_unqual`, and GNU `__typeof__` by skipping `ParenExpr` nodes
whose immediate parent is a `TypeOfExprTypeLoc`. Redundant inner
parentheses such as those in `typeof((x))` are still diagnosed.
Fixes #220899.
[Github] Remove additional cmake install from test-suite (#224486)
Now that we are on ubuntu 26.04 we can resolve this todo as the system
CMake is new enough and already installed.
[Github] Fix container references from #224471 (#224490)
I screwed up some of the references (copying and pasting added an extra
sh256:) and they didn't show up because the workflow definitions for all
of these jobs only comes from main.
ice: Protect the PF mailbox from flooding VFs
Wire the shared code mailbox-overflow detector into the VF lifecycle and
virtchnl dispatcher. E830 controllers use their per-VF hardware
in-flight-message watermark. On older controllers, attribute a
congested mailbox snapshot to its sender, reset it with its queues
disabled, and discard its subsequent requests. Advance snapshot
accounting even for discarded requests. A physical VFLR, PF reset, or
IOV recreation releases the VF. A blocked VF can still submit mailbox
messages after reset, so discarding requests does not stop it from
replenishing the shared queue.
Process at most one initially full mailbox immediately. If producers
keep it nonempty, mask only the mailbox interrupt cause and let the
periodic admin timer schedule bounded drain work. Keep the shared admin
vector enabled so that OICR and other control-queue events can still be
serviced. Re-enable the mailbox cause after draining and recheck the
queue head for arrivals while the cause was masked. Retry failed reads
through the same deferred path instead of treating them as an empty queue.
[14 lines not shown]
[MLIR][XeGPU] Fix insert_strided_slice distribution divisor for partial-lane dims (#223060)
SgToLaneVectorInsertStridedSlice divided the distributed dimension's
size and offset by the full subgroup size. That divisor holds only when
the dimension spans every lane. When it spans a subset (lane_layout[dim]
< subgroupSize) — say size 2 across 2 lanes — 2 % 16 != 0 made the
pattern reject the op and failing legalization.
This PR divides the dimension size by lane_layout[destDistDim], the
number of lanes actually covering that dimension.
assisted-by-claude
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply at anthropic.com>
[SlotIndexes] Add queries for stale indexes
An erased instruction leaves its index list entry in place, making the
index indistinguishable from a block boundary entry. Add
isBlockBoundaryIndex() and isStaleIndex() to tell the two apart, and
canonicalizeIndex() to resolve a stale index to the closest preceding
instruction's register slot, or the block start if none survives.
NFC. No caller yet. LiveDebugVariables is next.
[LiveDebugVariables] Repair stale SlotIndexes
The analysis keeps its indexes from before the first register allocator
until DBG_VALUEs are emitted, by which point passes in between have
erased some of the instructions they point at. Resolve them at the
start of each allocator run and before emitting.
SlotIndexes can then reclaim the entries of erased instructions without
sparing the ones held here, which would have made generated code depend
on -g. Emitted locations are unchanged, except that intervals resolving
to one position now emit a single DBG_VALUE rather than identical
consecutive ones.
[Github] Bump build workflows to Ubuntu 26.04 (#224455)
To pull in the new version of CMake and also now that the 24.04 images
won't recieve any new updates.
Bump __DragonFly_version for merging libthread_xu into libc
There is no ABI/API change with this merge, but it's a general good idea
to bump the version.
Suggested-by: tuxillo