[lldb-server] Fix GetMemoryRegionInfo syntax to include trailing `;` (#224319)
GDBRemoteCommunicationClient::GetMemoryRegionInfo parses fields of this
packet using `StringExtractor::GetNameColonValue`, which expects a `;`
even for the last field. The documentation of the packet doesn't
explicitly say so, but implies these fields should always be
;-terminated. As a result, before this patch, that field was not parsed
at all.
[libc++] Refactor container's types.pass.cpp tests (#223602)
Convert types.pass.cpp to compile-only tests because there is no runtime
component.
---------
Co-authored-by: Hristo Hristov <zingam at outlook.com>
Co-authored-by: A. Jiang <de34 at live.cn>
Co-authored-by: Louis Dionne <ldionne.2 at gmail.com>
[MLGO] Saturate out-of-range regalloc priority advice (#224062)
Converting the float advice to unsigned is undefined outside `[0, 2^32)`
interval
Negative advice wrapped to near UINT_MAX and flipped the priority order,
NaN or advice below 1.0 made every priority 0
[ORC] Fix wrong callee in EPCGenericRTDyldMemoryManager dtor (#224493)
The destructor invoked the reserve wrapper with the release signature
when freeing FinalizedAllocs. Call the release wrapper instead.
No testcase. This was spotted by inspection, and this class is expected
to be deprecated shortly.
[lldb] Turn GetDeclContextDIEContainingDIE into a worklist (NFC) (#224453)
Convert GetDeclContextDIEContainingDIE from a recursive to a worklist
approach, avoiding a stack frame per DIE for long chains. The behavior
remains the same.
[clang][bytecode] Avoid some unnecessary diagnostic work (#224333)
We emit these diagnostics a lot, but we almost never see them. Try to
short-circuit these functions if nobody will see the diagnostics anyway.
[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>
[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]