LLVM/project c1c2658 — llvm/test/Transforms/LoopVectorize alias-mask-interleave-groups.ll runtime-checks-difference.ll

[LV] Add tests for diff checks of accesses not covering the step (NFC). (#235428)

Add a test for alias masks with a load group placed before a store,
which reorders accesses across lanes, and tests for different access
sizes in a reverse loop, with a padded type and in a nested loop.
DeltaFile
+111-0llvm/test/Transforms/LoopVectorize/runtime-checks-difference.ll
+96-0llvm/test/Transforms/LoopVectorize/alias-mask-interleave-groups.ll
+207-02 files

LLVM/project e07946b — llvm/lib/Target/AMDGPU SIFrameLowering.cpp

AMDGPU: Add implicit buffer pointer live-in for compute shaders

When setting up the scratch resource for Mesa compute shaders, the
implicit buffer pointer was copied with S_MOV_B64 without being added
as a live-in, so the machine verifier reported a use of an undefined
register. Only the graphics path, which loads through the pointer,
added it. Add the live-in on both paths.

This was exposed by the new test in #235258.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+3-3llvm/lib/Target/AMDGPU/SIFrameLowering.cpp
+3-31 files

LLVM/project 3f5eeca — llvm/lib/Target/RISCV RISCVRedundantCopyElimination.cpp RISCVPromoteConstant.cpp

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

Created using spr 1.3.7

[skip ci]
DeltaFile
+135-29llvm/lib/Target/RISCV/RISCV.h
+78-46llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
+61-58llvm/lib/Target/RISCV/RISCVMergeBaseOffset.cpp
+72-37llvm/lib/Target/RISCV/RISCVMoveMerger.cpp
+44-31llvm/lib/Target/RISCV/RISCVPromoteConstant.cpp
+41-23llvm/lib/Target/RISCV/RISCVRedundantCopyElimination.cpp
+431-22414 files not shown
+761-36720 files

LLVM/project f39c50e — llvm/lib/Target/RISCV RISCVPushPopOptimizer.cpp RISCVPromoteConstant.cpp

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+144-31llvm/lib/Target/RISCV/RISCV.h
+78-46llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
+61-58llvm/lib/Target/RISCV/RISCVMergeBaseOffset.cpp
+72-37llvm/lib/Target/RISCV/RISCVMoveMerger.cpp
+44-31llvm/lib/Target/RISCV/RISCVPromoteConstant.cpp
+52-21llvm/lib/Target/RISCV/RISCVPushPopOptimizer.cpp
+451-22415 files not shown
+825-39221 files

LLVM/project a861017 — llvm/lib/Target/RISCV RISCVInsertWriteVXRM.cpp RISCVRedundantCopyElimination.cpp

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

Created using spr 1.3.7

[skip ci]
DeltaFile
+127-27llvm/lib/Target/RISCV/RISCV.h
+78-46llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
+61-58llvm/lib/Target/RISCV/RISCVMergeBaseOffset.cpp
+44-31llvm/lib/Target/RISCV/RISCVPromoteConstant.cpp
+41-23llvm/lib/Target/RISCV/RISCVRedundantCopyElimination.cpp
+43-18llvm/lib/Target/RISCV/RISCVInsertWriteVXRM.cpp
+394-20313 files not shown
+678-32619 files

LLVM/project 57900e9 — llvm/lib/Target/RISCV RISCVRedundantCopyElimination.cpp RISCVPromoteConstant.cpp

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+135-29llvm/lib/Target/RISCV/RISCV.h
+78-46llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
+61-58llvm/lib/Target/RISCV/RISCVMergeBaseOffset.cpp
+72-37llvm/lib/Target/RISCV/RISCVMoveMerger.cpp
+44-31llvm/lib/Target/RISCV/RISCVPromoteConstant.cpp
+41-23llvm/lib/Target/RISCV/RISCVRedundantCopyElimination.cpp
+431-22414 files not shown
+761-36720 files

LLVM/project 8c4d63a — llvm/lib/Transforms/Utils VNCoercion.cpp, llvm/test/Transforms/GVN ptr-vector-coercion.ll

[GVN] Preserve provenance when forwarding `<1 x ptr>`
DeltaFile
+7-7llvm/lib/Transforms/Utils/VNCoercion.cpp
+3-9llvm/test/Transforms/GVN/ptr-vector-coercion.ll
+10-162 files

LLVM/project 349a6f3 — llvm/include/llvm/CodeGen/GlobalISel MIPatternMatch.h, llvm/unittests/CodeGen/GlobalISel PatternMatchTest.cpp

[GlobalISel] Use signed APInt comparison in constant matchers (#235494)

Use APInt::isSameValue with SignedCompare in m_SpecificICst and
m_SpecificICstOrSplat. This avoids sign-extending equal-width operands
and leaves the requested value unchanged between matches.

Assisted by: GPT-6.1-Sol
DeltaFile
+24-0llvm/unittests/CodeGen/GlobalISel/PatternMatchTest.cpp
+4-14llvm/include/llvm/CodeGen/GlobalISel/MIPatternMatch.h
+28-142 files

LLVM/project 55af52d — llvm/lib/Target/SPIRV SPIRVInstructionSelector.cpp, llvm/test/CodeGen/SPIRV/hlsl-intrinsics group_memory_barrier_with_group_sync.ll group_memory_barrier.ll

[SPIRV] Constants should always live in the entry block (#234291)

Creating constants at the point of observation / use can lead, in
complex control-flow, to their referencing by previous instructions,
which yields broken MIR. This change uses the dedicated interface to
ensure that constants are always created in the entry block and thus
dominate all uses. It is mostly NFC asides from tweaking tests that were
order dependent.
DeltaFile
+19-46llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp
+1-1llvm/test/CodeGen/SPIRV/hlsl-intrinsics/group_memory_barrier_with_group_sync.ll
+1-1llvm/test/CodeGen/SPIRV/hlsl-intrinsics/group_memory_barrier.ll
+1-1llvm/test/CodeGen/SPIRV/hlsl-intrinsics/device_memory_barrier_with_group_sync.ll
+1-1llvm/test/CodeGen/SPIRV/hlsl-intrinsics/all_memory_barrier_with_group_sync.ll
+23-505 files

LLVM/project 66e6484 — llvm/utils/gn/secondary/clang/lib/Interpreter BUILD.gn

[gn build] Port 254a47698e462 (#235499)
DeltaFile
+2-1llvm/utils/gn/secondary/clang/lib/Interpreter/BUILD.gn
+2-11 files

LLVM/project 57aa431 — llvm/utils/gn/secondary/llvm/unittests/DebugInfo/CodeView BUILD.gn

[gn build] Port 457770427ba0 (#235500)
DeltaFile
+1-0llvm/utils/gn/secondary/llvm/unittests/DebugInfo/CodeView/BUILD.gn
+1-01 files

LLVM/project bb909e2 — llvm/utils/gn/secondary/bolt/lib/Passes BUILD.gn

[gn build] Port 76c936031a4db (#235501)
DeltaFile
+1-0llvm/utils/gn/secondary/bolt/lib/Passes/BUILD.gn
+1-01 files

LLVM/project f6cacae — llvm/test/Transforms/GVN ptr-vector-coercion.ll

[GVN] Pre-commit tests for forwarding `<1 x ptr>`
DeltaFile
+63-0llvm/test/Transforms/GVN/ptr-vector-coercion.ll
+63-01 files

LLVM/project 64df596 — llvm/utils/gn/secondary/clang/lib/Driver BUILD.gn

[gn build] Port 8c5088f848519 (#235502)
DeltaFile
+1-0llvm/utils/gn/secondary/clang/lib/Driver/BUILD.gn
+1-01 files

LLVM/project c930b91 — llvm/lib/Transforms/Utils VNCoercion.cpp, llvm/test/Transforms/GVN ptr-vector-coercion.ll

[GVN] Forward pointer vectors of equal size with `bitcast`
DeltaFile
+31-12llvm/test/Transforms/GVN/ptr-vector-coercion.ll
+6-5llvm/lib/Transforms/Utils/VNCoercion.cpp
+37-172 files

LLVM/project 178736d — llvm/test/Transforms/GVN ptr-vector-coercion.ll

[GVN] Pre-commit tests for forwarding pointer vectors of equal size
DeltaFile
+65-0llvm/test/Transforms/GVN/ptr-vector-coercion.ll
+65-01 files

LLVM/project cbd3d09 — 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 7af12b1 — clang/include/clang/StaticAnalyzer/Core/PathSensitive AnalysisManager.h, clang/lib/StaticAnalyzer/Checkers ArrayBoundChecker.cpp

[analyzer][NFC] Forward-declare Preprocessor in AnalysisManager.h (#235282)

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

    [20 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 deff29e — llvm/lib/Transforms/Utils VNCoercion.cpp, llvm/test/Transforms/GVN ptr-vector-coercion.ll

[GVN] Forward pointer vectors of equal size with `bitcast`

Claude-Session: https://claude.ai/code/session_01RggpUMzkFCnThxVbU7yKpj
DeltaFile
+31-13llvm/test/Transforms/GVN/ptr-vector-coercion.ll
+8-6llvm/lib/Transforms/Utils/VNCoercion.cpp
+39-192 files

LLVM/project ba1367d — llvm/test/Transforms/GVN ptr-vector-coercion.ll

[GVN] Pre-commit tests for forwarding pointer vectors of equal size

Claude-Session: https://claude.ai/code/session_01RggpUMzkFCnThxVbU7yKpj
DeltaFile
+65-0llvm/test/Transforms/GVN/ptr-vector-coercion.ll
+65-01 files

LLVM/project ff75cbe — llvm/lib/Transforms/Utils VNCoercion.cpp, llvm/test/Transforms/GVN pr14166.ll vector-poison.ll

[GVN] Keep `poison` per lane when forwarding vectors
DeltaFile
+48-63llvm/test/Transforms/GVN/pr63059.ll
+31-50llvm/test/Transforms/GVN/vector-poison.ll
+13-2llvm/lib/Transforms/Utils/VNCoercion.cpp
+0-1llvm/test/Transforms/GVN/pr14166.ll
+92-1164 files

LLVM/project 7c00dd7 — llvm/test/Transforms/GVN vector-poison.ll

[GVN] Pre-commit tests for per-lane `poison` in forwarded vectors
DeltaFile
+244-0llvm/test/Transforms/GVN/vector-poison.ll
+244-01 files

LLVM/project 585185e — llvm/lib/Transforms/IPO MemProfContextDisambiguation.cpp, llvm/test/ThinLTO/X86 memprof-funcassigncloning2.ll memprof-duplicate-context-ids2.ll

[MemProf] Use consistent trim vs prune terminology in comments (NFC) (#235336)

Throughout the MemProf code, the intention is that "trimming" refers to
removing the portion of an allocation context toward the root that is
not needed to distinguish cold from non-cold contexts, while "pruning"
refers to removing entire unneeded contexts (e.g. small unimportant
non-cold contexts). Several comments in MemProfContextDisambiguation and
a few tests incorrectly used "pruning" when referring to context
trimming. Update them to use "trimming" for consistency with
MemoryProfileInfo.

Assisted-by: Gemini
DeltaFile
+9-9llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp
+4-4llvm/test/Transforms/MemProfContextDisambiguation/duplicate-context-ids2.ll
+4-4llvm/test/ThinLTO/X86/memprof-duplicate-context-ids2.ll
+2-2llvm/test/Transforms/MemProfContextDisambiguation/funcassigncloning2.ll
+2-2llvm/test/Transforms/MemProfContextDisambiguation/duplicate-context-ids.ll
+2-2llvm/test/ThinLTO/X86/memprof-funcassigncloning2.ll
+23-232 files not shown
+26-268 files

LLVM/project f0d0e58 — llvm/include/llvm/CodeGen/GlobalISel MIPatternMatch.h

[GlobalISel] Check binary flags before matching operands (#235451)

Reject instructions missing required flags before evaluating either
operand pattern in BinaryOp_match. This avoids unnecessary recursive
matching and output bindings for instructions that cannot match.

Assisted by: GPT 6.1-Sol
DeltaFile
+2-2llvm/include/llvm/CodeGen/GlobalISel/MIPatternMatch.h
+2-21 files

LLVM/project 955aa73 — llvm/lib/Target/BPF BPFMIPeephole.cpp, llvm/test/CodeGen/BPF zext-elim-other-users.mir

[BPF] Keep mov and shift that have other users when removing a zext (#235210)

BPFMIPeephole replaces

  %2 = MOV_32_64 %1
  %3 = SLL_ri %2, 32
  %4 = SRL_ri %3, 32

with SUBREG_TO_REG when %1 is known to be zero extended, and erases all
three insns. %2 and %3 can have other users, which then read a register
that nothing defines: "Reading virtual register without a def" with
assertions, whatever the allocator picks without them.

Erase the mov and the left shift only when they have no other users

Co-authored-by: Alexei Starovoitov <ast at kernel.org>
DeltaFile
+46-0llvm/test/CodeGen/BPF/zext-elim-other-users.mir
+8-2llvm/lib/Target/BPF/BPFMIPeephole.cpp
+54-22 files

LLVM/project 3ec201c — llvm/test/Transforms/LoopInterchange perserve-lcssa.ll preserve-lcssa.ll

[LoopInterchange] Rename perserve-lcssa.ll and regenerate test checks (NFC) (#235476)

This patch fixes the followings:

- Fix typo in the filename (perserve -> preserve)
- Use UTC instead of hand written CHECKs

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+265-0llvm/test/Transforms/LoopInterchange/preserve-lcssa.ll
+0-209llvm/test/Transforms/LoopInterchange/perserve-lcssa.ll
+265-2092 files

LLVM/project 0479cde — 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 833e853 — 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 09c6bbf — 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 (#235281)

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.

    [13 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 61f4ce7 — llvm/lib/Transforms/Utils VNCoercion.cpp, llvm/test/Transforms/GVN pr14166.ll vector-poison.ll

[GVN] Keep poison per lane when forwarding vectors
DeltaFile
+48-63llvm/test/Transforms/GVN/pr63059.ll
+31-50llvm/test/Transforms/GVN/vector-poison.ll
+13-2llvm/lib/Transforms/Utils/VNCoercion.cpp
+0-1llvm/test/Transforms/GVN/pr14166.ll
+92-1164 files