LLVM/project 22b86ab — llvm/lib/Target/AVR AVRExpandPseudoInsts.cpp, llvm/test/CodeGen/AVR std-ldd-tiny.ll

[AVR] Address review comments on AVRTiny spills

Document that STDPtrQRr and LDDRdPtrQ are only treated as pseudo
instructions on AVRTiny, and check atmega328 instead of -O0 in
std-ldd-tiny.ll so the test contrasts the two kinds of cores.
DeltaFile
+93-198llvm/test/CodeGen/AVR/std-ldd-tiny.ll
+4-0llvm/lib/Target/AVR/AVRExpandPseudoInsts.cpp
+97-1982 files

LLVM/project e315d34 — llvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/X86 bit-test-narrowed-samesign.ll

[SLP]Drop samesign of narrowed bit test compares (#235287)

The bit tests compare and L, R, which sign-extends from the narrow type
only
if both L and R do, so its sign may change after narrowing.

Fixes
https://github.com/llvm/llvm-project/pull/233124#issuecomment-6382644843

Assisted-by: Cursor
DeltaFile
+14-9llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+2-2llvm/test/Transforms/SLPVectorizer/X86/bit-test-narrowed-samesign.ll
+16-112 files

LLVM/project 237b420 — llvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/X86 bit-test-narrowed-samesign.ll minbw-alt-cast-demoted-operand.ll

[𝘀𝗽𝗿] changes to main this commit is based on

Created using spr 1.3.7

[skip ci]
DeltaFile
+244-0llvm/test/Transforms/SLPVectorizer/X86/minbw-alt-cast-demoted-operand.ll
+178-0llvm/test/Transforms/SLPVectorizer/X86/bit-test-narrowed-samesign.ll
+98-26llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+520-263 files

LLVM/project 901ef4f — llvm/test/Transforms/SLPVectorizer/X86 bit-test-narrowed-samesign.ll

[SLP][NFC]Add a test with incorrect vectorization, NFC (#235285)
DeltaFile
+178-0llvm/test/Transforms/SLPVectorizer/X86/bit-test-narrowed-samesign.ll
+178-01 files

LLVM/project fe1f1fa — llvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/X86 minbw-alt-cast-demoted-operand.ll

[𝘀𝗽𝗿] changes to main this commit is based on

Created using spr 1.3.7

[skip ci]
DeltaFile
+244-0llvm/test/Transforms/SLPVectorizer/X86/minbw-alt-cast-demoted-operand.ll
+98-26llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+342-262 files

LLVM/project 3b3638c — llvm/include/llvm/Frontend/OpenMP OMP.td

[OpenMP] Add definition of begin/end metadirective

This just adds the basic definitions of the directives (specifically the
definitions of the OMPD_begin_metadirective and OMP_end_metadirective
enums).

This isn't used or handled anywhere at the moment.
DeltaFile
+18-0llvm/include/llvm/Frontend/OpenMP/OMP.td
+18-01 files

LLVM/project a0f9869 — llvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/X86 minbw-alt-cast-demoted-operand.ll

[SLP]Fix alternate casts of demoted operand (#235280)

sext/sitofp of an unsigned demoted operand must be zext/uitofp, and
zext/uitofp cannot absorb the sign extension of a signed demoted
operand,
so the operand must be extended back first.

Fixes
https://github.com/llvm/llvm-project/issues/234923#issuecomment-6373744225

Assisted-by: Cursor
DeltaFile
+98-26llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+8-10llvm/test/Transforms/SLPVectorizer/X86/minbw-alt-cast-demoted-operand.ll
+106-362 files

LLVM/project 39be2b6 — llvm/test/Transforms/SLPVectorizer/X86 minbw-alt-cast-demoted-operand.ll

[𝘀𝗽𝗿] changes to main this commit is based on

Created using spr 1.3.7

[skip ci]
DeltaFile
+246-0llvm/test/Transforms/SLPVectorizer/X86/minbw-alt-cast-demoted-operand.ll
+246-01 files

LLVM/project a58a227 — llvm/include/llvm/CodeGen SlotIndexes.h, llvm/lib/CodeGen LiveIntervals.cpp SlotIndexes.cpp

[CodeGen] Drop dead SlotIndexes before allocation (#224031)

SlotIndexes keeps the index list entry of an erased instruction and only
clears its instruction pointer. Live range sizes are measured in slot
indexes and greedy ranks ranges by size, so the leftovers inflate some
ranges more than others and reorder allocation, spilling heavily on
register-starved functions.

Add SlotIndexes::compactIndexes() to erase them. Erased entries are
unlinked, so holding an index to one is now a bug; linkedEntry() asserts
on it. The one analysis that did was LiveIntervals, so add
removeUnreferencedIntervals() to retire the intervals responsible.

Off by default behind -greedy-compact-slot-indexes, since it changes
allocation across much of the test suite.

The test file greedy-compact-slot-indexes-priority.mir by Q. Colombet.
DeltaFile
+288-0llvm/unittests/CodeGen/SlotIndexesTest.cpp
+82-0llvm/test/CodeGen/AMDGPU/greedy-compact-slot-indexes-priority.mir
+43-0llvm/lib/CodeGen/SlotIndexes.cpp
+35-0llvm/test/CodeGen/AMDGPU/greedy-compact-slot-indexes.ll
+23-6llvm/include/llvm/CodeGen/SlotIndexes.h
+17-0llvm/lib/CodeGen/LiveIntervals.cpp
+488-62 files not shown
+504-78 files

LLVM/project 4b0b58f — llvm/test/Transforms/SLPVectorizer/X86 minbw-alt-cast-demoted-operand.ll

[SLP][NFC]Add a test with incorrect vectorization, NFC (#235277)
DeltaFile
+246-0llvm/test/Transforms/SLPVectorizer/X86/minbw-alt-cast-demoted-operand.ll
+246-01 files

LLVM/project 63107e0 — clang/include/clang/StaticAnalyzer/Core/BugReporter BugReporter.h, clang/lib/StaticAnalyzer/Checkers/WebKit RawPtrRefMemberChecker.cpp RawPtrRefLocalVarsChecker.cpp

[analyzer][NFC] Forward-declare Preprocessor in BugReporter.h

BugReporter.h includes clang/Lex/Preprocessor.h, and that single edge
pulls the whole Lex subtree -- roughly 34 headers, among them
Basic/Module.h, HeaderSearch.h and ModuleMap.h -- into 161 of the 197
translation units that make up clangStaticAnalyzerCore,
clangStaticAnalyzerCheckers and clangStaticAnalyzerFrontend. The
mechanism is transitive inclusion, not any use of the preprocessor:
nearly every analyzer source reaches BugReporter.h, so nearly every one
of them parses Preprocessor.h and everything it brings with it.

The include is not needed. Preprocessor appears in this header only as a
reference return type in three declarations, and no member of it is ever
named, so a forward declaration in namespace clang suffices and the
generated code is identical. Eight .cpp files were relying on
SourceManager completeness arriving through Preprocessor.h and now
include clang/Basic/SourceManager.h directly; that is the only
compensating change, and no translation unit needed Preprocessor.h
added back.

    [14 lines not shown]
DeltaFile
+1-1clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h
+1-0clang/lib/StaticAnalyzer/Checkers/WebKit/RawPtrRefMemberChecker.cpp
+1-0clang/lib/StaticAnalyzer/Checkers/WebKit/RawPtrRefLocalVarsChecker.cpp
+1-0clang/lib/StaticAnalyzer/Checkers/WebKit/RawPtrRefLambdaCapturesChecker.cpp
+1-0clang/lib/StaticAnalyzer/Checkers/WebKit/RawPtrRefCallArgsChecker.cpp
+1-0clang/lib/StaticAnalyzer/Checkers/WebKit/ForwardDeclChecker.cpp
+6-13 files not shown
+9-19 files

LLVM/project c7573b4 — clang/include/clang/StaticAnalyzer/Core/PathSensitive AnalysisManager.h, clang/lib/StaticAnalyzer/Checkers ArrayBoundChecker.cpp

[analyzer][NFC] Forward-declare Preprocessor in AnalysisManager.h

AnalysisManager.h includes clang/Lex/Preprocessor.h, and through that
one edge the whole Lex subtree -- roughly 34 headers, among them
Basic/Module.h, HeaderSearch.h and ModuleMap.h -- is parsed by 147 of
the 197 translation units in clangStaticAnalyzerCore,
clangStaticAnalyzerCheckers and clangStaticAnalyzerFrontend. The
mechanism is transitive inclusion: AnalysisManager.h sits under almost
every analyzer source, so almost every one of them pays for the
preprocessor without naming it.

Preprocessor is used here only as a reference member, a constructor
parameter and a reference-returning accessor; no member of it is ever
named, so a forward declaration in namespace clang suffices and the
generated code is identical. The include is replaced by
clang/Basic/SourceManager.h rather than simply dropped, because
isInCodeFile() calls SM.isInMainFile(), SM.getIncludeLoc(),
SM.getFileID() and SM.getFilename(), and SourceManager is otherwise
unreachable from this header once Preprocessor.h is gone. That swap is

    [21 lines not shown]
DeltaFile
+2-1clang/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h
+1-0clang/lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp
+3-12 files

LLVM/project c89ab29 — clang/include/clang/StaticAnalyzer/Core/BugReporter Z3CrosscheckVisitor.h BugReporterVisitors.h

[analyzer][NFC] BugReporterVisitors.h should include MemRegion.h

BugReporterVisitors.h includes RangedConstraintManager.h but uses
nothing it declares: RangeSet, Range, ConstraintMap and
SimpleConstraintManager appear nowhere in the file. What the header
actually needs is MemRegion.h, which supplies SubRegion,
MemRegionManager and MemRegion completeness for an inline constructor;
today those arrive only by accident, transitively through
RangedConstraintManager.h -> ProgramState.h. Swapping the include for
the one that carries the used declarations makes the dependency honest
and adds a forward declaration of CallEvent in namespace clang::ento
for the one name that only needs to be incomplete.

One header needs a compensating include: Z3CrosscheckVisitor.h uses
ConstraintMap and was getting RangedConstraintManager.h through
BugReporterVisitors.h, so it now includes it directly. No translation
unit in clangStaticAnalyzerCore, clangStaticAnalyzerCheckers or
clangStaticAnalyzerFrontend required any other change.


    [3 lines not shown]
DeltaFile
+2-1clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h
+1-0clang/include/clang/StaticAnalyzer/Core/BugReporter/Z3CrosscheckVisitor.h
+3-12 files

LLVM/project 0765691 — llvm/lib/Target/AArch64 AArch64Combine.td, llvm/lib/Target/AArch64/GISel AArch64PreLegalizerCombiner.cpp

[AArch64][GlobalISel] Add deinterleaved store combine. (#228514)

This adds a combine for converting store(shuffle) into a ST2/ST3/ST4.
The idea is that this can be extended to support interleave /
deinterleave intrinsics in the future once those are supported.
DeltaFile
+59-111llvm/test/CodeGen/AArch64/interleaved-accesses.ll
+148-0llvm/lib/Target/AArch64/GISel/AArch64PreLegalizerCombiner.cpp
+17-55llvm/test/CodeGen/AArch64/vldn_shuffle.ll
+10-1llvm/lib/Target/AArch64/AArch64Combine.td
+234-1674 files

LLVM/project 04b1426 — clang/lib/CIR/CodeGen CIRGenCleanup.cpp, clang/test/CIR/CodeGen cleanup-scope-tmp.cpp array-ctor.cpp

[CIR] Fix temporary cleanup boundaries for asm and coroutines (#234664)

- Destroy asm operand temporaries at the end of the asm statement.
- Defer resume-expression temporary cleanups to the end of the enclosing
full-expression
- Clean up array-element default-argument temporaries before
constructing the next element, preserving lifetime extension.
- Keep conditional cleanup scopes open until the end of their owning
full-expression.

Note that this overlaps with #234303. I will rebase either depending on
which one gets merged first.

Assisted-By: Claude Opus 5.5
DeltaFile
+430-4clang/test/CIR/CodeGenCoroutines/coro-agg.cpp
+335-0clang/test/CIR/CodeGen/cleanup-conditional-eh.cpp
+281-0clang/test/CIR/CodeGen/cleanup-conditional.cpp
+188-7clang/test/CIR/CodeGen/array-ctor.cpp
+83-22clang/lib/CIR/CodeGen/CIRGenCleanup.cpp
+95-1clang/test/CIR/CodeGen/cleanup-scope-tmp.cpp
+1,412-348 files not shown
+1,562-5814 files

LLVM/project 8e71df4 — flang/lib/Semantics check-omp-variant.cpp openmp-utils.cpp

format
DeltaFile
+2-2flang/lib/Semantics/openmp-utils.cpp
+0-1flang/lib/Semantics/check-omp-variant.cpp
+2-32 files

LLVM/project 301e98a — flang/lib/Semantics openmp-utils.cpp

Add missing include
DeltaFile
+1-0flang/lib/Semantics/openmp-utils.cpp
+1-01 files

LLVM/project 86d6f5e — flang/lib/Semantics check-omp-variant.cpp, flang/test/Semantics/OpenMP metadirective-declare-reduction.f90 metadirective-declare-reduction-v52.f90

Address review comments
DeltaFile
+0-15flang/test/Semantics/OpenMP/metadirective-declare-reduction.f90
+15-0flang/test/Semantics/OpenMP/metadirective-declare-reduction-v52.f90
+15-0flang/test/Semantics/OpenMP/metadirective-declare-reduction-v51.f90
+1-1flang/lib/Semantics/check-omp-variant.cpp
+31-164 files

LLVM/project f87b59a — flang/lib/Semantics canonicalize-omp.cpp, flang/test/Semantics/OpenMP metadirective-common.f90 metadirective-declare-reduction-v52.f90

Treat ERROR AT(COMPILATION) as neutral
DeltaFile
+29-9flang/lib/Semantics/canonicalize-omp.cpp
+20-0flang/test/Semantics/OpenMP/metadirective-declare-reduction-v52.f90
+20-0flang/test/Semantics/OpenMP/metadirective-declare-reduction-v51.f90
+7-0flang/test/Semantics/OpenMP/metadirective-common.f90
+76-94 files

LLVM/project 3232cd9 — flang/lib/Semantics check-omp-variant.cpp

format
DeltaFile
+4-2flang/lib/Semantics/check-omp-variant.cpp
+4-21 files

LLVM/project f31d0f5 — flang/lib/Semantics check-omp-structure.h check-omp-structure.cpp, flang/test/Semantics/OpenMP metadirective-declare-reduction.f90

Verify DECLARE_REDUCTION in METADIRECTIVE
DeltaFile
+13-0flang/lib/Semantics/check-omp-variant.cpp
+7-2flang/lib/Semantics/check-omp-structure.cpp
+9-0flang/test/Semantics/OpenMP/metadirective-declare-reduction.f90
+1-0flang/lib/Semantics/check-omp-structure.h
+30-24 files

LLVM/project b956644 — flang/lib/Semantics check-omp-structure.h tools.cpp, flang/test/Semantics/OpenMP reduction14.f90 declare-reduction-bad-operator.f90

[flang][OpenMP] Improve diagnosing invalid operators in DECLARE_REDUCTION

Move the check out of the common MakeNameFromOperator function and
into OmpStructureChecker. Remove the no longer needed SemanticsContext
parameter in MakeNameFromOperator.

This will allow reusing at least some parts of the the name-mangling
code in DECLARE_INDUCTION.
DeltaFile
+51-19flang/lib/Semantics/check-omp-structure.cpp
+3-5flang/lib/Semantics/tools.cpp
+4-2flang/lib/Semantics/check-omp-structure.h
+3-2flang/test/Semantics/OpenMP/reduction-subtract.f90
+2-2flang/test/Semantics/OpenMP/declare-reduction-bad-operator.f90
+2-1flang/test/Semantics/OpenMP/reduction14.f90
+65-317 files not shown
+72-4113 files

LLVM/project afe936b — flang/include/flang/Semantics openmp-utils.h, flang/lib/Semantics check-omp-variant.cpp openmp-utils.cpp

Verify selectorless clauses as well
DeltaFile
+35-20flang/lib/Semantics/openmp-utils.cpp
+9-15flang/lib/Semantics/check-omp-variant.cpp
+8-2flang/test/Semantics/OpenMP/metadirective-declare-reduction.f90
+5-0flang/include/flang/Semantics/openmp-utils.h
+57-374 files

LLVM/project 64a6248 — flang/lib/Semantics check-omp-variant.cpp

Limit checks to current METADIRECTIVE
DeltaFile
+17-7flang/lib/Semantics/check-omp-variant.cpp
+17-71 files

LLVM/project ccda5d7 — mlir/lib/Target/SPIRV/Deserialization Deserializer.cpp, mlir/lib/Target/SPIRV/Serialization Serializer.cpp

[mlir][SPIR-V] Support MaxByteOffset decoration in binary round trips (#235084)
DeltaFile
+4-2mlir/test/Target/SPIRV/global-variable.mlir
+1-0mlir/lib/Target/SPIRV/Serialization/Serializer.cpp
+1-0mlir/lib/Target/SPIRV/Deserialization/Deserializer.cpp
+6-23 files

LLVM/project 2b6e769 — llvm/lib/Target/AMDGPU SIPreEmitPeephole.cpp

[AMDGPU] Don't copy TargetSchedModel in SIPreEmitPeephole (NFC) (#234860)

run() and collectUnpackingCandidates copied the subtarget's scheduling
model, including its ResourceFactors vector, once per block and once per
MFMA. Bind references instead.


Assisted-by: Claude Opus 5.5
DeltaFile
+2-2llvm/lib/Target/AMDGPU/SIPreEmitPeephole.cpp
+2-21 files

LLVM/project f0ff579 — offload/libompaccsupport device.cpp, offload/test/offloading teams_reduction_grid.c

[OpenMP][offload] Size only reductions that fill the device by their size

A cross-team reduction whose loop is too short for one block per compute
unit now gets the grid of a kernel without a reduction. In SPMD mode,
that is the low-trip-count rule, which lowers the number of threads per
block to spread the iterations over more compute units. Keeping all
threads made such reductions, e.g. one of 1792 iterations, up to 2.5x
slower on MI210.

Claude assisted with this patch.
DeltaFile
+30-11offload/test/offloading/teams_reduction_grid.c
+10-6offload/libompaccsupport/device.cpp
+6-4openmp/docs/design/Runtimes.md
+46-213 files

LLVM/project 94bc8df — offload/libompaccsupport device.cpp, offload/test/offloading teams_reduction_grid.c

[OpenMP][offload] Size the grid of cross-team reductions by their size

Every block adds to the cost of combining the partial results of a
cross-team reduction. Launch one block per compute unit for reductions
that work with a reduction data size of more than 32 bytes, and enough
blocks for a per-device number of waves per compute unit (16 on AMDGPU)
for the smaller reduction data sizes, capped by the trip count. Such
kernels keep their number of threads: the low-trip-count reduction of
threads does not apply to them. libomptarget reads the number of compute
units and the platform backend of the device through liboffload, as part
of its geometry properties.

This is an upstream port of the corresponding downstream.

Claude assisted with this patch.
DeltaFile
+68-0offload/test/offloading/teams_reduction_grid.c
+60-0offload/libompaccsupport/device.cpp
+15-0openmp/docs/design/Runtimes.md
+143-03 files

LLVM/project 9243d61 — offload/libompaccsupport device.cpp, offload/test/offloading generic_spmd_grid.c

[OpenMP][offload] Trade threads for blocks in Generic-SPMD kernels

The threads of a Generic-SPMD block run the inner parallel loops, whose
trip counts are unknown. Halve the threads down to one warp while the
distribute loop has an iteration for every block, and default to 6
blocks per CU on AMDGPU (LIBOMPTARGET_AMDGPU_GENERIC_SPMD_TEAMS_PER_CU).
libomptarget reads the number of compute units and the platform backend
of the device through liboffload, as part of its geometry properties.

This is an upstream port of the corresponding downstream.

Claude assisted with this patch.
DeltaFile
+56-0offload/test/offloading/generic_spmd_grid.c
+41-5offload/libompaccsupport/device.cpp
+11-0openmp/docs/design/Runtimes.md
+108-53 files

LLVM/project a07000e — offload/libompaccsupport device.cpp, openmp/docs/design Runtimes.md

rename env var
DeltaFile
+8-8openmp/docs/design/Runtimes.md
+3-3offload/libompaccsupport/device.cpp
+11-112 files