Skip to content

[pull] main from llvm:main#1584

Merged
pull[bot] merged 26 commits into
MPACT-ORG:mainfrom
llvm:main
Jun 30, 2026
Merged

[pull] main from llvm:main#1584
pull[bot] merged 26 commits into
MPACT-ORG:mainfrom
llvm:main

Conversation

@pull

@pull pull Bot commented Jun 30, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

bulbazord and others added 26 commits June 29, 2026 16:59
This changes 2 things:
1) BreakpointNameList is now called BreakpointNameMap to reflect the
   actual underlying data structure.
2) BreakpointNameMap goes from a `std::map` to a `llvm::StringMap` to
   eliminate the use of ConstString.
Instead of storing `const char *` (which are currently backed by
ConstStrings), it should instead store the FileSpec and extract the
Filename and Directory as needed.
…206386)

The LParentLoc is already a data member of the OMPVarListClause class.
The OMPThreadLimitClause and OMPNumTeamsClause classes inherit from
OMPVarListClause and should not need to have their own LParentLoc.
So that no pass instrumentation ends up preventing the addition of this
necessary pass.

Also makes this consistent with X86.
This change introduces the `StaticLibrary` data structure, the SSAF analogue of `ar`, `libtool -static`, or `lib.exe`: a single-architecture bundle of `TUSummary` objects. `StaticLibrary` only stores `TUSummaryEncoding` because it will be used by `clang-ssaf-linker` that does not decode the summary data. We don't plan to create a decoded variant because there will be no consumer. Support for constructing and linking static libraries will be introduced in future PRs.

rdar://180665891
…02513)

Musl adds -sf or -sp suffixes to the path of dynamic linker (e.g.,
ld-musl-riscv64-sf.so.1):


https://git.musl-libc.org/cgit/musl/tree/configure?h=v1.2.6&id=9fa28ece75d8a2191de7c5bb53bed224c5947417#n732

---------

Co-authored-by: Chih-Mao Chen <cmchen@andestech.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This extracts the code that emits diagnostics when no viable function is
found for allocation overload resolution to reduce the diff in #203824.
)

This PR adds target-independent infrastructure for annotating LLVM
intrinsics with required subtarget feature expressions.

It introduces a TargetFeatures string field to intrinsic TableGen
records. TableGen emits an intrinsic-to-feature mapping table.

Both SelectionDAG and GlobalISel now perform this check before lowering
target intrinsics. This allows targets to opt in by annotating intrinsic
definitions directly, rather than adding custom checks during lowering,
legalization, or instruction selection.

This PR uses one AMDGPU intrinsic as an example.
**Summary**

`MergeFunctions` can fold equivalent functions into a single retained
implementation. When that happens, the retained body may be reached by
callers of both original functions, but its `function_entry_count`
metadata previously preserved only one side of the profile data.

For example, folding functions with entry counts `2000` and `1000` could
leave the retained body with only `2000`. This patch updates the
retained implementation after a successful merge, so the entry count
becomes `3000`, using saturating add.

For ODR/double-thunk merges, the private backing body gets the combined
count while the thunks keep their own entry counts. For alias-backed
merges, the backing function carries the combined count.

**AI Assistance Disclosure**

AI tools were used to browse the LLVM codebase and explore test-case
variations. All outputs were manually reviewed and validated, and I take
full responsibility for the final changes.
…ader (#206057)

A conditional branch redirecting edges to the cycle header may have both
successors equal to the header (e.g. `br i1 %c, label %h, label %h`),
which the previous `Succ1 = Succ0 ? nullptr : Header` logic mishandled
by dropping the second edge.

Check each successor independently against the header instead.

Fixes #191979.
…206430)

For a reduction sum with an i32 accumulator on RV64, the result is
computed at i64 and truncated, so the accumulator's upper bits are
unused. Any-extend it instead of sign-/zero-extending, dropping a
redundant sext.w/zext.w. Follow-up to #206004.
Add the __riscv_predsum/predsumu_* header wrappers over new
__builtin_riscv_* builtins, lowering to the llvm.riscv.predsum/predsumu
intrinsics.
Reverts #202218

