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>
[MSan][Test] Add baseline test for llvm.experimental.vector.extract.last.active (#237415)
This is a baseline test before patching
https://github.com/llvm/llvm-project/pull/233552.
This test shows vector.extract.last.active is being handled strictly.
Assisted-by: Gemini
[NVPTX] Use target nodes for clz.b64 and popc.b64 (#236435)
Since #130668, 64-bit ctlz and ctpop are lowered to an i32 ctlz/ctpop of
the i64 operand. DAG combines assume the result is as wide as the
operand, so e.g. `__builtin_clzll(x | 1) >> 5` gets folded to 0, and
some compares of a 64-bit cttz hit an assertion. Use NVPTX-specific
nodes for clz.b64 and popc.b64 instead.
Fixes #235271.
Assisted-by: Claude Code (Claude Opus 5.5)
clang: Do not pass an empty -syslibroot for --sysroot= on Darwin (#229421)
-isysroot and DEFAULT_SYSROOT, but it checked only for the presence
of the option. An empty --sysroot= then produced -syslibroot "",
where previously it fell through to -isysroot. An empty --sysroot= is
the usual way to defeat DEFAULT_SYSROOT, so treat it as absent.
Use this to fix the darwin-static-lib tests when clang is built with
DEFAULT_SYSROOT or CLANG_USE_XCSELECT.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
PowerPC: Remove LiveVariables run and unused LiveIntervals requirement (#235059)
PPCTLSDynamicCall has not used LiveIntervals since 3ff319c69047, but
still required the analysis. LiveIntervals requires there to be no
unreachable blocks or otherwise it asserts. These blocks were
indirectly removed by adding the extra LiveVariables run, because
LiveVariables has a declared requirement on
UnreachableMachineBasicBlockElim.
Drop the dead analysis requirements along with the LiveVariables run.
This also avoids computing LiveIntervals at -O0 for PIC. This is
still broken if the pipeliner is explicitly enabled on optnone
functions which requires a separate fix.
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>
Merge tag 'ksmbd-for-7.4-rc1-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/smb
Pull smb server fixes from Namjae Jeon:
- Fix compound CREATE response buffer sizing and reserve space for
final response padding to prevent buffer overflows and out-of-bounds
reads
- Allocate sufficient space for UTF-16 directory-name conversion,
including the terminating NUL
- Fix an RDMA transfer length underflow that can cause out-of-bounds
reads or writes when processing multiple remote buffer descriptors
- Fix use-after-free bugs during failed durable reconnect cleanup and
AppInstanceId supersede racing with session teardown
- Keep retry timeout clamp bounds constant to fix a MIPS build failure
with CONFIG_HZ=1024
[33 lines not shown]
Merge tag 'perf-tools-for-v7.4-1-2026-10-30' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next
Pull perf tool updates from Arnaldo Carvalho de Melo:
- Support instruction tracking on arm64 for data type profiling,
resolving stack, global, per-CPU and 'current' variable accesses, so
that 'perf annotate --data-type' resolves types on arm64 the way it
does on x86.
- Port the Python scripts to the perf module and standalone execution,
and improve the module: lazy sample callchains and event copies, GIL
handling, better session/thread lookup, new treport, flamegraph and
sqlite/postgres exporters.
- Reenable and fix the attribute expectation test suite: per-PMU bit
masks, other core PMUs' events, dummy tracking events, group checks
and spelled out skip reasons.
- perf trace: filter the target's tasks in BPF, open the BPF output
[94 lines not shown]
Merge tag 'apparmor-pr-2026-10-29' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor
Pull AppArmor fixes from John Johansen:
"Leaks:
- fix a leak on a rejected string table entry
- fix refcount leak in aa_get_newest_profile()
- fix profile leak when a policy load fails
- remove fs entries created by a failed policy load
- on failed load ensure profile files are removed before parent
- Fix namespace reference leak in __aa_find_or_create_ns()
Use after free/double free:
- fix a use-after-free in aa_lookupn_ns()
- avoid potential double free when remapping DFA tables
Bounds checking by-passes:
- fix table_size() integer overflow on 32 bit
- check accept index + 1 is in bounds
[48 lines not shown]
CodeGen: Maintain the dominator tree in MachinePipeliner
LiveIntervals computes live ranges using the dominator tree, but the
modulo schedule expanders change the CFG without updating
it. Intervals computed later in the pass therefore see a tree missing
the new prolog, kernel and epilog blocks. This is latent today, but
reachability. The unregistered blocks would be incorrectly treated as
unreachable.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[clang][CodeGen] Fix missing terminator when a new-expression initializer starts with a loop (#230902)
Fixes #175427
`EmitCXXNewExpr` marks the point where the operator delete cleanup
becomes active with a placeholder `unreachable` and erases it once the
initializer is emitted. If the initializer starts with a loop or a
label, `EmitBlock` takes that terminator as the end of the block and
emits no fall-through branch, so erasing the placeholder leaves the
block unterminated and valid code fails with "Broken module found".
The marker only has to be an instruction that the deactivation can
insert a store before, while the rest of CodeGen assumes the current
block has no terminator until a real one is written. The placeholder is
now the `i1` load from null that the other cleanup markers already use,
so the block stays open and `EmitBlock` branches normally. The same
marker in `EmitDelegateCallArg` is switched for consistency.
LLM tools were used for this contribution.
[AMDGPU] Address review comments on AVGPR banking
Keep the larger bank excess in initCandidate.
In checkScheduling, distribute the AVGPR pressure of each program point
across the banks instead of the region maximum, which can hide a rigid
ArchVGPR peak at another point.
Co-authored-by: Cursor <cursoragent at cursor.com>
[VPlan] Replace first lane for single-scalars in replicateByVF. (#237472)
If DefR is a single scalar, all lanes are equal and all scalar users can
use lane 0.
This fixes a crash due when trying to match an extract from a
single-scalar.
Fixes https://github.com/llvm/llvm-project/issues/237456