[RISCV][P-ext] Combine riscv.pmhacc.b0 and riscv.pmhacc.h0 into a single intrinsic.
Similar for riscv.pmulh.b0 and riscv.pmulh.h0. This includes
different signedness and different half number.
The underlying RISCVISD opcodes were already combined.
I added ".half." to the intrinsic name to better separate from
the riscv.pmulh intrinsic.
Assisted-by: Claude
[profile] Preserve device instrumentation layout flags when writing profiles (#236081)
The LLVM options -pgo-instrument-entry and -pgo-instrument-loop-entries
control whether function entries and edges entering loops must be
instrumented. Both default to false for ordinary IR PGO. These settings
affect counter placement and are recorded as flags in the raw profile
header so profile use can reconstruct the same counter layout.
HIP users can specify different values for host and device compilation.
For example, -Xarch_device -mllvm=-pgo-instrument-entry=true enables
explicit entry counters for the device while the host keeps the default.
The host and device profiles then need different entry flags.
The ROCm collector currently writes device counters with the host runtime's
version flags. In this example, it incorrectly marks the device profile
as having entry instrumentation disabled. Profile use can then reconstruct
the wrong layout and associate counts with the wrong blocks.
Read and validate the device's profile-version variable separately from
[2 lines not shown]
[CIR] Narrow GPURelocatableDeviceCode NYI check to CUDA/HIP externalization (#236592)
The NYI check for `GPURelocatableDeviceCode` previously had a blanket
`!isSYCL() ` exclusion. This patch narrows it down to match the
condition the classic codegen uses for externalizing HIP/CUDA
device-side static file-scope variables, gated on CUDA.
Fix the default password of async_SSH_start
The default was the password function itself. It was a string before
the helper moved from tests/functions.py. do_failover(abusive=True) uses
the default, so it failed with a TypeError from Popen. Call password()
when no password is given, as ssh() does.
[SelectionDAG] Fold scalar_to_vector concatenations
Handle SCALAR_TO_VECTOR operands in foldCONCAT_VECTORS by collecting
the scalar followed by poison upper lanes. Reuse the existing scalar
type normalization for BUILD_VECTOR operands. The fold remains limited
to fixed-length vectors.
Revisit construction-time folds before operation legalization after
concat operands change during DAG combining. This preserves the
codegen improvements when operands become foldable after construction.
Add AMDGPU FP coverage and update the affected AArch64, RISC-V, and X86
codegen checks.
[clang][CodeGen] Fix crash when calling a defaulted comparison operator of a union (#231232)
Fixes #140368
`EmitCXXMemberOrOperatorMemberCallExpr` treated every defaulted member
of a union as trivial for codegen. That clause exists so that a
defaulted union copy or move operation is emitted as a memcpy, but since
C++20 a defaulted `operator==` or `operator<=>` matches it as well, fits
none of the trivial sub-cases and hits the "unknown trivial member
function" assert.
Drop that predicate and the assert and use
`isMemcpyEquivalentSpecialMember` instead: a trivial destructor is a
no-op, a memcpy-equivalent assignment is an aggregate copy, everything
else is a normal call. As a side effect, tagged PFP classes with a
non-trivial destructor now call their copy assignment operator rather
than being memcpy'd, matching what the copy constructor path already
does.
AI assisted.
RuntimeLibcalls: Describe vector FuncArgTypes by element type and count
Define the vector libcall argument types from an element type and
count. Derive the matching integer and mask vector types from them
instead of spelling each one out.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
RuntimeLibcalls: Use element alignment for vector libcall out pointers
The pointer arguments of the vector modf, sincos and sincospi functions
are linear pointers to the scalar element type (e.g. the l4 in
_ZGVnN4vl4l4_sincosf), not pointers to the vector type. Only the element
alignment is guaranteed, so stop declaring them with the ABI alignment
of the vector.
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
RuntimeLibcalls: Add signatures for more runtime functions
Add type missing signatures for assorted functions which were missing
type information.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
RuntimeLibcalls: Use the correct target C long width for Long
Long and ULong were mapped to the int width, which is wrong on LP64
targets (e.g. scalbln was declared taking i32 on x86_64 linux) and on
16-bit targets where long is 32 bits.
Also fix strtoul, strtoull, and the unsigned long operator new/delete
variants to use the unsigned types.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[DWARFLinker] Key classic typedefs on unnamed type contents (#238046)
The typedef key loop added in 8ac8e6fc1645 duplicates
appendUnqualifiedTypeName from c04b8e5ef033, except that it skips the
contents of unnamed types. As a result, typedefs with the same name and
declaration that refer to different unnamed types share a DeclContext,
and one unit's typedef resolves to the other unit's type. The parallel
linker keeps them apart.
Call appendUnqualifiedTypeName instead. An empty DW_AT_name now also
ends the walk, as it does in the parallel linker.
Assisted-by: Claude
[unittests] Skip target tests when the default triple is not built
PassBuilder and TargetMachine C API tests FAIL when LLVM_TARGETS_TO_BUILD
excludes the host triple. Skip instead, and avoid tearing down an
uninitialized TargetMachine after a skipped SetUp.
Co-authored-by: Cursor <cursoragent at cursor.com>
ena: Fix RSS sysctl panic when the RSS table is destroyed
ena_set_io_queue_count() destroys the ena-com RSS state but left
ENA_FLAG_RSS_ACTIVE set. The RSS sysctl handlers gate on that flag, so
they ran against state that was gone.
This causes 2 types of issues:
1. Kernel panic when reading dev.ena.0.rss.key or writing to
dev.ena.0.rss.indir_table
2. Returning a stale cached RSS table when reading
dev.ena.0.rss.indir_table, or a bogus 1 when reading
dev.ena.0.rss.indir_table_size
ena_set_io_queue_count() is called in 2 cases:
1. The io_queues_nb sysctl.
2. Device restore when the device comes back with fewer MSI-X vectors
than before.
Clear ENA_FLAG_RSS_ACTIVE when the RSS table is destroyed. The handlers
[12 lines not shown]