Causes build failures and needs to be rebased on top of main before
relanding.
Follow-up to #204230.

Refactor nanobind warning suppression flags into `build_nanobind_lib`.
Drop duplicate RTTI and exception flags.
…on()` (#204781)

This regresses `Sema/enable_if.c`, which now fails when run with the
bytecode interpreter. We also get 14 more diagnostic differences in
`SemaCXX/builtin-object-size-cxx14.cpp`.



Fixes #138473
This is preparatory work for changing the representation of
FeatureKV/SubTypeKV, in which they will no longer be that easily
accessible as global variables. Therefore, get them from the subtarget
instead.
…sform.structured.rewrite_in_destination_passing_style` (#205034)

`transform.structured.rewrite_in_destination_passing_style` may be
applied to an operation that is already in destination-passing style,
e.g. `linalg.add`. In this case, the operation does not need to be
rewritten, but the current `TypeSwitch` does not handle
`DestinationStyleOpInterface` and falls through to the unreachable case.

Such operations can be handled by returning them unchanged. This makes
the transform accept already destination-style operations and avoids the
crash.

An regression test for applying `rewrite_in_destination_passing_style`
is added to `linalg.add`.

Fixes #204099
The clang and flang PGO pipelines clean and regenerate the same shared
profraw directories, so running them concurrently can truncate a profraw
while the other merge has it mmap'd. Add an ordering edge so flang's
pipeline runs after clang's.

Fixes issues introduced by
#198863
…06456)

Also fix this test to not have absolute line numbers
… friendly when the 1st type is not a reference type (#206527)

Suppose that `__reference_constructs_from_temporary` is defined as:

```cpp
__reference_constructs_from_temporary(_Tp, _Up);
```
A non-reference type can never bind to a temporary, so the result is
always `false` for such a `_Tp`. We should short-circuit before reaching
the instantiations by check the type of `_Tp`. But clang's
`__reference_constructs_from_temporary` eagerly instantiates the
construction of `_Up` (including the element's constructor exception
specification) even when `_Tp` is not a reference, which can hard-error
on misbehaved types.

The following code should be accepted, but clang raise a hard error:

```cpp
struct NoConv {};
struct Bad { template<class T> Bad(T v) noexcept(noexcept(member_ = v)) {} int member_; };
static_assert(!__reference_constructs_from_temporary(Bad, NoConv&&));
static_assert(!__reference_converts_from_temporary(Bad, NoConv&&));
static_assert(!__reference_binds_to_temporary(Bad, NoConv&&));
```

The PR refine the implementation of these builtins by short-circuits on
a non-reference first operand.

Fixes #206524.

---------

Signed-off-by: yronglin <yronglin777@gmail.com>
…legalization (#205056)

Currently, `combineInsertEltToShuffle` could create a shuffle of an
illegal type after type legalization, which when reaches the operation
legalizer, asserts ("Unexpected illegal type!").

#198259 fixed a crash resulting
from this in NVPTX but resulted in regressions with some types due to
the check blocking pre-type-legalization folds in addition to the
illegal post-type-legalization shuffle.

This change removes the TTI override in NVPTX and adds a guard in the
`combineInsertEltToShuffle` pattern to avoid forming illegal-typed
shuffles after type legalization.
…00868)

canParallelizeReductionWhenUnrolling iterates the latch instruction's
operands and rejects the reduction if any is a Constant. For calls the
called function is itself a Constant, falsely rejecting every intrinsic
form (fmuladd, smin/smax/umin/umax, etc.). Use CallBase::args() to
restrict the check to data operands.
@pull pull Bot locked and limited conversation to collaborators Jun 30, 2026
@pull pull Bot added the ⤵️ pull label Jun 30, 2026
@pull pull Bot merged commit ffa0279 into MPACT-ORG:main Jun 30, 2026
4 of 6 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.