LLVM/project 666110b — llvm/lib/Transforms/Vectorize LoopVectorizationLegality.cpp LoopVectorizationPlanner.cpp

[Vectorize] Declare command line options in TableGen (#231025)

TailFoldingPolicyTy moves to VectorizeOptions.h. LoopVectorize.h no
longer exports EnableLoopInterleaving and EnableLoopVectorization, which
nothing outside the library reads. LoopVectorizeHints and
LoopVectorizationLegality take the options struct in their constructors.

The -vplan-print-* options and -sbvec-always-verify are AssertsOnly
(#230898), no longer available in LLVM_ENABLE_DUMP builds without
assertions.

-vplan-verify-each defaults to VPlanVerifyEachDefault, true under
EXPENSIVE_CHECKS. -epilogue-vectorization-force-VF (ElementCount parser)
stays cl::opt.

Aided by Opus 5.5
DeltaFile
+430-592llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+125-371llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+331-0llvm/lib/Transforms/Vectorize/VectorizeOptions.td
+25-56llvm/lib/Transforms/Vectorize/LoopIdiomVectorize.cpp
+15-60llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.cpp
+12-50llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
+938-1,12927 files not shown
+1,211-1,35833 files

LLVM/project fd288b2 — clang/include/clang/AST Decl.h

format
DeltaFile
+1-1clang/include/clang/AST/Decl.h
+1-11 files

LLVM/project c3519ec — clang/include/clang/AST Decl.h

Update clang/include/clang/AST/Decl.h

Co-authored-by: Corentin Jabot <corentinjabot at gmail.com>
DeltaFile
+1-0clang/include/clang/AST/Decl.h
+1-01 files

LLVM/project a5b0665 — clang/include/clang/AST Decl.h

Update clang/include/clang/AST/Decl.h

Co-authored-by: Corentin Jabot <corentinjabot at gmail.com>
DeltaFile
+1-0clang/include/clang/AST/Decl.h
+1-01 files

LLVM/project 182e273 — clang/docs ReleaseNotes.md

Update clang/docs/ReleaseNotes.md

Co-authored-by: Corentin Jabot <corentinjabot at gmail.com>
DeltaFile
+2-3clang/docs/ReleaseNotes.md
+2-31 files

LLVM/project 9d4c617 — clang/docs/ScalableStaticAnalysis/user-docs MakeProjects.md, clang/test/Analysis/Scalable/ssaf-orchestrator-make link-driver-ld-lld.test

[clang][ssaf] Interpose ld.lld in clang-ssaf-orchestrator-make (#231720)

A clang built with CLANG_DEFAULT_LINKER=lld, or given -fuse-ld=lld, runs
ld.lld for a link rather than ld, so the ld shim stands in for ld.lld
too. ld.lld takes ld's command line.

Assisted-by: Claude
DeltaFile
+41-0clang/test/Analysis/Scalable/ssaf-orchestrator-make/link-driver-ld-lld.test
+10-2clang/tools/clang-ssaf-orchestrator-make/tests/test_clang_shim.py
+2-2clang/docs/ScalableStaticAnalysis/user-docs/MakeProjects.md
+1-0clang/tools/clang-ssaf-orchestrator-make/lib/clang_ssaf_orchestrator_make/config.py
+54-44 files

LLVM/project 149333a — clang/lib/AST Decl.cpp

use `getNumParamsIncludingThis`
DeltaFile
+1-5clang/lib/AST/Decl.cpp
+1-51 files

LLVM/project dd04612 — llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer VecUtils.h, llvm/lib/SandboxIR Constant.cpp

[SandboxVec][LoadStoreVec] Support constant vectors of mixed types
DeltaFile
+400-4llvm/test/Transforms/SandboxVectorizer/Passes/LoadStoreVec/load_store_vec_mixed_types.ll
+118-26llvm/lib/Transforms/Vectorize/SandboxVectorizer/Passes/LoadStoreVec.cpp
+56-28llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/VecUtils.h
+25-24llvm/unittests/Transforms/Vectorize/SandboxVectorizer/VecUtilsTest.cpp
+35-0llvm/lib/Transforms/Vectorize/SandboxVectorizer/VecUtils.cpp
+18-0llvm/lib/SandboxIR/Constant.cpp
+652-825 files not shown
+676-8311 files

LLVM/project e0da50d — llvm/lib/Transforms/InstCombine InstCombineCasts.cpp, llvm/test/CodeGen/AMDGPU amdgpu-simplify-libcall-pow.ll

[InstCombine] Fold fpto[su]i of llvm.trunc (#231414)

fptoui and fptosi already round toward zero, so a preceding llvm.trunc
is redundant and the conversion can take the untruncated value. NaN,
infinity, and out of range inputs produce poison in both forms.

```llvm
%t = call float @llvm.trunc.f32(float %x)
%r = fptosi float %t to i32
  -->
%r = fptosi float %x to i32
```

The trunc may have other users; only the conversion operand is replaced.

Alive2 link: https://alive2.llvm.org/ce/z/HvbncV
DeltaFile
+8-14llvm/test/Transforms/InstCombine/fpcast.ll
+5-8llvm/test/CodeGen/AMDGPU/amdgpu-simplify-libcall-pow.ll
+5-0llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
+18-223 files

LLVM/project 0768612 — llvm/lib/Support UnicodeNameToCodepointGenerated.cpp, llvm/test/CodeGen/AMDGPU amdgcn.bitcast.896bit.ll amdgcn.bitcast.960bit.ll

Merge branch 'main' into users/bassiounix/clang/default-postfix-inc-dec-op
DeltaFile
+59,189-78,533llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+23,347-23,371llvm/lib/Support/UnicodeNameToCodepointGenerated.cpp
+30,490-14,915llvm/test/CodeGen/AMDGPU/frem.ll
+19,589-25,057llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+14,125-17,554llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.960bit.ll
+13,169-16,447llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.896bit.ll
+159,909-175,87710,491 files not shown
+850,618-585,05010,497 files

LLVM/project 77695ad — llvm/unittests/Passes/PassBuilderBindings PassBuilderBindingsTest.cpp, llvm/unittests/Target TargetMachineOptionsTest.cpp

[unittests] Skip target tests when the default triple is not built

PassBuilder and TargetMachine C API tests FAIL when LLVM_TARGETS_TO_BUILD
excludes the host triple. Skip instead, and avoid tearing down an
uninitialized TargetMachine after a skipped SetUp.

Co-authored-by: Cursor <cursoragent at cursor.com>
DeltaFile
+10-12llvm/unittests/Passes/PassBuilderBindings/PassBuilderBindingsTest.cpp
+5-3llvm/unittests/Target/TargetMachineOptionsTest.cpp
+15-152 files

LLVM/project eab6e06 — clang/include/clang/Basic DiagnosticSemaKinds.td, clang/lib/Sema SemaBoundsSafety.cpp SemaChecking.cpp

Place error on the __builtin_counted_by_ref call.
DeltaFile
+0-9clang/lib/Sema/SemaBoundsSafety.cpp
+9-0clang/test/Sema/builtin-counted-by-ref.c
+9-0clang/lib/Sema/SemaChecking.cpp
+0-5clang/test/Sema/attr-counted-by-vla.c
+2-3clang/include/clang/Basic/DiagnosticSemaKinds.td
+20-175 files

LLVM/project 7cec672 — libclc/clc/lib/generic/math clc_exp2.cl clc_exp.cl

[libclc] Produce subnormal results for exp/exp2 on FP32 (#212696)

The FP32 __clc_exp/__clc_exp2 implementations scale the reduced result
by 2^p using integer bit manipulation (as_int(y) + (p << 23)). That
representation cannot encode a subnormal, so inputs whose result falls
below the smallest normal were unconditionally flushed to zero via "x <
llim ? 0.0f". On devices that report CL_FP_DENORM this loses the correct
subnormal result (e.g. erfc(), which is built on exp(), failed CTS
math_brute_force with the reference subnormal vs a returned 0).

Recompute the subnormal range with __clc_ldexp, which does produce
subnormals, gated on __clc_fp32_subnormals_supported() so flush-to-zero
targets keep the previous fast path. The ldexp path is restricted to
[subnorm_llim, llim); inputs below subnorm_llim (including -inf and
large-magnitude negatives) still flush to zero, since their reduced
exponent argument would be ill-formed for ldexp.
DeltaFile
+14-5libclc/clc/lib/generic/math/clc_exp.inc
+13-4libclc/clc/lib/generic/math/clc_exp2.inc
+2-0libclc/clc/lib/generic/math/clc_exp2.cl
+2-0libclc/clc/lib/generic/math/clc_exp.cl
+31-94 files

LLVM/project 81b82b8 — flang/lib/Lower/OpenMP OpenMP.cpp, flang/test/Lower/OpenMP distribute-parallel-do.f90 distribute-parallel-do-simd.f90

[flang][OpenMP] Fix cleanup placement of num_threads temporaries (#231659)

DISTRIBUTE PARALLEL DO and DISTRIBUTE PARALLEL DO SIMD evaluate the
PARALLEL clause operands before creating omp.parallel, using the
statement context of the dispatch. That context is finalized after the
returned omp.distribute, which is inside the parallel region, so every
thread destroyed the same num_threads temporary, for example for
num_threads(size(f())) where f returns an allocatable.

Evaluate these operands in a separate statement context and finalize it
after omp.parallel.

Fixes #230661

Assisted with Copilot and Claude Opus 5.5
DeltaFile
+27-9flang/lib/Lower/OpenMP/OpenMP.cpp
+32-0flang/test/Lower/OpenMP/distribute-parallel-do.f90
+32-0flang/test/Lower/OpenMP/distribute-parallel-do-simd.f90
+91-93 files

LLVM/project 3849d3a — llvm/include/llvm/Support KnownFPClass.h, llvm/lib/Support KnownFPClass.cpp

[KnownFPClass] Add trunc/floor/ceil and fix ppcf128 demanded classes (#229982)

Adds `KnownFPClass` functions for `trunc`, `floor`, and `ceil`. Also
corrects the `DemandedSrcMask` code for `PPCDoubleDouble` in
`SimplifyDemandedUseFPClass` for the integer-rounding functions.

I've only added basic deductions for `PPCDoubleDouble` for now:
- `trunc(x)` is only `+-inf` if `x == +-inf` (we already had this)
- `floor(x)` is only `+inf` if `x == +inf`
- `ceil(x)` is only `-inf` if `x == -inf`

AI disclosure:
I used Claude Opus 5 to help write the code and tests.
DeltaFile
+355-0llvm/test/Transforms/InstCombine/simplify-demanded-fpclass-rounding-intrinsics.ll
+111-22llvm/test/Transforms/InstSimplify/known-never-infinity.ll
+50-0llvm/unittests/CodeGen/GlobalISel/KnownFPClassTest.cpp
+38-4llvm/lib/Support/KnownFPClass.cpp
+26-5llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
+21-4llvm/include/llvm/Support/KnownFPClass.h
+601-354 files not shown
+638-4910 files

LLVM/project 233a177 — llvm/test/Transforms/SLPVectorizer/RISCV iss231116.ll intrinsic-splat-operands.ll

[SLP][RISCV] Add tests for costing splat operands of intrinsics (#231672)

Tests for #231400.

AI Usage: Assisted by Codex
DeltaFile
+123-0llvm/test/Transforms/SLPVectorizer/RISCV/intrinsic-splat-operands.ll
+116-0llvm/test/Transforms/SLPVectorizer/RISCV/iss231116.ll
+239-02 files

LLVM/project 9f08536 — llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer VecUtils.h, llvm/lib/Transforms/Vectorize/SandboxVectorizer VecUtils.cpp

[SandboxVec][LoadStoreVec] Support constant vectors of mixed types
DeltaFile
+400-4llvm/test/Transforms/SandboxVectorizer/Passes/LoadStoreVec/load_store_vec_mixed_types.ll
+118-26llvm/lib/Transforms/Vectorize/SandboxVectorizer/Passes/LoadStoreVec.cpp
+56-28llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/VecUtils.h
+25-24llvm/unittests/Transforms/Vectorize/SandboxVectorizer/VecUtilsTest.cpp
+35-0llvm/lib/Transforms/Vectorize/SandboxVectorizer/VecUtils.cpp
+10-12llvm/unittests/Passes/PassBuilderBindings/PassBuilderBindingsTest.cpp
+644-947 files not shown
+691-9813 files

LLVM/project ee51d7d — lldb/include/lldb/Core ModuleSpec.h, lldb/source/API SBModuleSpec.cpp

[lldb] Remove ConstString from ModuleSpec (#230282)
DeltaFile
+10-12lldb/source/Core/Module.cpp
+8-9lldb/include/lldb/Core/ModuleSpec.h
+5-2lldb/source/API/SBModuleSpec.cpp
+2-2lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp
+1-1lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
+1-1lldb/source/Plugins/ObjectContainer/Mach-O-Fileset/ObjectContainerMachOFileset.cpp
+27-272 files not shown
+29-288 files

LLVM/project 92fd0d4 — llvm/tools/llvm-readobj ELFDumper.cpp

[llvm-readobj][NFC] Move the 1-byte call graph info fields last

Group FormatVersionNumber and IsIndirectTarget at the end of
FunctionCallGraphInfo, after the 8-byte-aligned members.

Assisted-by: Gemini
DeltaFile
+2-2llvm/tools/llvm-readobj/ELFDumper.cpp
+2-21 files

LLVM/project 650f3f6 — llvm/test/tools/llvm-readobj/ELF call-graph-info.test

[llvm-readobj] Test call graph callees below and above four

Add a function with fewer callees, as the old SmallSet already kept
section order for up to four, and say why main has five distinct
callees. Move main's repeated callee to the end, so that a repeat is
also skipped after the set of seen callees outgrows its inline size.

Assisted-by: Gemini
DeltaFile
+32-4llvm/test/tools/llvm-readobj/ELF/call-graph-info.test
+32-41 files

LLVM/project 643fb92 — libcxx/test/std/depr/depr.c.headers stdio_h.compile.pass.cpp, libcxx/test/std/input.output/file.streams/c.files cstdio.pass.cpp

[libcxx][NFC] remove XFAIL on stdio_h.compile.pass (#231694)

Obsolete after #229347 and #221349
DeltaFile
+0-3libcxx/test/std/input.output/file.streams/c.files/cstdio.pass.cpp
+0-3libcxx/test/std/depr/depr.c.headers/stdio_h.compile.pass.cpp
+0-62 files

LLVM/project 4ba245d — llvm/lib/Analysis ScalarEvolution.cpp, llvm/test/Transforms/IndVarSimplify widen-zext-nneg-add-nsw-runtime-start.ll eliminate-comparison.ll

[SCEV] Prove monotonic predicates from loop entry in isKnownViaInduction

isKnownViaInduction requires the predicate to hold on loop entry and on
the backedge. The backedge check usually fails when the latch only
bounds the IV from above, so e.g. {s,+,1}<nsw> >=s 0 is not proven even
when s >=s 0 is known on entry.

In a loop guarded by "start <u len", this keeps IndVars from computing
a[i - 32] in i64.

A monotonically increasing predicate against a loop-invariant value can
only change from false to true, so holding on entry is enough.

Use this in isKnownOnEveryIteration when the backedge check fails.

Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+261-0llvm/unittests/Analysis/ScalarEvolutionTest.cpp
+81-0llvm/test/Transforms/IndVarSimplify/monotonic-predicate-samesign.ll
+59-9llvm/test/Transforms/IndVarSimplify/eliminate-comparison.ll
+29-32llvm/test/Transforms/IndVarSimplify/widen-zext-nneg-add-nsw-runtime-start.ll
+8-24llvm/test/Transforms/PhaseOrdering/indvars-vectorize-runtime-start.ll
+14-3llvm/lib/Analysis/ScalarEvolution.cpp
+452-683 files not shown
+463-759 files

LLVM/project 9d9ad8a — clang/test CMakeLists.txt, clang/test/Analysis/Scalable/ssaf-orchestrator-make bare-linker.test link-driver.test

Clang ssaf orchestrator fixes (#231678)

Attempt to fix https://github.com/llvm/llvm-project/pull/231583
DeltaFile
+6-1clang/test/CMakeLists.txt
+4-1clang/test/Analysis/Scalable/ssaf-orchestrator-make/lit.local.cfg
+3-1clang/tools/CMakeLists.txt
+1-2clang/test/Analysis/Scalable/ssaf-orchestrator-make/link-driver.test
+1-1clang/test/Analysis/Scalable/ssaf-orchestrator-make/bare-linker.test
+15-65 files

LLVM/project 9d18ac3 — llvm/lib/Target/BPF BPFInstrInfo.td, llvm/test/CodeGen/BPF atomics_mem_order_v3.ll

[BPF] Use FETCH atomic instruction for monotonic atomicrmw when the result is used (#210371)

For BPF, a monotonic atomicrmw selected the non-fetch instruction
regardless of whether the result was used. The non-fetch form discards
the old value, so the result was wrong if used.

Fix makes ISel select the fetch form when the result is used and the
non-fetch form otherwise via the binop_no_use / binop_has_use PatFrags.
This was already done for the i64 and/or/xor patterns, applied it to the
remaining monotonic patterns: i64 add and sub, and all i32 ops
(add/sub/and/or/xor).

Fixes #210280

Assisted-by: Claude (Anthropic)
DeltaFile
+78-62llvm/lib/Target/BPF/BPFInstrInfo.td
+7-7llvm/test/CodeGen/BPF/atomics_mem_order_v3.ll
+85-692 files

LLVM/project c6f4770 — llvm/lib/Analysis ScalarEvolution.cpp, llvm/test/Transforms/IndVarSimplify widen-zext-nneg-add-nsw-runtime-start.ll eliminate-comparison.ll

[SCEV] Prove monotonic predicates from loop entry in isKnownViaInduction

isKnownViaInduction requires the predicate to hold on loop entry and on
the backedge. The backedge check usually fails when the latch only
bounds the IV from above, so e.g. {s,+,1}<nsw> >=s 0 is not proven even
when s >=s 0 is known on entry.

In a loop guarded by "start <u len", this keeps IndVars from computing
a[i - 32] in i64.

A monotonically increasing predicate against a loop-invariant value can
only change from false to true, so holding on entry is enough.

Use this in isKnownOnEveryIteration when the backedge check fails.

Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+260-0llvm/unittests/Analysis/ScalarEvolutionTest.cpp
+81-0llvm/test/Transforms/IndVarSimplify/monotonic-predicate-samesign.ll
+59-9llvm/test/Transforms/IndVarSimplify/eliminate-comparison.ll
+29-32llvm/test/Transforms/IndVarSimplify/widen-zext-nneg-add-nsw-runtime-start.ll
+8-24llvm/test/Transforms/PhaseOrdering/indvars-vectorize-runtime-start.ll
+14-3llvm/lib/Analysis/ScalarEvolution.cpp
+451-683 files not shown
+462-759 files

LLVM/project 49666ef — llvm/test/Transforms/IndVarSimplify ult-nonneg-bound-implies-nonneg.ll widen-zext-nneg-add-nsw-runtime-start.ll, llvm/test/Transforms/PhaseOrdering indvars-vectorize-runtime-start.ll

[IndVarSimplify][PhaseOrdering][NFC] Add tests for widening nsw IV arithmetic

Add tests for for (int i = start; i < N; i++) a[i] = a[i - 32] + 1,
with zext nneg indices and i - 32 nsw only:
- IndVarSimplify: with guards that do and do not prove start
  non-negative, i - 32 is computed in i64 or i32.
- PhaseOrdering (indvars, loop-vectorize): whether a runtime alias check
  is emitted.

Move @runtime_start out of ult-nonneg-bound-implies-nonneg.ll, which
duplicated it.

Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+709-0llvm/test/Transforms/IndVarSimplify/widen-zext-nneg-add-nsw-runtime-start.ll
+125-0llvm/test/Transforms/PhaseOrdering/indvars-vectorize-runtime-start.ll
+0-67llvm/test/Transforms/IndVarSimplify/ult-nonneg-bound-implies-nonneg.ll
+834-673 files

LLVM/project 0ab3f16 — llvm/test/Transforms/IndVarSimplify iv-widen-elim-ext.ll

[IndVarSimplify][NFC] Add a negative test for zext elimination

Add @foo3_neg: the loop from @foo3 with a guard on an unrelated value,
so %add3 may be negative and its zext must stay.

Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+71-0llvm/test/Transforms/IndVarSimplify/iv-widen-elim-ext.ll
+71-01 files

LLVM/project 8a5d595 — llvm/include/llvm/Analysis ScalarEvolution.h, llvm/lib/Analysis ScalarEvolution.cpp

[SCEV][NFC] Use isKnownOnEveryIteration in isKnownViaInduction

isKnownViaInduction and isKnownOnEveryIteration both prove a predicate
on every iteration from loop entry and the backedge, so the next change
can extend one place.

Add a private isKnownOnEveryIteration overload that takes any LHS and
RHS and the loop, and move the entry/backedge check from
isKnownViaInduction into it. The public overload is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+30-24llvm/lib/Analysis/ScalarEvolution.cpp
+7-0llvm/include/llvm/Analysis/ScalarEvolution.h
+37-242 files

LLVM/project 93ebf74 — llvm/include/llvm/Analysis ScalarEvolution.h, llvm/lib/Analysis ScalarEvolution.cpp

[SCEV][NFC] Factor getMonotonicPredicate out of getLoopInvariantPredicate

The next change needs the same setup as getLoopInvariantPredicate.

Move it into a private helper: put the loop-invariant operand on the
RHS, check that the other side is a recurrence of the loop, and compute
the predicate's monotonicity.

Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+24-9llvm/lib/Analysis/ScalarEvolution.cpp
+19-0llvm/include/llvm/Analysis/ScalarEvolution.h
+43-92 files

LLVM/project 975df9c — llvm/test/Transforms/SandboxVectorizer/Passes/Common alignment.ll

[SandboxVec][NFC] Precommit test (#231330)

For a follow-up patch that updates the alignment logic.
DeltaFile
+94-0llvm/test/Transforms/SandboxVectorizer/Passes/Common/alignment.ll
+94-01 files