[X86][PartialReduction] Lower zext-byte add reductions to vpsadbw (#201076)
Loops of the form `for (i) sum += bytes[i];` (`uint8_t` input, `i32`/`i64` accumulator)
lower to `vpmovzxbd` + `vpaddd` today, although `PSADBW(x, 0)`
computes the same sum in one instruction per 128/256/512-bit lane.
Teach `X86PartialReduction` to rewrite the `zext <N x i8> to <N x i32|i64>`
leaves of an add reduction (N >= 16) into `PSADBW(x, 0)`, split across
SSE2/AVX2/AVX-512BW lanes per the subtarget. `i64` accumulators consume
`PSADBW`'s natural `<N/8 x i64>` output directly.
Tests: `x86-partial-reduction-byte-sum*.ll` (matcher in isolation),
`byte-sum-{positive,negative}.ll` (full CodeGen on +sse2/+avx2/+avx512bw).
[LLVM][CodeGen][SVE] Prefer uadalp over sabalb/sabalt. (#216301)
Partially reverts https://github.com/llvm/llvm-project/pull/212800
becuase for SVE2 using uadalp has better accumulator throughput than a
sabalb/sabalt sequence.
[X86][APX] Add missing VRM argument (#216240)
It happens when a rematerialized load is from global variable, see
https://godbolt.org/z/ddsh8PP4K
Assisted-by: Claude Opus 4.8
[flang] Add warning when BOZ literal is too large for assignment (#210749)
Generate a warning when a BOZ literal assignment does not fit into the
left-hand side variable.
AI use disclaimer: Github CoPilot assisted with this PR. I manually
reviewed and tested the code.
Co-authored-by: John Otken john.otken at hpe.com
---------
Co-authored-by: John Otken <john.otken at hpe.com>
Add John McCall as Swift conformance maintainer (#216041)
We've had a small number of PRs and issues come up that touch on Swift,
so this adds John as the point of contact for Swift related concerns as
they come up in Clang.
[ORC] Give the SPS controller interface a home in OrcShared (#216275)
The proxy specs in Orc/RTBridge/SPS fused the wire contract (an
operation's controller-interface symbol name and SPS signature) with the
controller-side machinery that calls it. This was dragging Orc Core APIs
(e.g. ExecutionSession) into the OrcTargetProcess library via
OrcRTBootstrap.cpp.
Fix this by introducing Orc/Shared/SPSCI, holding one descriptor per
operation:
struct MemWriteUInt8s {
static constexpr char Name[] = "orc_rt_ci_sps_mem_write_uint8s";
using SPSSig = void(SPSSequence<SPSMemoryAccessUInt8Write>);
};
The filenames mirror orc-rt/include/orc-rt/sps-ci/*SPSCI.h, so the two
sides of each contract pair up by name. ProxySpec now takes a descriptor
in place of a signature and a name pointer:
[12 lines not shown]
[AMDGPU] Skip pointer users with no uses when preloading kernel args (#216281)
A dead GEP has no users, so dereferencing user_begin() looking for a
load hits the end iterator and asserts
[NVVM][NVPTX] Add tensor map override support in S2G and Reduce intrinsics (#215503)
This change adds support for tensor map override in S2G and Reduce
intrinsics. These variants allow overriding tensor map properties.
[lldb][test] Check debugserver's expedited memory in its replies (#216165)
debugserver expedites memory in two replies and no test asserts any of it is there.
`test_stop_reply_expedites_frame_pointer_backchain` checks the stop reply: every
`memory:` entry carries `2 * ptrsize` bytes, and there are at most two, the cap
that keeps the reply small. The count is not pinned to exactly two, how far the
walk gets depends on where the backchain terminates.
`test_threads_info_expedites_stopped_frame_stack` checks `jThreadsInfo` by chunk
size: every thread carries at least one backchain entry, the stopped thread
carries one or two chunks that are not, and no other thread carries any. The
addresses are not checked, debugserver anchors frame 0's window at `$fp` or at
`$sp` depending on the inferior's prologue.
Sizes come from `qProcessInfo`, not a hard-coded 16, so they hold on a 32-bit
target. `gather_threads_info` is split out of `gather_threads_info_pcs`.
debugserver only.
[lldb][NativePDB] Migrate away from `lldbassert` (#216152)
`lldbassert` has a note on the lldb docs that reads:
> New code should not be using `lldbassert()` and existing uses should
be replaced by other means of error handling.
(Native)PDB is the largest user of `lldbassert`. This migrates NativePDB
away. I kept the DIA PDB asserts, because we want to remove it
regardless.
There are two main reasons `lldbassert` is used:
1. Checking internal invariants. For example checking that we haven't
already created a type when saving it to a map. I replaced this with
`assert`.
2. Checking for invalid debug info. For example checking that the base
class of a record is another record. I replaced this with a log and
early out. We shouldn't even `assert` here.