LLVM/project 49f12afllvm/lib/Transforms/Vectorize VPlanTransforms.cpp, llvm/test/Transforms/LoopVectorize first-order-recurrence-with-uniform-ops.ll

[VPlan] Only simplify ExtractLastLane of non-wide single-scalar. (#202234)

After 8e868c5, we may remove ExtractLastLane of a wide recipe that could
be single scalar but has not been narrowed. Limit to
VPInstruction/VPReplicateReceipe to fix crash in added test case.

Fixes https://github.com/llvm/llvm-project/issues/201582.
DeltaFile
+205-0llvm/test/Transforms/LoopVectorize/first-order-recurrence-with-uniform-ops.ll
+1-1llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+1-0llvm/test/Transforms/LoopVectorize/X86/replicating-load-store-costs.ll
+207-13 files

LLVM/project 3a522ffclang/lib/Format TokenAnnotator.cpp, clang/unittests/Format TokenAnnotatorTest.cpp

[clang-format] Followup cleanup after #199459 (#202104)
DeltaFile
+5-8clang/lib/Format/TokenAnnotator.cpp
+4-0clang/unittests/Format/TokenAnnotatorTest.cpp
+9-82 files

LLVM/project ec68f81llvm/lib/Target/NVPTX NVPTXTargetMachine.cpp, llvm/lib/Transforms/IPO ExpandVariadics.cpp

[NVPTX] pass variadics frame as local pointer (#201661)

Pass the pointer for variadics as a local (addrspace(5)) pointer. This
enables InferAddressSpace to convert loads of vaargs to local loads
(pipeline reordered to accomadate) and will also save a register in
short pointer mode. We leave vaListType as a generic pointer and cast
when expanding va_start to maintain backwards compatibility with IR
written expecting the va_list to be a generic pointer.
DeltaFile
+86-82llvm/test/CodeGen/NVPTX/vaargs.ll
+34-37llvm/test/CodeGen/NVPTX/variadics-backend.ll
+20-12llvm/test/CodeGen/NVPTX/variadics-lowering.ll
+14-6llvm/lib/Transforms/IPO/ExpandVariadics.cpp
+5-8llvm/test/CodeGen/NVPTX/convert-call-to-indirect.ll
+3-1llvm/lib/Target/NVPTX/NVPTXTargetMachine.cpp
+162-1466 files

LLVM/project fd1f922llvm/lib/Target/SPIRV SPIRVEmitIntrinsics.cpp, llvm/test/CodeGen/SPIRV/instructions extractvalue-aggregate-chain.ll

[SPIR-V] Rewrite extractvalue over aggregate spv_extractv result (#200065)

Chained extractvalue from an aggregate-returning call left raw IR over a
multi-register spv_extractv, crashing later in foldImm. Mutate the
producer to i32 and convert the user too
DeltaFile
+23-0llvm/test/CodeGen/SPIRV/instructions/extractvalue-aggregate-chain.ll
+8-2llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp
+31-22 files

LLVM/project a8b5711llvm/lib/Target/SPIRV SPIRVEmitIntrinsics.cpp SPIRVCallLowering.cpp, llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_masked_gather_scatter vector-of-pointers-gep.ll single-element-vector-gep-no-extension.ll

[SPIR-V] Lower vector-typed GEPs with more than 1 element in SPIRVEmitIntrinsics (#197101)

Fix spirv-val concern in the IR from #186764 with vector-typed GEPs (`<N
x ptr>`) that were lowered to a single spv_gep intrinsic with a vector
return
```
error: line 54: The Result Type of OpPtrAccessChain <id> '...' must be OpTypePointer. Found OpTypeVector.
```

Resolves #186764
DeltaFile
+111-0llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_masked_gather_scatter/vector-of-pointers-gep.ll
+70-0llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp
+24-0llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_masked_gather_scatter/single-element-vector-gep-no-extension.ll
+20-0llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_masked_gather_scatter/vector-of-pointers-gep-no-extension.ll
+13-1llvm/lib/Target/SPIRV/SPIRVCallLowering.cpp
+4-6llvm/test/CodeGen/SPIRV/pointers/getelementptr-vector-index.ll
+242-72 files not shown
+255-78 files

LLVM/project 3fc92aellvm/include/llvm/Transforms/InstCombine InstCombiner.h, llvm/lib/Transforms/InstCombine InstructionCombining.cpp InstCombineInternal.h

[InstCombine][NFC] Use custom inserter for metadata (#202206)

Proactively getting metadata for every visited instruction is expensive.
Therefore, only store the current instruction and get the metadata only
when an instruction is actually inserted.
DeltaFile
+27-8llvm/include/llvm/Transforms/InstCombine/InstCombiner.h
+18-14llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
+8-8llvm/lib/Transforms/InstCombine/InstCombineInternal.h
+53-303 files

LLVM/project 833d241llvm/include/llvm/ADT ImmutableList.h, llvm/include/llvm/CodeGen SelectionDAGNodes.h

[DenseMap] Canonicalize pointer hashes. NFC (#202226)

`(p>>4)^(p>>9)` does not mix the high bits of the address. Pointers from
one allocator grown across multiple slabs whose low-bit windows overlap
map to the same narrow bucket range, an issue fixed by #197390.

Fix by delegating to the canonical pointer hash.
DeltaFile
+2-4llvm/include/llvm/IR/Attributes.h
+2-2llvm/include/llvm/CodeGen/SelectionDAGNodes.h
+1-3llvm/include/llvm/ADT/ImmutableList.h
+5-93 files

LLVM/project 8b05911compiler-rt CMakeLists.txt

compiler-rt: Suppress -g error for gpu builds

Currently a RelWithDebInfo build fails when gpu targets
are enabled enabled as runtime targets, since clang will error
with -g.

Co-Authored-By: Claude Sonnet 4.5 <noreply at anthropic.com>
DeltaFile
+13-10compiler-rt/CMakeLists.txt
+13-101 files

LLVM/project 0672a17llvm/lib/Transforms/Vectorize VPlanTransforms.cpp VPlan.h, llvm/test/Transforms/LoopVectorize as_cast.ll

[VPlan] Use VPInstructionWithType for uniform casts. (#140623)

Use VPInstructionWithType instead of VPReplicate recipe for uniform
casts. This is a first step towards breaking up VPReplicateRecipe. Using
the general VPInstructionWithType has the additional benefit that we can
now apply a number of simplifications directly.

Depends on https://github.com/llvm/llvm-project/pull/140621

PR: https://github.com/llvm/llvm-project/pull/140623
DeltaFile
+16-13llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+14-6llvm/lib/Transforms/Vectorize/VPlan.h
+13-5llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+8-9llvm/test/Transforms/LoopVectorize/as_cast.ll
+17-0llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h
+6-6llvm/lib/Transforms/Vectorize/VPlanUnroll.cpp
+74-398 files not shown
+98-5314 files

LLVM/project ae35674llvm/utils/gn/secondary/llvm/lib/Frontend/Offloading BUILD.gn

[gn build] Port 8aafa50c7a2d (#202224)
DeltaFile
+1-0llvm/utils/gn/secondary/llvm/lib/Frontend/Offloading/BUILD.gn
+1-01 files

LLVM/project 5469908llvm/utils/gn/secondary/lldb/source/Plugins/Process/Windows/Common BUILD.gn

[gn build] Port c4f2f2535438 (#202225)
DeltaFile
+1-0llvm/utils/gn/secondary/lldb/source/Plugins/Process/Windows/Common/BUILD.gn
+1-01 files

LLVM/project 2abe68ellvm/utils/gn/secondary/llvm/unittests/ExecutionEngine/Orc BUILD.gn

[gn build] Port 36b3ffbae3bd (#202223)
DeltaFile
+1-0llvm/utils/gn/secondary/llvm/unittests/ExecutionEngine/Orc/BUILD.gn
+1-01 files

LLVM/project ed06da7clang-tools-extra/clang-tidy/modernize MacroToEnumCheck.cpp, clang-tools-extra/docs ReleaseNotes.rst

[clang-tidy] Preserve line endings in macro-to-enum fixes (#202054)

Use `StringRef::detectEOL()` when inserting enum braces so fix-its do
not mix LF into CRLF source files.

Closes https://github.com/llvm/llvm-project/issues/61593
DeltaFile
+7-2clang-tools-extra/clang-tidy/modernize/MacroToEnumCheck.cpp
+6-0clang-tools-extra/test/clang-tidy/checkers/modernize/macro-to-enum-crlf.cpp
+4-0clang-tools-extra/test/clang-tidy/checkers/modernize/Inputs/macro-to-enum/crlf.cpp.expected
+4-0clang-tools-extra/docs/ReleaseNotes.rst
+2-0clang-tools-extra/test/clang-tidy/checkers/modernize/Inputs/macro-to-enum/crlf.cpp
+2-0clang-tools-extra/test/.gitattributes
+25-26 files

LLVM/project 1c68822lld/MachO SyntheticSections.h ExportTrie.cpp

[lld-macho] Replace unordered_{map,set} with Dense{Map,Set} (#202100)

DenseMap no longer uses in-band sentinel keys (#201281) and is superior
to unordered_map in these scenarios.
DeltaFile
+4-12lld/MachO/SyntheticSections.h
+4-4lld/MachO/ExportTrie.cpp
+3-3lld/MachO/SyntheticSections.cpp
+11-193 files

LLVM/project a19c346libcxx/test/libcxx/strings/string.view nodiscard.iterator.verify.cpp

[libc++][string_view] Test [[nodiscard]] applied to `basic_string_view::const_iterator` (#202203)

Adds test coverage.

`[[nodicard]]` applied in:
- https://github.com/llvm/llvm-project/pull/198489
- https://github.com/llvm/llvm-project/pull/198492

Towards #172124
DeltaFile
+39-0libcxx/test/libcxx/strings/string.view/nodiscard.iterator.verify.cpp
+39-01 files

LLVM/project fcf1285libcxx/test/libcxx/strings/basic.string nodiscard.iterator.verify.cpp

[libc++][string] Test [[nodiscard]] applied to `basic_string::iterator` (#202202)

Adds test coverage.

`[[nodicard]]` applied in:
- https://github.com/llvm/llvm-project/pull/198489
- https://github.com/llvm/llvm-project/pull/198492

Towards #172124
DeltaFile
+52-0libcxx/test/libcxx/strings/basic.string/nodiscard.iterator.verify.cpp
+52-01 files

LLVM/project ebda53allvm/test/Transforms/LoopInterchange fp-reductions.ll reductions-across-inner-and-outer-loop.ll

[LoopInterchange] Use UTC as much as possible (NFC)
DeltaFile
+364-49llvm/test/Transforms/LoopInterchange/fp-reductions.ll
+209-117llvm/test/Transforms/LoopInterchange/reductions-across-inner-and-outer-loop.ll
+277-43llvm/test/Transforms/LoopInterchange/reductions-non-wrapped-operations.ll
+188-40llvm/test/Transforms/LoopInterchange/legality-for-scalar-deps.ll
+148-33llvm/test/Transforms/LoopInterchange/profitability-vectorization-heuristic.ll
+97-45llvm/test/Transforms/LoopInterchange/currentLimitation.ll
+1,283-32716 files not shown
+2,089-56822 files

LLVM/project 67ebc46llvm/lib/Transforms/Scalar LoopInterchange.cpp, llvm/test/Transforms/LoopInterchange reduction-anyof.ll reductions-non-wrapped-operations.ll

[LoopInterchange] Reject interchange when AnyOf reduction exists (#202092)

This patch removes `AnyOf` reductions from the legal candidates for
interchange. In some cases, especially when the result value of `AnyOf`
is loop-invariant with respect to outer loop, then the interchange
should be legal. However, at the moment, we reject all the cases
conservatively.

Fixes #202089 .
DeltaFile
+10-22llvm/test/Transforms/LoopInterchange/reduction-anyof.ll
+16-1llvm/lib/Transforms/Scalar/LoopInterchange.cpp
+6-3llvm/test/Transforms/LoopInterchange/reductions-non-wrapped-operations.ll
+32-263 files

LLVM/project e6c7b7dllvm/test/Transforms/LoopInterchange fp-reductions.ll reductions-across-inner-and-outer-loop.ll

[LoopInterchange] Use UTC as much as possible (NFC)
DeltaFile
+364-49llvm/test/Transforms/LoopInterchange/fp-reductions.ll
+209-117llvm/test/Transforms/LoopInterchange/reductions-across-inner-and-outer-loop.ll
+277-43llvm/test/Transforms/LoopInterchange/reductions-non-wrapped-operations.ll
+188-40llvm/test/Transforms/LoopInterchange/legality-for-scalar-deps.ll
+148-33llvm/test/Transforms/LoopInterchange/profitability-vectorization-heuristic.ll
+97-45llvm/test/Transforms/LoopInterchange/currentLimitation.ll
+1,283-32716 files not shown
+2,089-56822 files

LLVM/project 145abf9llvm/lib/Transforms/Scalar LoopInterchange.cpp, llvm/test/Transforms/LoopInterchange reduction-anyof.ll reductions-non-wrapped-operations.ll

[LoopInterchange] Reject interchange when AnyOf reduction exists
DeltaFile
+10-22llvm/test/Transforms/LoopInterchange/reduction-anyof.ll
+16-1llvm/lib/Transforms/Scalar/LoopInterchange.cpp
+6-3llvm/test/Transforms/LoopInterchange/reductions-non-wrapped-operations.ll
+32-263 files

LLVM/project 3b62612llvm/test/Transforms/LoopInterchange reduction-anyof.ll

[LoopInterchange] Add test for loop contains AnyOf reduction (NFC) (#202091)

This patch adds the test case raised in #202089. The issue will be fixed
by a follow-up patch #202092.
DeltaFile
+90-0llvm/test/Transforms/LoopInterchange/reduction-anyof.ll
+90-01 files

LLVM/project 1b0d35aclang/include/clang/AST DeclTemplate.h, clang/lib/Sema SemaTemplateInstantiate.cpp SemaTemplateInstantiateDecl.cpp

Merge branch 'main' into users/kasuga-fj/loop-interchange-add-test-anyof
DeltaFile
+194-429clang/lib/Sema/SemaTemplateInstantiate.cpp
+275-165clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
+151-147clang/lib/Sema/SemaTemplate.cpp
+206-0clang/test/Analysis/array-of-structs-initializer.cpp
+96-95clang/include/clang/AST/DeclTemplate.h
+59-129clang/lib/Sema/SemaConcept.cpp
+981-965127 files not shown
+2,809-2,159133 files

LLVM/project fc61956llvm/test/Transforms/LoopInterchange fp-reductions.ll reductions-across-inner-and-outer-loop.ll

[LoopInterchange] Use UTC as much as possible (NFC)
DeltaFile
+364-49llvm/test/Transforms/LoopInterchange/fp-reductions.ll
+209-117llvm/test/Transforms/LoopInterchange/reductions-across-inner-and-outer-loop.ll
+277-43llvm/test/Transforms/LoopInterchange/reductions-non-wrapped-operations.ll
+188-40llvm/test/Transforms/LoopInterchange/legality-for-scalar-deps.ll
+148-33llvm/test/Transforms/LoopInterchange/profitability-vectorization-heuristic.ll
+97-45llvm/test/Transforms/LoopInterchange/currentLimitation.ll
+1,283-32716 files not shown
+2,089-56822 files

LLVM/project 1f7c5f1llvm/lib/Transforms/Scalar LoopInterchange.cpp, llvm/test/Transforms/LoopInterchange reduction-anyof.ll reductions-non-wrapped-operations.ll

[LoopInterchange] Reject interchange when AnyOf reduction exists
DeltaFile
+10-22llvm/test/Transforms/LoopInterchange/reduction-anyof.ll
+16-1llvm/lib/Transforms/Scalar/LoopInterchange.cpp
+6-3llvm/test/Transforms/LoopInterchange/reductions-non-wrapped-operations.ll
+32-263 files

LLVM/project 5ddae7aclang/lib/StaticAnalyzer/Core RegionStore.cpp, clang/test/Analysis array-of-structs-initializer.cpp initialization.cpp

[analyzer] Generalize field initializer resolution in RegionStore (#189361)

Replace the ad-hoc blocks in getBindingForField with a single helper
getConstantValFromInitializer that walks up the region chain to a
VarRegion, then walks down the InitListExpr (semantic form) by field
and element indices. Handles arbitrary nesting depth, including
multidimensional arrays of structs and structs containing arrays.

The same trust conditions apply: const-qualified types are always
trusted, and non-const globals are trusted when analyzing main().
For C++ structs with user-defined constructors, we conservatively
fall through to the symbolic path because the constructor body may
establish values that differ from the InitListExpr. Resolving
constructor-initialized values is left to a separate change.

Union initializers are handled by matching the accessed field against
the initialized member, accesses to inactive union members return
unknown.


    [6 lines not shown]
DeltaFile
+206-0clang/test/Analysis/array-of-structs-initializer.cpp
+89-24clang/lib/StaticAnalyzer/Core/RegionStore.cpp
+1-2clang/test/Analysis/initialization.cpp
+296-263 files

LLVM/project 11a7d2bllvm/test/Transforms/LoopInterchange reduction-anyof.ll

[LoopInterchange] Add test for loop contains AnyOf reduction (NFC)
DeltaFile
+90-0llvm/test/Transforms/LoopInterchange/reduction-anyof.ll
+90-01 files

LLVM/project 4b0da1allvm/lib/TableGen TGParser.cpp, llvm/test/TableGen switch.td

[TableGen] Fix crash of !switch parse in defvar context (#202119)

`ListInit::convertInitializerTo()` and similar variants do not perform a
nullptr check. Adding a check to the caller parse method and a test case
for defvar.
DeltaFile
+28-0llvm/test/TableGen/switch.td
+6-4llvm/lib/TableGen/TGParser.cpp
+34-42 files

LLVM/project b46f0f8llvm/lib/Transforms/Utils ScalarEvolutionExpander.cpp, llvm/test/Transforms/IndVarSimplify callbr.ll

[SCEVExpander] Do not insert after callbr (#201322)

findInsertPointAfter handle invoke and otherwise use the instruction
after def instruction as the insertion point.

This is not valid for callbr which is a terminator. Advancing the
iterator moves the insertion point past the terminator, and the
following code uses that invalid position, e.g when asm goto lowers to
callbr in #200987

Use the insertion point before MustDominate for callbr.

Fixes #200987
DeltaFile
+51-0llvm/test/Transforms/IndVarSimplify/callbr.ll
+6-12llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
+57-122 files

LLVM/project 2f5f230clang/lib/CIR/CodeGen CIRGenModule.cpp CIRGenModule.h, clang/test/CIR/CodeGenOpenCL kernel-arg-info.cl kernel-arg-info-single-as.cl

[CIR][OpenCL] Attach kernel argument metadata to CIR functions

Emit the CIR OpenCL kernel argument metadata attribute for kernel functions. Preserve CIR language address-space kinds until lowering and include argument names only when `-cl-kernel-arg-info` is enabled.
DeltaFile
+152-0clang/test/CIR/CodeGenOpenCL/kernel-arg-info.cl
+91-0clang/lib/CIR/CodeGen/CIRGenModule.cpp
+19-0clang/test/CIR/CodeGenOpenCL/kernel-arg-info-single-as.cl
+12-0clang/test/CIR/CodeGenOpenCL/kernel-arg-metadata.cl
+5-0clang/test/CIR/CodeGenOpenCL/invalid-kernel-arg-metadata-target-address-space.cl
+4-0clang/lib/CIR/CodeGen/CIRGenModule.h
+283-01 files not shown
+286-07 files

LLVM/project b577049llvm/include/llvm/Transforms/InstCombine InstCombiner.h, llvm/lib/Transforms/InstCombine InstructionCombining.cpp InstCombineInternal.h

[spr] initial version

Created using spr 1.3.8-wip
DeltaFile
+27-8llvm/include/llvm/Transforms/InstCombine/InstCombiner.h
+18-14llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
+8-8llvm/lib/Transforms/InstCombine/InstCombineInternal.h
+53-303 files