LLVM/project 38702e0llvm/test/Transforms/InstCombine icmp-add.ll

[InstCombine][NFC] Add test for existing fold (#181555)

Resolves #73417.

The fold described in #73417 is already present in LLVM `main`, but it
isn't tested for specifically. This PR adds a test for this fold, based
on the IR in the topmost comment of that issue.
DeltaFile
+23-0llvm/test/Transforms/InstCombine/icmp-add.ll
+23-01 files

LLVM/project 255b493llvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer big-number-reduced-values.ll

[SLP]Do not overflow number of the reduced values

Need to trunc the total number of the reduced values, in case if the
number is too big

Fixes #181520
DeltaFile
+14-0llvm/test/Transforms/SLPVectorizer/big-number-reduced-values.ll
+3-1llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+17-12 files

LLVM/project c3f5e45cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb mlir-support.gdb, flang/lib/Optimizer/CodeGen CodeGen.cpp

rename
DeltaFile
+3-3flang/lib/Optimizer/CodeGen/CodeGen.cpp
+3-3mlir/test/Dialect/Builtin/Bytecode/attrs.mlir
+2-3mlir/lib/Bindings/Python/IRAttributes.cpp
+1-4mlir/include/mlir/IR/BuiltinAttributes.td
+2-2cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb/mlir-support.gdb
+1-1mlir/docs/Tutorials/Toy/Ch-2.md
+12-161 files not shown
+13-177 files

LLVM/project c087fffllvm/test/tools/llubi vector.ll struct.ll, llvm/tools/llubi/lib Interpreter.cpp Value.h

[llubi] Add basic support for vector and aggregate ops (#181544)

DeltaFile
+64-0llvm/tools/llubi/lib/Interpreter.cpp
+35-0llvm/test/tools/llubi/vector.ll
+20-0llvm/test/tools/llubi/struct.ll
+6-0llvm/tools/llubi/lib/Value.h
+125-04 files

LLVM/project ecc8dd5mlir/include/mlir/IR BuiltinAttributes.h BuiltinAttributes.td

move to TD
DeltaFile
+0-42mlir/include/mlir/IR/BuiltinAttributes.h
+16-8mlir/include/mlir/IR/BuiltinAttributes.td
+16-502 files

LLVM/project b196067.github/workflows libc-fullbuild-tests.yml

[Github][libc] Use a container for fullbuild tests (#181436)

This avoids needing to set up deps every time and avoids failures due to
failed dependency installation.

Closed #150490.
DeltaFile
+11-17.github/workflows/libc-fullbuild-tests.yml
+11-171 files

LLVM/project 2e885b9mlir/include/mlir/IR BuiltinAttributes.h BuiltinAttributes.td, mlir/lib/IR BuiltinAttributes.cpp AsmPrinter.cpp

[mlir][IR] Rename + merge DenseElementsAttr
DeltaFile
+164-582mlir/include/mlir/IR/BuiltinAttributes.h
+255-38mlir/include/mlir/IR/BuiltinAttributes.td
+40-62mlir/lib/IR/BuiltinAttributes.cpp
+5-21mlir/lib/IR/AsmPrinter.cpp
+5-5mlir/lib/IR/AttributeDetail.h
+2-3mlir/include/mlir/IR/BuiltinDialectBytecode.td
+471-7119 files not shown
+484-72515 files

LLVM/project e86750bllvm/test/tools/llubi controlflow.ll stack_overflow.ll, llvm/tools/llubi/lib Interpreter.cpp Context.cpp

[llubi] Add basic support for icmp, terminators and function calls (#181393)

Note: icmp with integers is also introduced in this patch, as it is
needed to compute branch conditions.
DeltaFile
+430-0llvm/test/tools/llubi/controlflow.ll
+251-3llvm/tools/llubi/lib/Interpreter.cpp
+107-0llvm/test/tools/llubi/stack_overflow.ll
+63-4llvm/tools/llubi/lib/Context.cpp
+23-0llvm/test/tools/llubi/infinite_loop.ll
+17-2llvm/tools/llubi/lib/Context.h
+891-913 files not shown
+1,036-919 files

LLVM/project 70905e0llvm/docs ReleaseNotes.md, llvm/lib/Analysis BranchProbabilityInfo.cpp

[RFC][IR] Remove `Constant::isZeroValue` (#181521)

`Constant::isZeroValue` currently behaves same as
`Constant::isNullValue` for all types except floating-point, where it
additionally returns true for negative zero (`-0.0`). However, in
practice, almost all callers operate on integer/pointer types where the
two are equivalent, and the few FP-relevant callers have no meaningful
dependence on the `-0.0` behavior.

This PR removes `isZeroValue` to eliminate the confusing API. All
callers are changed to `isNullValue` with no test failures.

`isZeroValue` will be reintroduced in a future change with clearer
semantics: when null pointers may have non-zero bit patterns,
`isZeroValue` will check for bitwise-all-zeros, while `isNullValue` will
check for the semantic null (which
may be non-zero).
DeltaFile
+9-9llvm/unittests/Analysis/ValueLatticeTest.cpp
+1-17llvm/lib/IR/Constants.cpp
+3-3llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
+6-0llvm/docs/ReleaseNotes.md
+2-3llvm/lib/Analysis/BranchProbabilityInfo.cpp
+2-2llvm/lib/IR/AutoUpgrade.cpp
+23-3430 files not shown
+60-7436 files

LLVM/project 0f7791eclang/bindings/python/clang cindex.py

[clang][Python] Use str.format instead of string concatenations (#173861)

This PR replaces string concatenations and the older `%` string
interpolation with `str.format`. Changes along those lines were
originally a part of #173845, but they were moved to a new PR,
where it was decided that `str.format` is preferable over
f-strings.

Changes in this commit are identical to
abf1d0bea04ab5d5ed1be3708ce1cd86707d5c8f, but commit title and
description were changed to correctly reflect the changes.
DeltaFile
+30-37clang/bindings/python/clang/cindex.py
+30-371 files

LLVM/project 152d811clang/bindings/python/clang cindex.py

Revert "[clang][Python] Use fstrings instead of string concatenations (#173861)"

This reverts commit abf1d0bea04ab5d5ed1be3708ce1cd86707d5c8f,
because its title and description are entirely wrong.
f-strings is what was initially proposed, but then it was decided
to go with `str.format`.
DeltaFile
+37-30clang/bindings/python/clang/cindex.py
+37-301 files

LLVM/project bcbb04aclang/lib/Frontend ASTUnit.cpp LayoutOverrideSource.cpp

[clang] Add explicit std::move(...) to avoid a few copies (#180478)

Moving an std::shared_ptr is always profitable (marginally).

Moving a clang::LayoutOverrideSource::Layout may be profitable depending
on the size of the underlying llvm::SmallVector.

Changes suggested by performance-use-std-move from #179467
DeltaFile
+2-2clang/lib/Frontend/ASTUnit.cpp
+1-1clang/lib/Frontend/LayoutOverrideSource.cpp
+3-32 files

LLVM/project f3a8165llvm/lib/Transforms/Vectorize VPlanTransforms.cpp VPlan.cpp

[VPlan] Add VPSymbolicValue for UF. (NFC)

Add a symbolic unroll factor (UF) to VPlan similar to VF & VFxUF that
gets replaced with the concrete UF during plan execution, similar to how VF
is used for the vectorization factor. This is a preparatory change that
allows transforms to use the symbolic UF before the concrete UF is
determined.

Note that the old getUF that returns the concrete UF after unrolling has
been renamed to getConcreteUF.

Split off from the re-commit of 8d29d093096
(https://github.com/llvm/llvm-project/pull/149706) as suggested.
DeltaFile
+13-10llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+11-2llvm/lib/Transforms/Vectorize/VPlan.cpp
+8-1llvm/lib/Transforms/Vectorize/VPlan.h
+4-3llvm/lib/Transforms/Vectorize/VPlanTransforms.h
+1-1llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+1-1llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
+38-186 files

LLVM/project ca9d07ellvm/lib/Target/AArch64 AArch64ISelLowering.cpp, llvm/test/CodeGen/AArch64 faddv.ll

[AArch64] Decompose FADD reductions with known zero elements

FADDV is matched into FADDPv4f32 + FADDPv2f32p but this can be relaxed
when one element (usually the 4th) or more are known to be zero.

Before:
movi d1, #0000000000000000
mov v0.s[3], v1.s[0]
faddp v0.4s, v0.4s, v0.4s
faddp s0, v0.2s

After:
mov s1, v0.s[2]
faddp s0, v0.2s
fadd s0, s0, s1
DeltaFile
+256-0llvm/test/CodeGen/AArch64/faddv.ll
+101-0llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+357-02 files

LLVM/project c0c2e38mlir/include/mlir/Interfaces DataLayoutInterfaces.td DataLayoutInterfaces.h

[MLIR] Generate DataLayoutDialectInterface using ODS (#181217)

This PR converts DataLayoutDialectInterface to a ODS dialect
interface.
DeltaFile
+60-0mlir/include/mlir/Interfaces/DataLayoutInterfaces.td
+1-46mlir/include/mlir/Interfaces/DataLayoutInterfaces.h
+1-0mlir/include/mlir/Interfaces/CMakeLists.txt
+62-463 files

LLVM/project f26e859llvm/lib/Transforms/Vectorize VPlanTransforms.cpp VPlanConstruction.cpp

[VPlan] Use VPlan::getConstantInt in a few more cases (NFC).

VPlan::getConstantInt() allows for slightly more compact creation of
VPIRValues wrapping ConstantInts.
DeltaFile
+8-12llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+1-2llvm/lib/Transforms/Vectorize/VPlanConstruction.cpp
+9-142 files

LLVM/project de9ef4cmlir/include/mlir/IR BuiltinAttributes.td BuiltinAttributes.h, mlir/lib/AsmParser AttributeParser.cpp

[mlir][IR] Separate `DenseStringElementsAttr` from `DenseElementsAttr`
DeltaFile
+93-17mlir/include/mlir/IR/BuiltinAttributes.td
+25-45mlir/lib/IR/BuiltinAttributes.cpp
+24-13mlir/unittests/IR/AttributeTest.cpp
+7-30mlir/include/mlir/IR/BuiltinAttributes.h
+26-10mlir/lib/AsmParser/AttributeParser.cpp
+14-8mlir/lib/CAPI/IR/BuiltinAttributes.cpp
+189-1233 files not shown
+192-1309 files

LLVM/project 638224bmlir/include/mlir/IR BuiltinAttributes.td BuiltinAttributes.h, mlir/lib/AsmParser AttributeParser.cpp

[mlir][IR] Separate `DenseStringElementsAttr` from `DenseElementsAttr`
DeltaFile
+93-17mlir/include/mlir/IR/BuiltinAttributes.td
+25-45mlir/lib/IR/BuiltinAttributes.cpp
+27-12mlir/unittests/IR/AttributeTest.cpp
+7-30mlir/include/mlir/IR/BuiltinAttributes.h
+27-10mlir/lib/AsmParser/AttributeParser.cpp
+14-8mlir/lib/CAPI/IR/BuiltinAttributes.cpp
+193-1223 files not shown
+198-1299 files

LLVM/project a108b9emlir/include/mlir/IR BuiltinTypeInterfaces.td BuiltinAttributes.td, mlir/lib/AsmParser AttributeParser.cpp

[mlir][WIP] `DenseElementsAttr` generalized

getter / iterator via interface

extraTraitClassDeclaration to provide default FloatType impls

address comments

simplify parser
DeltaFile
+124-1mlir/lib/AsmParser/AttributeParser.cpp
+25-92mlir/lib/IR/BuiltinAttributes.cpp
+87-0mlir/lib/IR/BuiltinTypes.cpp
+83-0mlir/test/IR/dense-elements-type-interface.mlir
+74-1mlir/include/mlir/IR/BuiltinTypeInterfaces.td
+32-13mlir/include/mlir/IR/BuiltinAttributes.td
+425-1078 files not shown
+579-11914 files

LLVM/project 47abe86clang/lib/Analysis CFG.cpp, clang/test/Analysis cfg-assignment-eval-order.cpp missing-bind-temporary.cpp

[clang][CFG] Sequence RHS before LHS for overloaded assignment operators in CFG to match C++17 rules (#181113)

Fixes #180521
DeltaFile
+55-0clang/test/Analysis/cfg-assignment-eval-order.cpp
+34-2clang/lib/Analysis/CFG.cpp
+17-17clang/test/Analysis/missing-bind-temporary.cpp
+4-4clang/test/Analysis/scopes-cfg-output.cpp
+110-234 files

LLVM/project 2b35e88clang/test/Headers __clang_hip_math.hip, llvm/lib/Analysis ValueTracking.cpp

Address comments
DeltaFile
+193-245llvm/test/CodeGen/AMDGPU/div_v2i128.ll
+63-44llvm/lib/Analysis/ValueTracking.cpp
+44-51llvm/test/CodeGen/AMDGPU/srem64.ll
+22-28llvm/test/CodeGen/AMDGPU/urem64.ll
+24-24clang/test/Headers/__clang_hip_math.hip
+13-21llvm/test/CodeGen/AMDGPU/udiv64.ll
+359-41312 files not shown
+423-49218 files

LLVM/project afd4df0llvm/include/llvm/CodeGen SelectionDAG.h, llvm/lib/CodeGen/SelectionDAG SelectionDAG.cpp

[DAG] isKnownToBeAPowerOfTwo - add DemandedElts, OrZero arguments and support for zero constants (#181485)

Update the signature for isKnownToBeAPowerOfTwo methods to take
DemandedElts and OrZero arguments.

So far all I've done is add OrZero support for constants
(scalars/buildvector/splat), with the intention to incrementally extend
support in the future (or spread the work as beginner GFI patches).

Similarly the DemandedElts argument is currently only used for constant
build vector tests but support can be extended in future patches.

Fixes #178938
DeltaFile
+56-23llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+46-0llvm/unittests/Target/AArch64/AArch64SelectionDAGTest.cpp
+13-2llvm/include/llvm/CodeGen/SelectionDAG.h
+115-253 files

LLVM/project ee9aeb4llvm/lib/CodeGen CodeGenPrepare.cpp, llvm/lib/Transforms/Scalar InferAddressSpaces.cpp

[NFC] Fix typos 'bicast' -> 'bitcast' (#180890)

Fix typos bicast -> bitcast. I find this when I'm resovling a codegen
prepare optimazation.
DeltaFile
+1-1llvm/lib/Transforms/Scalar/InferAddressSpaces.cpp
+1-1llvm/lib/CodeGen/CodeGenPrepare.cpp
+2-22 files

LLVM/project 241b887llvm/utils/TableGen DAGISelMatcherOpt.cpp

[TableGen] Silence a warning (NFC)

llvm-project/llvm/utils/TableGen/DAGISelMatcherOpt.cpp:495:16:
 error: unused variable 'Tmp' [-Werror,-Wunused-variable]
      Matcher *Tmp =
               ^
1 error generated.
DeltaFile
+1-1llvm/utils/TableGen/DAGISelMatcherOpt.cpp
+1-11 files

LLVM/project 4ab66e4llvm/utils/TableGen DAGISelMatcherOpt.cpp

[TableGen] Combine FactorNodes and FactorScope. NFC

These were separated in 31db7afacf4dae051fcd0da22e440813663b61f3
due to the complexity of the rebindable unique_ptr. With the
switch to MatcherList, the code is not as complicated.
DeltaFile
+19-22llvm/utils/TableGen/DAGISelMatcherOpt.cpp
+19-221 files

LLVM/project 8d971c0llvm/utils/TableGen DAGISelMatcherOpt.cpp DAGISelMatcher.h

Reapply "[TableGen] Introduce MatcherList to manage a linked list of Matchers. NFC (#177875)"

With fixes to the slice_after functions to avoid dereferencing the
before_begin() iterator. Deferencing the iterator casts a pointer
to the BeforeBegin object to Matcher*, but the BeforeBegin object
is not a Matcher. This caused a failure when built with gcc.

Original commit message:

The previous memory management involved passing around references to the
std::unique_ptr next pointer in each Matcher. Scopes and
SwitchOpcode/SwitchType did not use std::unique_ptr internally, but
would sometimes need to have the pointers to their children moved to
temporary std::unique_ptrs that may be modified and then put back into
the Scope/Switch. Other code used manual deletion.

This patch introduces a MatcherList object that encapsulates list
management and ownership. The interface is based on std::forward_list
using the libcxx implementation for reference.

    [15 lines not shown]
DeltaFile
+222-202llvm/utils/TableGen/DAGISelMatcherOpt.cpp
+251-59llvm/utils/TableGen/DAGISelMatcher.h
+53-59llvm/utils/TableGen/DAGISelMatcherEmitter.cpp
+15-61llvm/utils/TableGen/DAGISelMatcher.cpp
+14-17llvm/utils/TableGen/DAGISelMatcherGen.cpp
+8-8llvm/utils/TableGen/DAGISelEmitter.cpp
+563-4066 files

LLVM/project 104e82blld/ELF/Arch PPC64.cpp

[ELF,PPC64] Inline toAddr16Rel and TLS remapping into the main relocate switch

Delete the toAddr16Rel helper and the GOT_TLS-to-GOT16 remapping switch,
inlining their val adjustments as fallthrough cases in the main switch.
This reduces relocate() from 4 switches on type to 2 (TLS relaxation
pre-switch with early returns, and the unified write switch).
DeltaFile
+114-131lld/ELF/Arch/PPC64.cpp
+114-1311 files

LLVM/project b33350fllvm/include/llvm/ADT RadixTree.h

[ADT] Fix RadixTree singular iterator use in findOrCreate (#181510)

The root node's Key is initialized with default-constructed (singular)
iterators. When findOrCreate calls llvm::mismatch(Key, Curr->Key) on the
first loop iteration where Curr is the root, these singular iterators
are passed to std::mismatch. _GLIBCXX_DEBUG correctly rejects them as
not forming a valid iterator range.

Skip the mismatch when Curr is the root node since its key is
conceptually empty, making the mismatch a no-op.

Fixes a test failure in ADTTests/RadixTreeTypeTest introduced by
5fda2a5d9c1a ("[NFC][ADT] Add RadixTree (#164524)").
DeltaFile
+14-9llvm/include/llvm/ADT/RadixTree.h
+14-91 files

LLVM/project 02429c4llvm/lib/Transforms/Vectorize VPlanTransforms.cpp

[LV] Fix strict weak ordering violation in handleUncountableEarlyExits sort (#181462)

The sort comparator used VPDT.dominates() which returns true for
dominates(A, A), violating the irreflexivity requirement of strict weak
ordering. With _GLIBCXX_DEBUG enabled (LLVM_ENABLE_EXPENSIVE_CHECKS=ON),
std::sort validates this property and aborts:

Error: comparison doesn't meet irreflexive requirements, assert(!(a <
a)).

Use properlyDominates() instead, which correctly returns false for equal
inputs while preserving the intended dominance-based ordering.

This fixes a crash introduced by ede1a9626b89 ("[LV] Vectorize early
exit loops with multiple exits.").
DeltaFile
+1-1llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+1-11 files

LLVM/project 5548b24clang-tools-extra/clang-tidy/readability NonConstParameterCheck.cpp, clang-tools-extra/docs ReleaseNotes.rst

[clang-tidy] Fix false positive for generic lambda parameters in readability-non-const-parameter (#179051)

Fixes #177354

### Summary
The `readability-non-const-parameter` check produces false positives on
generic lambda parameters, not fully resolved by #177345.

### Problem
Generic lambdas with explicit template parameters create dependent
contexts that cannot be analyzed at parse time:

```cpp
auto lambda = []<typename T>(int *p) {
  T x(*p);   // No longer warns
};
```
DeltaFile
+14-5clang-tools-extra/clang-tidy/readability/NonConstParameterCheck.cpp
+9-0clang-tools-extra/test/clang-tidy/checkers/readability/non-const-parameter.cpp
+2-1clang-tools-extra/docs/ReleaseNotes.rst
+25-63 files