LLVM/project 7fc4f27 — flang/lib/Parser openacc-parsers.cpp, flang/test/Parser acc-label-do.f90

[flang][openacc] Build full shared-label DO nests in AccNonBlockDoConstruct (#225997)

When an `!$acc loop` is associated with a labeled DO,
AccNonBlockDoConstruct
turned only that outer loop into a DoConstruct and left sibling
LabelDoStmts
that share the same terminator for later CanonicalizeDo. An inner `!$acc
loop`
then swallowed the shared terminator into its own DoConstruct, so
AnalyzeLabels (which runs before CanonicalizeDo) rejected the remaining
LabelDoStmts with "Label 'N' is not in DO loop scope".

Recurse on nested LabelDoStmts while parsing the associated loop so the
whole shared-label nest is a DoConstruct before label analysis. Add a
parser test where only the outer and innermost loops have LOOP
directives.
DeltaFile
+53-25flang/lib/Parser/openacc-parsers.cpp
+57-0flang/test/Parser/acc-label-do.f90
+110-252 files

LLVM/project 7e91ef5 — libcxx/include/__algorithm pstl.h, libcxx/include/__pstl backend_fwd.h

[libc++][pstl] Implementation of parallel std::swap_ranges() based on parallel __for_each (#224967)

This PR adds an implementation of parallel `std::swap_ranges()` based on
`__parallel_for_each_iter_pair()`.

The implementation is effectively a one-liner, but has to deal with
iterator ranges, thus is located in `cpu_algos`:
```c++
__pstl::__parallel_for_each_iter_pair<_Backend>(
    first1, last1, first2,
    [](ForwardIterator1 brick_first1, ForwardIterator1 brick_last1, ForwardIterator2 brick_first2) {
        std::swap_ranges(std::move(brick_first1), std::move(brick_last1), std::move(brick_first2));
    });
```

Part of #99938
DeltaFile
+187-0libcxx/test/std/algorithms/alg.modifying.operations/alg.swap/pstl.swap_ranges.pass.cpp
+71-0libcxx/include/__pstl/cpu_algos/swap_ranges.h
+14-0libcxx/include/__algorithm/pstl.h
+10-0libcxx/include/__pstl/backends/serial.h
+7-0libcxx/test/std/algorithms/pstl.exception_handling.pass.cpp
+7-0libcxx/include/__pstl/backend_fwd.h
+296-06 files not shown
+319-012 files

LLVM/project 5aa8fcc — llvm/lib/Target/RISCV RISCVISelLowering.cpp, llvm/test/CodeGen/RISCV/rvv trunc-select-to-max-usat.ll

[RISCV] Support swapped select operands in combineTruncSelectToSMaxUSat. (#226584)

Handle (trunc (vselect (setugt X, 2^N-1), (sext (setgt X, 0)), X)) in
addition to the existing (trunc (vselect (setult X, 2^N), X,
(sext (setgt X, 0)))) form.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply at anthropic.com>
DeltaFile
+84-0llvm/test/CodeGen/RISCV/rvv/trunc-select-to-max-usat.ll
+28-20llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+112-202 files

LLVM/project ea89ca0 — clang/lib/Sema HLSLExternalSemaSource.cpp

address hekota, use the float overload helper
DeltaFile
+2-2clang/lib/Sema/HLSLExternalSemaSource.cpp
+2-21 files

LLVM/project 5cab296 — llvm/lib/CodeGen/SelectionDAG LegalizeVectorTypes.cpp, llvm/test/CodeGen/X86 llvm.frexp.ll

[SelectionDAG] Fix result index and vector width in unrollExpandedOp (#225886)

Fixes #224127.

In `DAGTypeLegalizer::WidenVectorResult`, `unrollExpandedOp` computes
the unroll count and widened vector type from the result being legalized
(`ResNo`) rather than unconditionally using result 0. For multi-result
nodes where result types differ (e.g. `ISD::FFREXP`), this prevents
mismatched vector widths and preserves the correct result index from
`DAG.UnrollVectorOp`.

Assisted-by: Claude

---------

Co-authored-by: Demetrios Chiuratto Agourakis <agourakis82 at gmail.com>
DeltaFile
+129-15llvm/test/CodeGen/X86/llvm.frexp.ll
+8-5llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
+137-202 files

LLVM/project 7fbfd20 — lldb/include/lldb/Utility StructuredData.h, lldb/source/Commands CommandObjectVersion.cpp

[lldb] Add StructuredData::Dictionary::ForEachSorted (NFC) (#226597)

`Dictionary::Serialize`, `Dictionary::GetDescription` and the build
configuration dump in `CommandObjectVersion` each collect the
dictionary's keys and sort them before iterating, so that the output
doesn't depend on StringMap's ordering. Factor that into a new
`ForEachSorted` method.

Signed-off-by: Med Ismail Bennani <ismail at bennani.ma>
DeltaFile
+17-31lldb/source/Utility/StructuredData.cpp
+16-25lldb/source/Commands/CommandObjectVersion.cpp
+17-0lldb/include/lldb/Utility/StructuredData.h
+50-563 files

LLVM/project c4195f6 — mlir/docs Interfaces.md, mlir/include/mlir/Dialect/OpenMP OpenMPOpsInterfaces.td

[mlir][ODS] Share operation interface methods with raw-op bodies (NFC) (#226317)

Allow an operation interface method to use a shared callback when its
body only needs the raw Operation. Use it for OpenMP block-argument
indexing and slicing methods, avoiding per-operation wrappers while
preserving the existing fallback and external model paths.

Reduces the size of the OpenMP dialect text section by 1.68%.

Assisted-by: Codex
DeltaFile
+49-2mlir/tools/mlir-tblgen/OpInterfacesGen.cpp
+31-11mlir/docs/Interfaces.md
+32-0mlir/test/mlir-tblgen/op-interface.td
+8-5mlir/include/mlir/Dialect/OpenMP/OpenMPOpsInterfaces.td
+120-184 files

LLVM/project 5f3a611 — utils/bazel MODULE.bazel.lock linux_uapi.bzl

[bazel] Download linux UAPI headers when no local dir is set (#216868)

This PR defines a hermetic source for `@linux_api//:linux_uapi_headers`
that will be used in CI. If no `LINUX_UAPI_INCLUDE_DIR` value is
specified, then Bazel will download the linux-libc-dev debian package
and use its headers.

I originally wanted to pull from https://github.com/torvalds/linux and
build UAPI headers from source as it gives more control, but the repo is
rather large and took ~20s to download and ~10s to build. Using the
debian package's headers is closer to what the LLVM-libc fullbuild CI
[currently
does](https://github.com/llvm/llvm-project/blob/007551bacb899a409218574908d96b0633d52018/.github/workflows/containers/libc/Dockerfile#L38)
and is very fast.
DeltaFile
+62-43utils/bazel/linux_uapi.bzl
+1-1utils/bazel/MODULE.bazel.lock
+63-442 files

LLVM/project 91d0e2e — offload/include/Shared SourceInfo.h, offload/test/offloading info.c

[Offload][OpenMP] remove SourceInfo::removePath (#226586)

This Pr is the same as https://github.com/llvm/llvm-project/pull/226283
(which was reverted in https://github.com/llvm/llvm-project/pull/226557)
This Pr is the same as https://github.com/llvm/llvm-project/pull/226283
but with an update to info.c to account for the new full path output.
DeltaFile
+12-12offload/test/offloading/info.c
+2-14offload/include/Shared/SourceInfo.h
+3-0openmp/docs/ReleaseNotes.md
+17-263 files

LLVM/project f9f5ed2 — llvm/runtimes CMakeLists.txt

[LLVM] Use complete runtime dependency list for multilibs (#226580)

Summary:
The current handling makes the multilib job depend on the base runtimes
job. This means that we will potentially depend on things that don't
necessarily need to be built to fulfil the multilibs job. Instead, just
depend on the individual targets for that multilib.
DeltaFile
+4-1llvm/runtimes/CMakeLists.txt
+4-11 files

LLVM/project b4842be — llvm/lib/CodeGen/GlobalISel CombinerHelper.cpp, llvm/test/CodeGen/AArch64/GlobalISel prelegalizercombiner-undef.mir

[GlobalISel] Preserve volatile and ordered atomic stores of undef (#226265)

Guard `erase_undef_store` with `isUnordered()`, matching InstCombine.
Ensures volatile and ordered atomic stores are preserved.

---------

Co-authored-by: Hongyu Chen <hongchen at nvidia.com>
DeltaFile
+114-0llvm/test/CodeGen/AArch64/GlobalISel/prelegalizercombiner-undef.mir
+12-16llvm/test/CodeGen/AMDGPU/invalid-addrspacecast.ll
+6-0llvm/test/CodeGen/AMDGPU/lower-work-group-id-intrinsics-pal.ll
+6-0llvm/test/CodeGen/AMDGPU/call-constant.ll
+2-1llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
+140-175 files

LLVM/project 30c41cd — llvm/lib/Transforms/Scalar SROA.cpp, llvm/test/Transforms/SROA vector-conversion.ll byte-conversion.ll

[SROA] Convert byte values
DeltaFile
+92-19llvm/lib/Transforms/Scalar/SROA.cpp
+52-58llvm/test/Transforms/SROA/byte-conversion.ll
+18-21llvm/test/Transforms/SROA/vector-conversion.ll
+162-983 files

LLVM/project da01264 — llvm/test/Transforms/SROA vector-conversion.ll byte-conversion.ll

[SROA] Pre-commit tests for byte conversions
DeltaFile
+274-0llvm/test/Transforms/SROA/byte-conversion.ll
+96-0llvm/test/Transforms/SROA/vector-conversion.ll
+370-02 files

LLVM/project 4462816 — llvm/test/CodeGen/AMDGPU llc-pipeline-npm.ll bitinsert-bitextract.ll, llvm/test/CodeGen/ARM bitinsert-bitextract-fp.ll bitinsert-bitextract.ll

Rebase, address comments, improvements

Created using spr 1.3.7
DeltaFile
+4,294-0llvm/test/CodeGen/RISCV/bitinsert-bitextract.ll
+3,321-0llvm/test/CodeGen/ARM/bitinsert-bitextract.ll
+1,989-0llvm/test/CodeGen/RISCV/bitinsert-bitextract-fp.ll
+1,976-0llvm/test/CodeGen/AMDGPU/bitinsert-bitextract.ll
+1,552-0llvm/test/CodeGen/ARM/bitinsert-bitextract-fp.ll
+478-979llvm/test/CodeGen/AMDGPU/llc-pipeline-npm.ll
+13,610-979398 files not shown
+28,698-4,916404 files

LLVM/project 1173687 — llvm/lib/Transforms/Vectorize VPlanHelpers.h VPlan.cpp

[VPlan] Use NeedsSingleScalar consistently for ::get (NFC). (#226494)

IsScalar/IsSingleScalar as used currently may be consfusing, as it could
be read as implying that the VPValue is a single-scalar, see
https://github.com/llvm/llvm-project/pull/226153.

But here it means that the caller only needs a single scalar. Update
wording.

PR: https://github.com/llvm/llvm-project/pull/226494
DeltaFile
+17-15llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
+5-5llvm/lib/Transforms/Vectorize/VPlan.cpp
+4-3llvm/lib/Transforms/Vectorize/VPlanHelpers.h
+26-233 files

LLVM/project 35df00b — llvm/lib/Analysis TypeBasedAliasAnalysis.cpp, llvm/test/Transforms/InstCombine struct-assign-tbaa.ll

[TBAA] Recover !tbaa for a memcpy of struct with same type fields (#214116)

When InstCombine widens a small same-typed aggregate copy into an
integer load/store, it derives no !tbaa, and !tbaa.struct is nulled out,
so the load/store are left untyped. An untyped access may-alias every
typed access and blocks optimization:

  struct Coord { int x, y; };
void copy_if_inbounds(Coord *dst, const Coord *src, const long *bound,
int n) {
    for (int i = 0; i < n; ++i)
      if (i < *bound)
        dst[i] = *src;   // {int,int} copy -> memcpy + !tbaa.struct
  }

compare this to field-by-field copy, which has typed field access
void copy_fields_if_inbounds(Coord *dst, const Coord *src, const long
*bound, int n) {
    for (int i = 0; i < n; ++i)

    [2 lines not shown]
DeltaFile
+67-2llvm/test/Transforms/InstCombine/struct-assign-tbaa.ll
+37-8llvm/lib/Analysis/TypeBasedAliasAnalysis.cpp
+104-102 files

LLVM/project 8af5ec6 — llvm/include/llvm/IR AutoUpgrade.h, llvm/lib/Bitcode/Reader MetadataLoader.cpp

[AutoUpgrade] Upgrade old-style !tbaa.struct field tags (#225967)

Extend the TBAA auto-upgrade to rewrite old-style scalar field tags
inside !tbaa.struct
to the struct-path aware format. bitcode (MetadataLoader) upgraded to
match the existing top-level !tbaa upgrade.
DeltaFile
+68-0llvm/test/Bitcode/upgrade-tbaa-struct.ll
+22-0llvm/lib/IR/AutoUpgrade.cpp
+5-0llvm/include/llvm/IR/AutoUpgrade.h
+3-0llvm/lib/Bitcode/Reader/MetadataLoader.cpp
+0-0llvm/test/Bitcode/upgrade-tbaa-struct.ll.bc
+98-05 files

LLVM/project 14e819f — llvm/include/llvm/Transforms/IPO InstrumentorUtils.h

[Instrumentor] Delete dead code from getAlloca() (#226331)
DeltaFile
+1-3llvm/include/llvm/Transforms/IPO/InstrumentorUtils.h
+1-31 files

LLVM/project 210ecf7 — llvm/lib/Transforms/IPO Instrumentor.cpp

[Instrumentor] Use CreateAllocationSize to compute size of alloca (#226330)

No significant functional change, but the IR might look slightly
different.
DeltaFile
+1-16llvm/lib/Transforms/IPO/Instrumentor.cpp
+1-161 files

LLVM/project 1b4e7f4 — clang/docs ReleaseNotes.md, clang/lib/Sema SemaType.cpp

[Clang] Enforce the same size limits for `vector_size` and `ext_vector_type` (#226375)

Fixes #165458

A `bool` vector declared with `ext_vector_type` isn't lowered as an LLVM
vector in memory: `ConvertTypeForMem` packs it into a single integer
with one bit per element. `BuildExtVectorType` only checked that the
element count fits in 32 bits, though, so a vector of 187,553,262 bools
got through Sema and the first consumer that needed its memory type (the
zero initializer of a tentative definition here) asked
`IntegerType::get` for far more than the 2^23 bits it supports. The
count matters for every element type, not just `bool`, because Sema also
forms bool vectors out of other vectors (`c ? true : false` with a
`char` vector condition), and `vector_size` was no better off with its
limits of 2^32 elements and 2^61 bytes.

Both attributes now go through the same two limits when the type is
built, reusing the existing "vector size too large" error: at most
`llvm::IntegerType::MAX_INT_BITS` (2^23) elements, and at most 2^28

    [2 lines not shown]
DeltaFile
+18-6clang/lib/Sema/SemaType.cpp
+12-0clang/test/Sema/types.c
+9-0clang/test/SemaCXX/vector.cpp
+6-0clang/test/Sema/large-bit-int.c
+4-0clang/docs/ReleaseNotes.md
+49-65 files

LLVM/project 405e524 — clang/test/CIR/CodeGen fp-contract.c

[CIR] Fix fp-contract.c checks for -ffp-contract=off and CIR locations

Bound the trailing CIR-OFF-NOT with a CIR-OFF check on nested_pragmas,
where float_control(precise, on) forms a cir.fmuladd even under
-ffp-contract=off. Allow the loc suffix CIR prints after each op in the
end-of-line anchors.
DeltaFile
+10-5clang/test/CIR/CodeGen/fp-contract.c
+10-51 files

LLVM/project 4db3dce — llvm/lib/Support StringRef.cpp, llvm/unittests/ADT StringRefTest.cpp

[llvm] produce a more consistent estimates of bit width needed when parsing an integer (#205947)

A colleague of mine noticed that `"12535824225335233"` parses in MLIR's
integer attribute parser as a 68-bit integer, even though it is a 53-bit
constant. I traced this back to `StringRef::consumeInteger`'s heuristic
estimate of the bit size. This change replaces that heuristic with a
default 64-bit storage, doubling the storage as more digits are parsed.
This produces a potentially larger over-estimate of the total storage
required, but does so in a less arbitrary manner and reduces the
over-approximation for numbers close to the 64-bit boundary.

Nb., A first iteration of this change tightened that estimate to at most
a 1-bit overapproximation with a lookup-table.

Assisted by Gemini
DeltaFile
+59-0llvm/unittests/ADT/StringRefTest.cpp
+21-5llvm/lib/Support/StringRef.cpp
+80-52 files

LLVM/project ae614a9 — clang/lib/Format ContinuationIndenter.cpp, clang/unittests/Format FormatTest.cpp

[clang-format] Preserve enum initializer continuation indentation (#223435)

Fixes #223011

Enum assignment operators are annotated as TT_EnumEqual so they can be
aligned independently in #194154. However, this means
ContinuationIndenter no longer recognizes a wrapped enum `=` as
TT_BinaryOperator. As a result, it may force unnecessary breaks within
the RHS binary expression.

Co-authored-by: Aaron Saw Min Sern <aaron at aaronsms.com>
DeltaFile
+10-0clang/unittests/Format/FormatTest.cpp
+2-2clang/lib/Format/ContinuationIndenter.cpp
+12-22 files

LLVM/project ee3b6b0 — flang/lib/Lower/OpenMP ClauseProcessor.cpp Utils.h, flang/test/Lower/OpenMP declare-mapper.f90 target-map-nested-dtype-allocatable-member.f90

[Flang][OpenMP] Fix broken offload test caused by MapInfoFinalization code movement (#226384)

This change addresses the breakage in
target-map-nested-dtype-allocatable-member.f90 I inadvertently broke it
by removing the excess bit of implicit mapping code in the
MapInfoFinalizaiton pass without correctly addressing it.

This PR tries to do so by allowing mappers to be generated for member
maps such as var1%b, var2%b, which were previously being blocked.

Currently (and conveniently for this patch) we do avoid duplicate maps
in the scenario where we specify something along the lines of:

map(tofrom: var1, var1%b, var2, var2%b)

But that is through the fact that we completely negate var1/var2's
mapper attachment in this scenario, which I do not believe is the
correct behavior. But it's the existing behavior and facilitates this
patch, but it is something I'll see if I can address in a follow up PR

    [2 lines not shown]
DeltaFile
+31-0flang/test/Lower/OpenMP/target-map-nested-dtype-allocatable-member.f90
+8-10flang/lib/Lower/OpenMP/Utils.cpp
+6-10flang/lib/Lower/OpenMP/Utils.h
+1-1flang/test/Lower/OpenMP/declare-mapper.f90
+1-1flang/lib/Lower/OpenMP/ClauseProcessor.cpp
+47-225 files

LLVM/project e4af48b — llvm/lib/Transforms/Scalar LoopFuse.cpp, llvm/test/Transforms/LoopFusion guard_skip_empty_block.ll

[LoopFusion] Cleanup control flow before Fusion (#226289)

Non-loop successor of loop guard is sometimes modified by JumpThreading
(and potentially some other passes) to jump to a new block, that doesn't
post dominate the exit block of the loop:

   Guard:    br %c, %Preheader, %Skip
   Skip:     br %Merge
   ...
   Exit:     br %Merge
   Merge:    ...

Later on, this block becomes empty, so it can be removed. Its presence
prevents Loop::getLoopGuardBranch() from detecting the loop guard which
results in missed fusion opportunities. SimplifyCFG will run when "Skip"
is still not optimzied, so it cannot resolve this issue.

Assisted by Claude Code
DeltaFile
+389-0llvm/test/Transforms/LoopFusion/guard_skip_empty_block.ll
+87-0llvm/lib/Transforms/Scalar/LoopFuse.cpp
+476-02 files

LLVM/project 3bb794c — clang/include/clang/CIR/Dialect/Builder CIRBaseBuilder.h, clang/include/clang/CIR/Dialect/IR CIROps.td

[CIR] Keep fast-math flags on the CIR builder and address review

Drop the process-wide OpBuilder registry. CIRBaseBuilderTy now holds the
fast-math flags next to the constrained-FP state, the same way IRBuilder
does in classic CodeGen:

- CIRGenFunction::setFastMathFlags derives the flags from FPOptions (only
  `contract` for now) and is called from the constructor and from
  CIRGenFPOptionsRAII, which restores them like classic CodeGen's FMFGuard.
  ConstrainedFPRAII restores them for nested CIRGenFunctions.
- createFAdd/FSub/FMul/FDiv/FRem go through one createFPBinOp helper that
  attaches both fenv and fastmath_flags.
- Scope is limited to the FP binary ops. fneg, cmp/vec.cmp and the FP
  builtins are left for follow-ups.
- The generated lowering passes op.getFastmathFlagsAttr() instead of
  looking the attribute up by name.

Tests cover -ffp-contract=fast-honor-pragmas, nested pragmas with state
restored after each scope, strict FP combined with contract, and a vector
op.
DeltaFile
+61-81clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+0-138clang/test/CIR/CodeGen/fp-contract-fast.c
+121-2clang/test/CIR/CodeGen/fp-contract.c
+31-80clang/include/clang/CIR/Dialect/Builder/CIRBaseBuilder.h
+31-69clang/include/clang/CIR/Dialect/IR/CIROps.td
+13-47clang/test/CIR/CodeGenCUDA/fp-contract.cu
+257-41713 files not shown
+327-61719 files

LLVM/project 08af99f — llvm/include/llvm/CodeGen SDPatternMatch.h

[SDPatternMatch] Implement m_True/False using SelectionDAG::isBoolConstant. (#226216)

Better than duplicating existing functionality.
DeltaFile
+13-36llvm/include/llvm/CodeGen/SDPatternMatch.h
+13-361 files

LLVM/project f57595f — llvm/lib/Transforms/Vectorize VPlanVerifier.cpp, llvm/unittests/Transforms/Vectorize VPlanVerifierTest.cpp

[VPlan] Only exempt MaskedCond from cross-block dominance in verifier. (#226512)

Previously the verifier skipped all use-before-def checks for
MaskedCond, including uses in the same block before the definition.
Restrict the exemption to users in blocks not dominated by the 
MaskedCond's block, so same-block use-before-def is still diagnosed.
DeltaFile
+18-0llvm/unittests/Transforms/Vectorize/VPlanVerifierTest.cpp
+5-6llvm/lib/Transforms/Vectorize/VPlanVerifier.cpp
+23-62 files

LLVM/project 8d43d09 — llvm/test/Transforms/SROA vector-conversion.ll byte-conversion-nonintegral.ll

[SROA] Pre-commit tests for byte conversions
DeltaFile
+223-0llvm/test/Transforms/SROA/byte-conversion.ll
+86-0llvm/test/Transforms/SROA/byte-conversion-big-endian.ll
+48-0llvm/test/Transforms/SROA/byte-conversion-nonintegral.ll
+34-0llvm/test/Transforms/SROA/vector-conversion.ll
+391-04 files

LLVM/project 4351bcc — llvm/lib/Transforms/Scalar SROA.cpp, llvm/test/Transforms/SROA byte-conversion-nonintegral.ll vector-conversion.ll

[SROA] Convert byte values
DeltaFile
+100-14llvm/lib/Transforms/Scalar/SROA.cpp
+13-35llvm/test/Transforms/SROA/byte-conversion.ll
+7-21llvm/test/Transforms/SROA/byte-conversion-big-endian.ll
+12-10llvm/test/Transforms/SROA/vector-conversion.ll
+1-3llvm/test/Transforms/SROA/byte-conversion-nonintegral.ll
+133-835 files