LLVM/project 3cfce5fllvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/PhaseOrdering/AArch64 reduce_submuladd.ll

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+219-41llvm/test/Transforms/SLPVectorizer/insert-element-build-vector.ll
+219-41llvm/test/Transforms/SLPVectorizer/insert-element-build-vector-inseltpoison.ll
+137-42llvm/test/Transforms/SLPVectorizer/X86/dot-product.ll
+138-30llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+31-98llvm/test/Transforms/PhaseOrdering/AArch64/reduce_submuladd.ll
+44-56llvm/test/Transforms/SLPVectorizer/X86/horizontal-list.ll
+788-30836 files not shown
+1,088-76342 files

LLVM/project 45fa0a1clang/test/Driver crash-ir-repro.cpp

[Clang][Driver] Reenable test on UBSan/HWAsan (#199448)

It passes locally, presumably due to
15488a7f78ce7b9ae3c06b031134e5cb339b335c fixing the behavior here.
DeltaFile
+0-5clang/test/Driver/crash-ir-repro.cpp
+0-51 files

LLVM/project 25db538.github/workflows docs.yml release-doxygen.yml, llvm/docs requirements.txt requirements-hashed.txt

workflows: Require hashed dependencies when installing docs dependencies (#197306)
DeltaFile
+371-10llvm/docs/requirements.txt
+0-371llvm/docs/requirements-hashed.txt
+10-0llvm/docs/requirements.txt.in
+2-2.github/workflows/docs.yml
+1-1.github/workflows/release-doxygen.yml
+1-1.github/workflows/release-documentation.yml
+385-3856 files

LLVM/project 3f561eallvm/lib/Transforms/Vectorize LoopVectorize.cpp, llvm/test/Transforms/LoopVectorize select-cmp-blend-chain.ll

[LV] Handle chained selects/blends when creating new rdx chain. (#199443)

Make sure we recursively clone chains of selects/blends when re-creating
a reduction chain with new types.

Fixes https://github.com/llvm/llvm-project/issues/199406.
DeltaFile
+284-0llvm/test/Transforms/LoopVectorize/select-cmp-blend-chain.ll
+25-24llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+309-242 files

LLVM/project aa86415.github/workflows/unprivileged-download-artifact action.yml

workflows/unprivileged-download-artifact: Remove template expansion (#199107)

https://github.com/llvm/llvm-project/security/code-scanning/1749
https://github.com/llvm/llvm-project/security/code-scanning/1752
https://github.com/llvm/llvm-project/security/code-scanning/1753
https://github.com/llvm/llvm-project/security/code-scanning/1879
https://github.com/llvm/llvm-project/security/code-scanning/1880
DeltaFile
+17-9.github/workflows/unprivileged-download-artifact/action.yml
+17-91 files

LLVM/project 1503b86llvm/lib/Target/AArch64 AArch64SchedCyclone.td

[NFC][AArch64][Cyclone] Model WriteSTP with a local SchedWriteRes (#198844)

Cyclone scheduling model uses SchedAlias between 2 SchedWriteRes
definitions from AArch64Schedule.td.
This prevents other scheduling models from aliasing WriteSTP. This patch
address the issue by defining a new CyWriteSTP and using that instead.
DeltaFile
+6-1llvm/lib/Target/AArch64/AArch64SchedCyclone.td
+6-11 files

LLVM/project 0068f46llvm/lib/Transforms/Vectorize LoopVectorizationPlanner.h VPlanUtils.cpp

[VPlan] Simplify VPSCEVExpander, clarify naming/comments (NFC). (#199423)

Address post-commit comments from
https://github.com/llvm/llvm-project/pull/189455,
removing unneeded member, and clarify naming/comments to stress the
current logic tries to expand a SCEV to VPInstructions, with only a small 
sub-set of SCEV expression supported.
DeltaFile
+9-10llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h
+4-6llvm/lib/Transforms/Vectorize/VPlanUtils.cpp
+2-2llvm/lib/Transforms/Vectorize/VPlanConstruction.cpp
+1-1llvm/lib/Transforms/Vectorize/VPlanTransforms.h
+16-194 files

LLVM/project bb02cabllvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/RISCV ordered-reduction.ll

[SLP] Ensure TreeCost is scaled for ordered fadd reductions (#199388)

Resolves #199267

Addresses an issue where `getScaleToLoopIterations()` can return 1 on
isolated SLP trees because `UserTreeIndex` is invalid. This prevents
`TreeCost` from scaling alongside `ReductionCost`, causing the cost
model to incorrectly treat an unprofitable vector reduction as
profitable.

This patch passes the reduction root instruction down into
`calculateTreeCostAndTrimNonProfitable` and the underlying scale
calculation so `getScaleToLoopIterations` can get the correct block
context.
DeltaFile
+18-10llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+7-9llvm/test/Transforms/SLPVectorizer/RISCV/ordered-reduction.ll
+25-192 files

LLVM/project 133ad80llvm/lib/CodeGen CodeGenPrepare.cpp, llvm/test/Transforms/CodeGenPrepare/X86 null-psi-no-crash.ll

[CodeGenPrepare] Report an error if ProfileSummaryAnalysis is not available (#199268)

CodeGenPreparePass can't declare ProfileSummaryAnalysis as required,
because PSA is a module-level analysis, but CFP is a function-level pass.
Therefore it accesses PSA using getCachedResult, and PSA might be null.

In practice this doesn't happen, because the CGP pass pipeline
preparation code ensures that PSA is present. But if you invoke
CGP via opt -passes=codegenprepare, then it's not
there, and we segfault.

Fix for https://github.com/llvm/llvm-project/issues/173360.

This bug was found by a large run of Opus 4.7 looking for bugs in LLVM.
DeltaFile
+8-0llvm/test/Transforms/CodeGenPrepare/X86/null-psi-no-crash.ll
+3-0llvm/lib/CodeGen/CodeGenPrepare.cpp
+11-02 files

LLVM/project eceae62clang/lib/CIR/CodeGen CIRGenBuiltinAArch64.cpp, clang/test/CodeGen/AArch64/neon getset.c

[clang][CIR][nfc] Remove redundant code + update run lines (#199049)

This is just a minor clean-up post #186119.
DeltaFile
+3-3clang/test/CodeGen/AArch64/neon/getset.c
+0-4clang/lib/CIR/CodeGen/CIRGenBuiltinAArch64.cpp
+3-72 files

LLVM/project 6302439llvm/include/llvm/ADT DenseMap.h, llvm/lib/Analysis ScalarEvolution.cpp

[llvm,clang] Don't assume non-erased DenseMap entries remain valid after erase. NFC (#198982)

In preparation for switching DenseMap from tombstone deletion to
backward-shift deletion, update call sites that reuse an iterator or a
bucket reference after erasing another entry from the same map.

These work under tombstone deletion because unrelated buckets stay put,
but backward-shift deletion relocates entries to close the gap.

Add DenseMap::remove_if, similar to SmallPtrSet::remove_if, as
replacement for erase-while-iterating, and use it where applicable.

Aided by Claude Opus 4.7
DeltaFile
+45-0llvm/unittests/ADT/DenseMapTest.cpp
+13-27llvm/lib/IR/LegacyPassManager.cpp
+27-0llvm/include/llvm/ADT/DenseMap.h
+5-17llvm/lib/Analysis/ScalarEvolution.cpp
+8-13llvm/lib/ExecutionEngine/Orc/Core.cpp
+8-11llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
+106-6818 files not shown
+212-13424 files

LLVM/project 69a5cf5clang/lib/Analysis/LifetimeSafety Checker.cpp, clang/test/Sema warn-lifetime-safety-suggestions.cpp warn-lifetime-safety-misplaced-lifetimebound-cross-tu.cpp

[LifetimeSafety] Extend suggestions for `lifetimebound` to also warn on canonical declarations  (#198784)

With this patch, we suggest adding the `clang::lifetimebound` attribute
on the canonical declaration and on the earliest redeclaration in each
other file, preserving diagnostics for declarations visible from other
translation units while avoiding duplicate suggestions within the same
file.

Fixes #198624
Fixes #198628
DeltaFile
+62-76clang/lib/Analysis/LifetimeSafety/Checker.cpp
+67-12clang/test/Sema/warn-lifetime-safety-suggestions.cpp
+14-0clang/test/Sema/warn-lifetime-safety-misplaced-lifetimebound-cross-tu.cpp
+4-5clang/test/Sema/warn-lifetime-safety-fixits.cpp
+6-0clang/test/Sema/warn-lifetime-safety-misplaced-lifetimebound-intra-tu.cpp
+153-935 files

LLVM/project 074b6bellvm/test/Transforms/SLPVectorizer/X86 arith-mul-smulo.ll arith-add-saddo.ll

[SLP] Vectorize struct-returning intrinsics

Allow SLP to combine across lanes calls that return a literal struct
(llvm.sincos, llvm.*.with.overflow, llvm.frexp, ...) into a single
call returning a struct of vectors, by widening {T, T, ...} to
{<VF x T>, ...} via VectorTypeUtils and emitting extractvalue +
extractelement for external uses.

Original Pull Request: https://github.com/llvm/llvm-project/pull/195521

Original Pull Request2: https://github.com/llvm/llvm-project/pull/196756

Recommit after revert https://github.com/llvm/llvm-project/pull/198265#event-25652008254

Added check for valid vectorizable type, small corner cases fixes

Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/199433
DeltaFile
+549-615llvm/test/Transforms/SLPVectorizer/X86/arith-mul-smulo.ll
+449-615llvm/test/Transforms/SLPVectorizer/X86/arith-add-saddo.ll
+449-615llvm/test/Transforms/SLPVectorizer/X86/arith-sub-usubo.ll
+449-615llvm/test/Transforms/SLPVectorizer/X86/arith-sub-ssubo.ll
+449-615llvm/test/Transforms/SLPVectorizer/X86/arith-add-uaddo.ll
+429-615llvm/test/Transforms/SLPVectorizer/X86/arith-mul-umulo.ll
+2,774-3,6908 files not shown
+3,775-3,88014 files

LLVM/project fb9c9ebllvm/lib/Target/X86/GISel X86InstructionSelector.cpp, llvm/test/CodeGen/X86/GlobalISel add-scalar.ll sub-scalar.ll

[X86][GISel] Fix carry-in for selectUAddSub. (#199261)

When G_UADDE/G_USUBE was chained off a previous G_UADDE/G_UADDO/
G_USUBE/G_USUBO, selectUAddSub re-materialized EFLAGS.CF from the
previous SETB byte using CMP r, 1. That computes (r - 1) and sets
CF iff r < 1 unsigned, i.e. CF = (r == 0) -- the inverse of the
desired carry. The following ADC/SBB then consumed the wrong CF and
produced an off-by-one upper word; e.g. `add i128 0xFF..FF, 1` under
-global-isel returned hi=0 lo=0 instead of hi=1 lo=0.

Emit NEG r instead: NEG sets CF iff its operand is non-zero, matching
the SETB byte. NEG is a two-address (tied) instruction, so emit it
into a fresh virtual register rather than redefining the carry-in
vreg.

C reproducer (compile on x86_64-linux-gnu and run):

```
  // clang -O2 -fglobal-isel repro.c -o repro && ./repro

    [32 lines not shown]
DeltaFile
+7-6llvm/lib/Target/X86/GISel/X86InstructionSelector.cpp
+5-5llvm/test/CodeGen/X86/GlobalISel/add-scalar.ll
+5-5llvm/test/CodeGen/X86/GlobalISel/sub-scalar.ll
+1-1llvm/test/CodeGen/X86/GlobalISel/select-add-x32.mir
+18-174 files

LLVM/project c0c56f4llvm/test/Transforms/SLPVectorizer/RISCV ordered-reduction.ll

[SLP][NFC] Add precommit test for unprofitable ordered fadd reductions (#199428)

Adds a test case reproducing a scenario where the cost model incorrectly
evaluates an unprofitable ordered fadd reduction chain as profitable.

Further details can be found on this issue:
https://github.com/llvm/llvm-project/issues/199267
DeltaFile
+78-0llvm/test/Transforms/SLPVectorizer/RISCV/ordered-reduction.ll
+78-01 files

LLVM/project 852a20elibc/shared/math isnanf16.h, libc/src/__support/math isnanf16.h

[libc][math] Implement isnanf16 header-only function (#198115)

Adds `isnanf16` the float16 variant of isnan as part of issue
[#195400](https://github.com/llvm/llvm-project/issues/195400), which
tracks adding missing isnan variants for extended floating-point types.

The implementation follows the same pattern as the existing `isnanf`,
`isnan`, and `isnanl` functions.

---------

Co-authored-by: Victor Campos <github at victorcampos.me>
DeltaFile
+56-0libc/test/src/math/smoke/IsNanTest.h
+31-0libc/src/__support/math/isnanf16.h
+29-0libc/shared/math/isnanf16.h
+21-0libc/src/math/isnanf16.h
+17-0utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+16-0libc/src/math/generic/isnanf16.cpp
+170-019 files not shown
+237-025 files

LLVM/project d90cc1bclang/test/Headers __clang_hip_math.hip, lld/ELF SyntheticSections.cpp Writer.cpp

Merge branch 'main' into users/meinersbur/flang_builtin-mods_3
DeltaFile
+647-736clang/test/Headers/__clang_hip_math.hip
+591-509llvm/test/FileCheck/dump-input/annotations.txt
+607-0llvm/test/CodeGen/RISCV/GlobalISel/irtranslator/fixed-vectors-calling-conv.ll
+540-13mlir/test/Dialect/Linalg/specialize-generic-ops.mlir
+177-314lld/ELF/SyntheticSections.cpp
+158-264lld/ELF/Writer.cpp
+2,720-1,836484 files not shown
+12,368-7,117490 files

LLVM/project ab8edf3mlir/docs Tokens.md LangRef.md

move structural contract to LangRef
DeltaFile
+20-40mlir/docs/Tokens.md
+27-6mlir/docs/LangRef.md
+47-462 files

LLVM/project db7f01dllvm/lib/Transforms/Vectorize VPlan.cpp

[VPlan] Simplify block deletion in VPlan dtor (NFC) (#199421)

Split deletion loop into 2 simpler loops: first replace all operands of
each recipe with a dummy value. Then delete blocks in second pass.

This avoids RAUW unnecessarily and also removes the need to handle
region values explicitly.
DeltaFile
+7-15llvm/lib/Transforms/Vectorize/VPlan.cpp
+7-151 files

LLVM/project 75f0ec0libcxx/include any, libcxx/test/std/utilities/any/any.nonmembers/any.cast const_reference_types.verify.cpp void.const.verify.cpp

[libc++] remove duplicate assertions for void/reference const any_cast

For test cases of the const overload of any_cast, such as:
```C++
void test() {
  std::any a = 0;
  const std::any& a2 = a;
  (void)std::any_cast<int&>(&a2);
}
```
(And similarly for void).

The problem is that the assertions are implemented both in the const and non-const any_cast overloads,
but since the const overload delegates to the non-const overload, that ends up producing the same assertion twice.
DeltaFile
+33-0libcxx/test/std/utilities/any/any.nonmembers/any.cast/const_reference_types.verify.cpp
+23-0libcxx/test/std/utilities/any/any.nonmembers/any.cast/void.const.verify.cpp
+0-17libcxx/test/std/utilities/any/any.nonmembers/any.cast/reference_types.verify.cpp
+3-14libcxx/test/std/utilities/any/any.nonmembers/any.cast/void.verify.cpp
+0-2libcxx/include/any
+59-335 files

LLVM/project 21df17a.github/workflows issue-release-workflow.yml

workflows/issue-release-workflow: Validate user input in /cherry-pick commands (#199249)

This protects against mailicious inputs embedded in comments with
/cherry-pick commands.
DeltaFile
+31-8.github/workflows/issue-release-workflow.yml
+31-81 files

LLVM/project 93bca34libcxx/include/__cxx03 istream, libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted ignore.char_type.pass.cpp

[libc++][C++03] Cherry-pick #147007 (#198991)
DeltaFile
+6-0libcxx/include/__cxx03/istream
+0-2libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/ignore.char_type.pass.cpp
+6-22 files

LLVM/project 797dc31offload/test lit.cfg

[offload] Fix --libomptarget-nvptx-bc-path in tests (#199382)

PR #198622, which landed as 3383f0d6fe01, causes 272 `libomptarget ::
nvptx64-nvidia-cuda` test fails on my system with:

```
clang: error: bitcode library '/home/jdenny/llvm/build/\./lib/x86_64-unknown-linux-gnu/nvptx64-nvidia-cuda' does not exist
```

This patch fixes that.
DeltaFile
+1-1offload/test/lit.cfg
+1-11 files

LLVM/project 5cf392cllvm/lib/Target/AArch64 AArch64Processors.td

[AArch64] Remove stale comment about Cyclone being a default(NFC) (#199409)

Default on macOS is already apple-m5.
DeltaFile
+0-2llvm/lib/Target/AArch64/AArch64Processors.td
+0-21 files

LLVM/project 5be8bballvm/lib/Target/AMDGPU AMDGPUCoExecSchedStrategy.cpp, llvm/test/CodeGen/AMDGPU coexec-rewrite-mfma.ll

[AMDGPU] Add to RewriteMFMAForm coexec scheduler pipeline (#199050)
DeltaFile
+182-0llvm/test/CodeGen/AMDGPU/coexec-rewrite-mfma.ll
+1-0llvm/lib/Target/AMDGPU/AMDGPUCoExecSchedStrategy.cpp
+183-02 files

LLVM/project dc9d515llvm/include/llvm/MC MCSchedule.h, llvm/lib/MC MCSchedule.cpp

[MC] Create new MCScheduleOptions cl::opt category (#198746)

This patch creates a new cl::opt category for MCSchedule options. It
enables tools to filter MCSchedule options based on category.
Specifically, llvm-mca now filters them in, and displays them under
`--help-hidden`, which wasnt the case before.
DeltaFile
+8-0llvm/test/tools/llvm-mca/mc-schedule-options-help.test
+6-0llvm/include/llvm/MC/MCSchedule.h
+3-1llvm/lib/MC/MCSchedule.cpp
+2-1llvm/tools/llvm-mca/llvm-mca.cpp
+19-24 files

LLVM/project 46666d9llvm/lib/Transforms/InstCombine InstCombineCalls.cpp, llvm/test/Transforms/InstCombine reduction-mul-sext-zext-i1.ll

[InstCombine] Fix vector_reduce_mul(sext <n x i1>) for odd n. (#199401)

Before this patch, instcombine folded

    vector_reduce_mul(sext (<n x i1> val))

to

    zext(vector_reduce_and(<n x i1> val)).

But this is incorrect when n is odd: The result of the reduction is -1,
not 1.

After this patch we only do this fold when n is even.

This bug was found by a large run of Opus 4.7 looking for bugs in LLVM.
DeltaFile
+60-5llvm/test/Transforms/InstCombine/reduction-mul-sext-zext-i1.ll
+19-14llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
+79-192 files

LLVM/project e4716e0llvm/lib/Analysis ConstantFolding.cpp, llvm/test/Transforms/InstCombine ldexp.ll

[ConstantFolding] Handle large exponents in ldexp (#199309)

Previously if you passed a constant exponent to llvm.ldexp greater than
the width of `int`, we would silently truncate it to `int` before
using it in scalbn.  We'd thus generate the incorrect result.

We now clamp it to fit within int.

This bug was found by a large run of Opus 4.7 looking for bugs in LLVM.
DeltaFile
+53-0llvm/test/Transforms/InstCombine/ldexp.ll
+6-1llvm/lib/Analysis/ConstantFolding.cpp
+59-12 files

LLVM/project c697c1ellvm/lib/Transforms/Vectorize VPlanRecipes.cpp

[VPlan] Remove special cost logic for loads predicated by header mask. (#196630)

Remove the special cost logic for loads predicated by the header mask,
as it does not accurately reflect the cost of the generated VPlan.

Unmasking the load can only be done in general if we don't unroll or if
the address is actually uniform-across-vf-and-uf. The former we cannot
really determine before selecting the VF as UF is picked after VF. The
latter is not really useful in practice.

PR: https://github.com/llvm/llvm-project/pull/196630
DeltaFile
+5-10llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
+5-101 files

LLVM/project c053903clang-tools-extra/clang-tidy/cppcoreguidelines AvoidNonConstGlobalVariablesCheck.cpp AvoidNonConstGlobalVariablesCheck.h, clang-tools-extra/docs ReleaseNotes.rst

[clang-tidy] Adds `IgnoreMacros` option to cppcoreguidelines-avoid-non-const-global-variables (#198183)

Adds `IgnoreMacros` option to
[cppcoreguidelines-avoid-non-const-global-variables](https://clang.llvm.org/extra/clang-tidy/checks/cppcoreguidelines/avoid-non-const-global-variables.html)
DeltaFile
+28-0clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/avoid-non-const-global-variables-macros.cpp
+14-4clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidNonConstGlobalVariablesCheck.cpp
+5-0clang-tools-extra/docs/ReleaseNotes.rst
+5-0clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/avoid-non-const-global-variables.rst
+1-0clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidNonConstGlobalVariablesCheck.h
+53-45 files