[AArch64] Fold MIN/MAX(Vec[0], Vec[1]) to VECREDUCE_MIN/MAX(Vec)
If we have a lowering for `VECREDUCE_MIN/MAX` this is generally more
efficient than the scalar expansion.
[AArch64] Prefer SVE2 for fixed-length i64 [S|U][MIN|MAX] reductions (#181161)
With SVE2/SME we can lower the v2i64 min/max reductions to an SVE2
pairwise instruction. The throughput is about the same, but the SVE code
is smaller than the NEON expansion.
REAPPLY [clang-repl] Ensure clang-repl accepts all C keywords supported in all language models (#181335)
https://github.com/llvm/llvm-project/pull/142749 was reverted because
`_Float16` is only supported on the following targets
(https://clang.llvm.org/docs/LanguageExtensions.html#half-precision-floating-point)
& the previous PR wasn't guarding it to expect a failure on some
targets.
Hence the CI failed with errors like
```
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/bin/clang -cc1 -internal-isystem /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/lib/clang/21/include -nostdsysteminc -fsyntax-only -verify -fincremental-extensions -std=c++20 /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/clang/test/Interpreter/disambiguate-decl-stmt.cpp # RUN: at line 1
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/bin/clang -cc1 -internal-isystem /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/lib/clang/21/include -nostdsysteminc -fsyntax-only -verify -fincremental-extensions -std=c++20 /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/clang/test/Interpreter/disambiguate-decl-stmt.cpp
error: 'expected-error' diagnostics seen but not expected:
File /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/clang/test/Interpreter/disambiguate-decl-stmt.cpp Line 113: _Float16 is not supported on this target
1 error generated.
```
This should now be fixed as we are expecting an error (or no error)
based on the target through the `expected-error 0-1` framework
[lldb-dap] Initialise the call mutex before the progress_event_reporter. (#181941)
The progress event reporter has a thread that reports events every 250
millisecond. and is destroyed in its destructor.
When in event reporter desctructor, the event reporter may have pending
event but the call mutex is destroyed leading to the crash.
Relevant stack trace from CI.
```
[2026-02-13T17:46:13.577Z] libc++abi: terminating due to uncaught exception of type std::__1::system_error: mutex lock failed: Invalid argument
[2026-02-13T17:46:13.577Z] PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash report from ~/Library/Logs/DiagnosticReports/.
[2026-02-13T17:46:13.577Z] #0 0x0000000102b6943c llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake-os-verficiation/lldb-build/bin/lldb-dap+0x10008943c)
[2026-02-13T17:46:13.577Z] #1 0x0000000102b67368 llvm::sys::RunSignalHandlers() (/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake-os-verficiation/lldb-build/bin/lldb-dap+0x100087368)
[2026-02-13T17:46:13.577Z] #2 0x0000000102b69f20 SignalHandler(int, __siginfo*, void*) (/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake-os-verficiation/lldb-build/bin/lldb-dap+0x100089f20)
[2026-02-13T17:46:13.577Z] #3 0x000000018bbdb744 (/usr/lib/system/libsystem_platform.dylib+0x1804e3744)
[2026-02-13T17:46:13.577Z] #4 0x000000018bbd1888 (/usr/lib/system/libsystem_pthread.dylib+0x1804d9888)
[2026-02-13T17:46:13.577Z] #5 0x000000018bad6850 (/usr/lib/system/libsystem_c.dylib+0x1803de850)
[17 lines not shown]
[NFCI][analyzer] Simplify NodeBuilder constructors (#181875)
This commit simplifies the construction of `NodeBuilder` and its
subclasses in three ways:
- It removes an assertion that only appeared in one of the two
constructors of `NodeBuilder`. While the asserted "no sinks in the
`Frontier`" invariant apparently holds, this assertion was not the right
place for expressing it. (In the future I might re-add a similar
assertion in a more reasonable location.)
- It adds a new constructor for `NodeBuilder` that doesn't take a
"source node(s)" argument, because this argument was often irrelevant.
- It removes the "source node(s)" arguments from the subclasses of
`NodeBuilder` because it was always completely irrelevant in those
situations.
Before this commit, constructors of `NodeBuilder` took three arguments:
- the source node or nodes,
- the destination node set where the freshly built nodes are placed,
- the `NodeBuilderContext` that provides access to the exploded graph.
[23 lines not shown]
[X86] LowerAndToBT - convert to SDPatternMatch (#181696)
Fixes an issue where a partial pattern (and then early-out) prevented a
later match
Prep work for #147216
[AArch64][PAC] Emit `!dbg` locations in `*_vfpthunk_` functions
In absence of `!dbg` metadata, it is possible for indirect
authenticated call to be replaced with a direct call instruction
without `!dbg` metadata. This may result in an error reported by
LLVM IR verifier ("inlinable function call in a function with
debug info must have a !dbg location") or an assertion triggered
after inlining this call ("!dbg attachment points at wrong
subprogram for function").
[clang-tidy] Add check 'bugprone-unsafe-to-allow-exceptions' (#176430)
`ExceptionEscapeCheck` does not warn if a function is `noexcept(false)`
(may throw) but is one of the functions where throwing exceptions is
unsafe. This check can be used to find such cases.
[NFC][test-ir-visitors] Remove unregistered dialect uses from tests (#181911)
Use the already registered test dialect in tests which is explicitly
intended to allow arbitrary ops.
libclc: Remove r600 support
I believe this is dead since clover was removed from mesa.
Creating all of the targets as aliases was also busted, but may
not have mattered due to how incomplete the backend is.
libclc: Stop using r600 asm intrinsic declarations for amdgcn
Really the workitem functions should all be moved to generic code
and use gpuintrin.h. These implementations were copied from there.
[clang][ARM] Refactor argument handling in `EmitAArch64BuiltinExpr` (2/2) (NFC)
Refactor `EmitAArch64BuiltinExpr` so that all AArch64/NEON builtins
handled by this hook _and marked as overloaded_ share a common path
for generating LLVM IR arguments (collected into the `Ops`
`SmallVector<Value*>`) (*). This is a follow-up for #181794 - please
refer to that PR for more context.
As in the previous PR, the key change is implemented in
`HasExtraNeonArgument` , i.e. in the hook that identifies Builtins with
the extra argument. In this PR, I am replacing the ad-hoc switch
statement with a more principled approach borrowed from SemaARM.cpp,
namely:
```cpp
uint64_t mask = 0;
switch (BuiltinID) {
#define GET_NEON_OVERLOAD_CHECK
#include "clang/Basic/arm_fp16.inc"
#include "clang/Basic/arm_neon.inc"
[28 lines not shown]
[LV] Pass symbolic VF to CalculateTripCountMinusVF and CanonicalIVIncrementForPart (NFC) (#180542)
This makes it easier to update the runtime VF per VPlan.
[lldb][CommandObjectType] Print name of Python class when emitting warning about invalid synthetic provider (#181829)
Before:
```
(lldb) type synthetic add -l blah foo
warning: The provided class does not exist - please define it before attempting to use this synthetic provider
```
After:
```
(lldb) type synthetic add -l blah foo
warning: The provided class 'blah' does not exist - please define it before attempting to use this synthetic provider
```
Useful when many of these registration commands happen as part of
`~/.lldbinit`. Previously it wasn't immediately obvious which of those
commands failed.
[clang][ARM] Refactor argument handling in `EmitAArch64BuiltinExpr` (2/2) (NFC)
Refactor `EmitAArch64BuiltinExpr` so that all AArch64/NEON builtins
handled by this hook _and marked as overloaded_ share a common path
for generating LLVM IR arguments (collected into the `Ops`
`SmallVector<Value*>`) (*). This is a follow-up for #181794 - please
refer to that PR for more context.
As in the previous PR, the key change is implemented in
`HasExtraNeonArgument` , i.e. in the hook that identifies Builtins with
the extra argument. In this PR, I am replacing the ad-hoc switch
statement with a more principled approach borrowed from SemaARM.cpp,
namely:
```cpp
uint64_t mask = 0;
switch (BuiltinID) {
#define GET_NEON_OVERLOAD_CHECK
#include "clang/Basic/arm_fp16.inc"
#include "clang/Basic/arm_neon.inc"
[28 lines not shown]
[Toolchains][FreeBSD] Honor system libgcc
On Linux, the system libgcc may act as the compiler runtime, and Clang
provides -rtlib=compiler-rt to switch implementations.
FreeBSD ships libcompiler_rt.a (LLVM’s builtins) in the base system,
with libgcc.a as a symlink to it. These libraries are linked via -L and
-lgcc.
An interesting detail is that even if the Clang resource directory
(llvm-xx/lib/clang/xx) appears before the system path in the search
order, it is still not used. This is because the linker looks for
libgcc.a rather than libclang_rt.builtins.a.
Since FreeBSD does not currently support -rtlib, honor the system libgcc
by hardcoding its path. Detect and handle cases where a custom
compiler-rt is injected via -L as an override workaround.