LLVM/project be86221libcxx/include/__algorithm any_of.h

[libc++] Implement any_of in terms of find_if (#207274)

This way, any optimizations in find_if will be picked up by any_of.

Closes #129310
DeltaFile
+9-7libcxx/include/__algorithm/any_of.h
+9-71 files

LLVM/project b142e77llvm/lib/Target/AMDGPU AMDGPURegBankCombiner.cpp, llvm/test/CodeGen/AMDGPU/GlobalISel clamp-minmax-const-combine.ll regbankcombiner-clamp-minmax-const.mir

[AMDGPU][GlobalISel] Don't combine uniform fmin/max into clamp/fmed3 (#211456)

Uniform fmin/fmax/fmed3 makes the reg-bank combiner produce a
clamp/fmed3 with an sgpr-banked destination. As these clamp/fmed3 only
have VALU selection patterns, the sgpr bank cannot be selected. Only
combine when the destination is vgpr-banked.
DeltaFile
+92-0llvm/test/CodeGen/AMDGPU/GlobalISel/clamp-minmax-const-combine.ll
+64-0llvm/test/CodeGen/AMDGPU/GlobalISel/regbankcombiner-clamp-minmax-const.mir
+12-0llvm/lib/Target/AMDGPU/AMDGPURegBankCombiner.cpp
+168-03 files

LLVM/project 6245690llvm/lib/Target/PowerPC PPCISelLowering.cpp, llvm/test/CodeGen/PowerPC fp-classify-nan.ll

[PowerPC] improve performance on the isNan and !isNan function  in case of -ffp-model=strict (#204170)

For the IR representation:

isnan(x) → %0 = tail call noundef i1 @llvm.is.fpclass.f64(double %x, i32
3)
!isnan(x) → %0 = tail call noundef i1 @llvm.is.fpclass.f64(double %x,
i32 1020)

Under `-ffp-model=strict`, the generic
TargetLowering::expandIS_FPCLASS() is used to lower these when
Subtarget.hasP9Vector() && Subtarget.useCRBits() is false. However,
PowerPC has more optimal assembly sequences for isnan(x) and !isnan(x)
on POWER7/8 and generic PPC targets.
We implement a custom lowering for isnan(x) and !isnan(x) under
`-ffp-model=strict`, using `fcmpu `for POWER7/8 and generic PPC targets,
and` xscmpudp` for targets where VSX is available.
DeltaFile
+126-0llvm/test/CodeGen/PowerPC/fp-classify-nan.ll
+66-6llvm/lib/Target/PowerPC/PPCISelLowering.cpp
+192-62 files

LLVM/project d1d3891libunwind/test aarch64_za_unwind.pass.cpp

[libunwind] XFAIL the za unwind test on Apple targets older than OS 27.0 (#211379)

When linking against the system unwinder on macOS < 27, the test
fails on platforms that support SME.
DeltaFile
+4-0libunwind/test/aarch64_za_unwind.pass.cpp
+4-01 files

LLVM/project 882a138libcxx/test/tools/clang_tidy_checks robust_against_operator_ampersand.cpp

[libc++] Remove workaround for Clang < 20 in clang-tidy plugin (#211314)

The clang-tidy plugin is now always built with Clang >= 20, so the
workaround can be removed.
DeltaFile
+0-8libcxx/test/tools/clang_tidy_checks/robust_against_operator_ampersand.cpp
+0-81 files

LLVM/project a72f10dllvm/docs ReleaseNotes.md

[docs] Add BOLT release notes
DeltaFile
+14-0llvm/docs/ReleaseNotes.md
+14-01 files

LLVM/project dbee31aflang/lib/Lower/OpenMP OpenMP.cpp

format
DeltaFile
+6-2flang/lib/Lower/OpenMP/OpenMP.cpp
+6-21 files

LLVM/project 70b6743llvm/lib/Target/AArch64 AArch64TargetTransformInfo.cpp, llvm/test/Analysis/CostModel/AArch64 ctpop.ll

[AArch64] Add a ctpop cost with CSSC (#211189)

FEAT_CSSC adds a CNT instruction that can perform ctpop. This adds a
specific cost for it to prevent us from using the neon cost.
DeltaFile
+15-10llvm/test/Analysis/CostModel/AArch64/ctpop.ll
+8-2llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
+23-122 files

LLVM/project 9440472clang/test/Driver/flang multiple-inputs-mixed.f90 runtimes.f90

Revert "[NFC][clang][Driver] Add tests for --driver-mode=flang"

Reverts llvm/llvm-project#207658 due to buildbot failure
DeltaFile
+0-22clang/test/Driver/flang/multiple-inputs-mixed.f90
+0-8clang/test/Driver/flang/runtimes.f90
+0-302 files

LLVM/project bd3546elldb/packages/Python/lldbsuite/test/tools/lldb_dap testcase.py, lldb/test/API/tools/lldb-dap/attach TestDAP_attach.py TestDAP_attachByPortNum.py

[lldb-dap] Migrate DAP attach tests. (#210814)

Address some issues with the previous tests.

- Always wait for the continued event after sending a continue request.
since the continue response is just an acknowlegement that we send a
continue packet.

- Retry reading stdin if it has an error when the debugger attaches.

- Update and enable the attachByPortNum test, this may now run on NetBSD
and Windows. will try to enable in a different PR.
DeltaFile
+100-95lldb/test/API/tools/lldb-dap/attach/TestDAP_attach.py
+73-106lldb/test/API/tools/lldb-dap/attach/TestDAP_attachByPortNum.py
+79-73lldb/test/API/tools/lldb-dap/attach-commands/TestDAP_attachCommands.py
+27-1lldb/packages/Python/lldbsuite/test/tools/lldb_dap/testcase.py
+8-17lldb/test/API/tools/lldb-dap/attach-commands/main.c
+15-4lldb/test/API/tools/lldb-dap/attach/main.c
+302-2962 files not shown
+326-3018 files

LLVM/project 728522blldb/test/API/tools/lldb-dap/step TestDAP_step.py, lldb/test/API/tools/lldb-dap/stepInTargets TestDAP_stepInTargets.py

[lldb-dap] Miragte the DAP step and stop hooks tests (#209936)

Migrated Tests:

- TestDAP_step.py
- TestDAP_stepInTargets.py
- TestDAP_stop_hooks.py
DeltaFile
+74-82lldb/test/API/tools/lldb-dap/step/TestDAP_step.py
+41-75lldb/test/API/tools/lldb-dap/stepInTargets/TestDAP_stepInTargets.py
+11-9lldb/test/API/tools/lldb-dap/stop-hooks/TestDAP_stop_hooks.py
+126-1663 files

LLVM/project d3ef62bllvm/docs ReleaseNotes.md

[docs] Add BOLT release notes
DeltaFile
+10-0llvm/docs/ReleaseNotes.md
+10-01 files

LLVM/project e635f27llvm/include/llvm/Analysis VecFuncs.def, llvm/test/Transforms/LoopVectorize/X86 libm-vector-calls.ll

[TLI] Add x86 libmvec mappings for GLIBC 2.35 vector functions (#206274)

## Summary

glibc 2.35 extended x86_64 libmvec with vector implementations of `erf`,
`erfc`,
`cbrt`, `expm1`, `log1p`, `asinh`, `acosh` and `atanh` (among others),
but LLVM's
`LIBMVEC_X86` table in `VecFuncs.def` was never updated past the
original glibc-2.22
set. As a result `clang -fveclib=libmvec` cannot vectorize loops over
these functions
on x86_64, even though the vector symbols are present in the linked
`libmvec.so`. The
AArch64 libmvec table already maps several of them.

This patch adds the x86 mappings for the 8 GLIBC-2.35 functions that
have **no
corresponding LLVM intrinsic** (pure named/TLI mappings). The

    [48 lines not shown]
DeltaFile
+440-0llvm/test/Transforms/LoopVectorize/X86/libm-vector-calls.ll
+50-0llvm/include/llvm/Analysis/VecFuncs.def
+490-02 files

LLVM/project d4427f7llvm/tools/llubi llubi.cpp, llvm/tools/llubi/lib Value.h ExecutorBase.h

[llubi][NFC] Use context-aware value printer (#211275)

As discussed in
https://github.com/llvm/llvm-project/pull/200672#discussion_r3624927046,
we need information from the global state to provide a better debugging
representation of byte SSA values.

This patch adds a wrapper to pass `Context&` into the actual printer.
DeltaFile
+17-13llvm/tools/llubi/llubi.cpp
+17-5llvm/tools/llubi/lib/Value.h
+3-2llvm/tools/llubi/lib/ExecutorBase.h
+2-2llvm/tools/llubi/lib/Value.cpp
+39-224 files

LLVM/project cb383a3clang/include/clang/Basic ABIVersions.def, clang/lib/Basic/Targets X86.cpp X86.h

[Clang][X86] Introduce Clang ABI Gate for MSVC alignment (#210305)

On x86_64-windows-msvc after 8ecec455183f, clang applies the MSVC
size-based global-alignment scheme (Microsoft64BitMinGlobalAlign) and
does not apply the Sys V "large array" alignment increase. Users may
want to preserve the earlier ABI for compatibility with objects produced
by older clang releases.

Gate this behavior on the Clang ABI compatibility level. When
`-fclang-abi-compat=22` (or lower) is in effect,
MicrosoftX86_64TargetInfo restores LargeArrayMinWidth/LargeArrayAlign to
128 and getMinGlobalAlign skips the Microsoft64BitMinGlobalAlign step,
matching the older alignment choices.

Assisted by Claude (Anthropic).
DeltaFile
+19-0clang/lib/Basic/Targets/X86.cpp
+7-2clang/include/clang/Basic/ABIVersions.def
+8-0clang/lib/Basic/Targets/X86.h
+8-0clang/test/CodeGenCXX/ms-constexpr-static-data-member.cpp
+2-0clang/test/CodeGen/align-x68_64.c
+44-25 files

LLVM/project 4929161flang/lib/Semantics check-omp-structure.cpp check-omp-structure.h, llvm/include/llvm/Frontend/OpenMP OMP.td

[flang][OpenMP] Switch TableGen generation to use llvm::EnumSet

Replace the remaining uses of the common::EnumSet-based OmpClauseSet to
llvm::omp::ClauseSet.
DeltaFile
+21-24flang/lib/Semantics/check-omp-structure.cpp
+3-8flang/lib/Semantics/check-omp-structure.h
+1-1llvm/include/llvm/Frontend/OpenMP/OMP.td
+25-333 files

LLVM/project 8280189flang/lib/Semantics check-directive-structure.h check-omp-structure.cpp

[flang] Provide "clause set" type as parameter to DirectiveStructureChecker

This will remove the hardcoded dependence of DirectiveStructureChecker on
the common::EnumSet class. Both consumers of it will be able to use their
own type for the clause set.

The only complication was the ClauseSetToString member function, whose
implementation depended on the specifics of common::EnumSet, namely the
IterateOverMembers member function. It was moved out of the class, and
turned into a function template to make it possible to provide different
specializations for common::EnumSet and llvm::EnumSet.
DeltaFile
+59-75flang/lib/Semantics/check-directive-structure.h
+14-1flang/lib/Semantics/check-omp-structure.cpp
+12-0flang/lib/Semantics/check-acc-structure.cpp
+5-1flang/lib/Semantics/check-acc-structure.h
+5-1flang/lib/Semantics/check-omp-structure.h
+95-785 files

LLVM/project a330cd3flang/include/flang/Semantics openmp-directive-sets.h, flang/lib/Lower/OpenMP OpenMP.cpp

[flang][OpenMP] Use llvm::omp::DirectiveSet instead of common::EnumSet

Replace uses of OmpDirectiveSet (defined in terms of common::EnumSet)
with the common llvm::omp::DirectiveSet (defined via llvm::EnumSet).

The llvm::omp::DirectiveSet class will also be used in openmp-parsers,
where OmpDirectiveSet was an instance of llvm::Bitset.
DeltaFile
+58-60flang/include/flang/Semantics/openmp-directive-sets.h
+23-24flang/lib/Lower/OpenMP/OpenMP.cpp
+21-23flang/lib/Parser/openmp-parsers.cpp
+10-9flang/lib/Semantics/check-omp-structure.cpp
+2-2flang/lib/Semantics/check-omp-structure.h
+1-1flang/lib/Semantics/check-omp-loop.cpp
+115-1191 files not shown
+117-1197 files

LLVM/project 1046179flang/include/flang/Semantics symbol.h, flang/lib/Semantics resolve-directives.cpp check-omp-structure.h

[flang][OpenMP] Use llvm::omp::ClauseSet instead of common::EnumSet

Replace uses of OmpClauseSet (defined in terms of common::EnumSet)
with the common llvm::omp::ClauseSet (defined via llvm::EnumSet).
DeltaFile
+18-19flang/lib/Semantics/resolve-directives.cpp
+17-14flang/include/flang/Semantics/symbol.h
+10-9flang/lib/Semantics/check-omp-structure.h
+8-9flang/lib/Semantics/symbol.cpp
+5-5flang/lib/Semantics/mod-file.cpp
+3-3flang/lib/Semantics/check-omp-structure.cpp
+61-593 files not shown
+66-619 files

LLVM/project 568f4d9llvm/include/llvm/Frontend/OpenMP OMP.h

Add some static helper members
DeltaFile
+3-0llvm/include/llvm/Frontend/OpenMP/OMP.h
+3-01 files

LLVM/project 1b3586cllvm/unittests/Frontend EnumSetTest.cpp

Add preamble
DeltaFile
+8-0llvm/unittests/Frontend/EnumSetTest.cpp
+8-01 files

LLVM/project b155590llvm/unittests/Frontend EnumSetTest.cpp CMakeLists.txt

Add unit test
DeltaFile
+134-0llvm/unittests/Frontend/EnumSetTest.cpp
+1-0llvm/unittests/Frontend/CMakeLists.txt
+135-02 files

LLVM/project ff767f1llvm/include/llvm/Frontend/OpenMP OMP.h

[OpenMP] Implement EnumSet container

This is close to flang's common::EnumSet with the difference being that
it provides forward iterators.

The reason for having an implementation that is separate from
common::EnumSet is that this is intended to be shared for all consumers
of llvm/lib/Frontend/OpenMP. This class is also planned to be one of the
core containers for representing auto-generated OpenMP data in the future.
DeltaFile
+104-0llvm/include/llvm/Frontend/OpenMP/OMP.h
+104-01 files

LLVM/project eb992b7llvm/lib/Target/SPIRV SPIRVInstructionSelector.cpp SPIRVLegalizerInfo.cpp, llvm/test/CodeGen/SPIRV/llvm-intrinsics ldexp-glsl.ll ldexp.ll

[SPIRV] Lower llvm.ldexp via OpenCL/GLSL ldexp ext-inst (#195402)

## Summary

The SPIR-V backend handled only `G_STRICT_FLDEXP` (from
`llvm.experimental.constrained.ldexp`). Plain `Intrinsic::ldexp` lowers
to `G_FLDEXP` in `IRTranslator.cpp`, so device code that calls `ldexp()`
(or any libcall lowered to `llvm.ldexp.*`, including `scalbn`,
`scalbln`, integer-exponent `exp2`) failed legalization with `unable to
legalize instruction: G_FLDEXP`.

## Change

- `SPIRVLegalizerInfo.cpp`: extend the existing legalizer rule from
`{G_STRICT_FLDEXP}` to `{G_FLDEXP, G_STRICT_FLDEXP}`, sharing the same
`(allFloatScalarsAndVectors, allIntScalars)` cartesian product.
- `SPIRVInstructionSelector.cpp`: add a `case TargetOpcode::G_FLDEXP:`
next to the strict case, both selecting `selectExtInst(..., CL::ldexp,
GL::Ldexp)`. The `GL::Ldexp` opcode (53) was already declared in

    [10 lines not shown]
DeltaFile
+44-0llvm/test/CodeGen/SPIRV/llvm-intrinsics/ldexp-glsl.ll
+37-0llvm/test/CodeGen/SPIRV/llvm-intrinsics/ldexp.ll
+36-1llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp
+1-1llvm/lib/Target/SPIRV/SPIRVLegalizerInfo.cpp
+118-24 files

LLVM/project a65df8apolly/lib/Analysis DependenceInfo.cpp

[Polly] Fix memory leak in DependenceAnalysis::Result::abandonDepende… (#211514)

abandonDependences() uses unique_ptr::release() which releases
ownership without freeing the Dependences object, causing a memory
leak. Use unique_ptr::reset() instead to properly delete the object
before nullifying the pointer.

The issue was found when AddressSanitizer is enabled in the build.
DeltaFile
+1-1polly/lib/Analysis/DependenceInfo.cpp
+1-11 files

LLVM/project 8fb7dfellvm/lib/Target/SPIRV SPIRVStructurizer.cpp

[SPIR-V] Cache PartialOrderingVisitor in Splitter instead of rebuilding per call (#211198)
DeltaFile
+7-12llvm/lib/Target/SPIRV/SPIRVStructurizer.cpp
+7-121 files

LLVM/project 03e8192clang/test/Driver/flang multiple-inputs-mixed.f90 runtimes.f90

Revert "[NFC][clang][Driver] Add tests for --driver-mode=flang (#207658)"

This reverts commit d814be1bb794baf0650158a6bd1dda23f4f86e99.
DeltaFile
+0-22clang/test/Driver/flang/multiple-inputs-mixed.f90
+0-8clang/test/Driver/flang/runtimes.f90
+0-302 files

LLVM/project a7d2602libcxx/docs ReleaseProcedure.rst

[libc++] Update release procedure for libc++ & friends (#210383)

The release procedure implied that some tasks were done by the release
manager, but in practice they are done by the libc++ developers.

Also, mention using the `llvm-premerge-libcxx-release-runners` runner
set on the release branch, which was overlooked in the previous notes.

Other than that, minor reformulations.
DeltaFile
+13-24libcxx/docs/ReleaseProcedure.rst
+13-241 files

LLVM/project b0b0a53clang/lib/Serialization ASTReader.cpp ASTWriter.cpp, clang/test/CodeGen/SystemZ zos-check-lanuage.c

Write original source language when writing and reading AST (#209353)

FAIL: Clang :: Frontend/ast-main.c
FAIL: Clang :: Frontend/ast-main.cpp

were failing on z/OS; this change fixes these lit failures.

The issue here is that on z/OS the original source code language needs
to be passed through to the IR so that the backend can encode this
information in the PPA2 in the object file. That means that it needs to
be exported to the AST so that going from saved AST -> IR will carry the
language through.
DeltaFile
+27-0clang/test/CodeGen/SystemZ/zos-check-lanuage.c
+1-0clang/lib/Serialization/ASTReader.cpp
+1-0clang/lib/Serialization/ASTWriter.cpp
+29-03 files

LLVM/project 144595fllvm/lib/CodeGen/SelectionDAG TargetLowering.cpp, llvm/test/CodeGen/AArch64 smul_fix_sat.ll umul_fix_sat.ll

[SelectionDAG][AArch64][X86] Don't scalarize vector smul.fix.sat/umul.fix.sat (#209351)

Vector SMULFIXSAT/UMULFIXSAT were not handled by expandFixedPointMul in
the vector legalizer (a FIXME) and were unrolled to per-lane scalar
code: a single <8 x i16> smul.fix.sat was ~100 instructions on both
AArch64 and x86.

Expand the saturating variants like the non-saturating ones, and build
the saturation clamp with SETCC + VSELECT for vector types so it stays
vectorized instead of being scalarized by SELECT_CC legalization. Scalar
lowering is unchanged: the clamp change is guarded on isVector(), so
scalar fixed-point codegen on every target is bit-identical.

Additionally custom-lower SMULFIXSAT on AArch64 for scale == eltbits-1,
which is exactly sqdmulh, to a single instruction.

To the FIXME note - results in a ~12x speedup over the unroll fallback.

AI was used in the making of this PR, and if its feedback is to be

    [2 lines not shown]
DeltaFile
+111-585llvm/test/CodeGen/AArch64/smul_fix_sat.ll
+71-463llvm/test/CodeGen/AArch64/umul_fix_sat.ll
+62-114llvm/test/CodeGen/X86/smul_fix_sat.ll
+31-88llvm/test/CodeGen/X86/vector-mulfix-legalize.ll
+17-77llvm/test/CodeGen/X86/umul_fix_sat.ll
+22-16llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+314-1,3431 files not shown
+316-1,3507 files