LLVM/project f62adeallvm/utils profcheck-xfail.txt

[ProfCheck] Exclude new GVN test

Added in a recent PR. We still have not gotten through GVN, so this is
likely caused by existing code. Exclude it to keep the bot green.
DeltaFile
+1-0llvm/utils/profcheck-xfail.txt
+1-01 files

LLVM/project 3cf53f6llvm/lib/Transforms/Vectorize LoopVectorize.cpp, llvm/test/Transforms/LoopVectorize/X86 iv-live-outs.ll

[LV] Handle sunk reverse VPInstruction in planContainsAdditionalSimps.

Licm can now sink reverse VPInstructions outside the loop region; they
won't be considered when computing costs. Account for that in
planContainsAdditionalSimplifications.

Fixes https://github.com/llvm/llvm-project/issues/183592.
DeltaFile
+85-29llvm/test/Transforms/LoopVectorize/X86/iv-live-outs.ll
+9-2llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+94-312 files

LLVM/project b788eefclang/lib/Sema SemaExpr.cpp, clang/test/Sema sugar-common-types.c

Address comments

Created using spr 1.3.7
DeltaFile
+62-0llvm/test/Transforms/SLPVectorizer/X86/disjoint-or-reductions.ll
+8-23mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
+8-7llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+12-0mlir/test/Dialect/Tensor/fold-constant-extract-slice.mlir
+5-1clang/test/Sema/sugar-common-types.c
+2-2clang/lib/Sema/SemaExpr.cpp
+97-332 files not shown
+101-338 files

LLVM/project 1dc85c6clang-tools-extra/clang-tidy/utils LexerUtils.cpp LexerUtils.h, clang-tools-extra/unittests/clang-tidy LexerUtilsTest.cpp

[clang-tidy][NFC] Add `getCommentsInRange` utility (#183940)

DeltaFile
+119-0clang-tools-extra/unittests/clang-tidy/LexerUtilsTest.cpp
+23-4clang-tools-extra/clang-tidy/utils/LexerUtils.cpp
+5-0clang-tools-extra/clang-tidy/utils/LexerUtils.h
+147-43 files

LLVM/project 48209b6llvm/lib/CodeGen/SelectionDAG SelectionDAG.cpp, llvm/test/CodeGen/X86 known-pow2.ll

[DAG] isKnownToBeAPowerOfTwo - add ISD::EXTRACT_VECTOR_ELT handling (#183924)

Initialize DemandedElts mask when the index is constant and inbounds, otherwise check all elements.
DeltaFile
+21-0llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+3-5llvm/test/CodeGen/X86/known-pow2.ll
+24-52 files

LLVM/project a13afe8llvm/test/Transforms/SLPVectorizer/X86 disjoint-or-reductions.ll

[SLP][NFC]Add more bitcast/bswap tests with immediate loads, NFC
DeltaFile
+67-0llvm/test/Transforms/SLPVectorizer/X86/disjoint-or-reductions.ll
+67-01 files

LLVM/project 3041c90mlir/lib/Dialect/Tensor/IR TensorOps.cpp, mlir/test/Dialect/Tensor fold-constant-extract-slice.mlir

[mlir][tensor] Remove hard-coded types from `ConstantOpExtractSliceFolder` (#184013)

Use the `Attribute` API, which works with arbitrary element types.
DeltaFile
+8-23mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
+12-0mlir/test/Dialect/Tensor/fold-constant-extract-slice.mlir
+20-232 files

LLVM/project 707a55cllvm/lib/Transforms/Vectorize SLPVectorizer.cpp

Fix formatting

Created using spr 1.3.7
DeltaFile
+1-2llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+1-21 files

LLVM/project 4b865fallvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/X86 disjoint-or-reductions.ll

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+49-18llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+4-6llvm/test/Transforms/SLPVectorizer/X86/disjoint-or-reductions.ll
+53-242 files

LLVM/project e4301c4utils/bazel/llvm-project-overlay/llvm BUILD.bazel

[bazel] Fix windows stack space on llvm driver link (#182998)

Bazel was missing this logic from cmake:
https://github.com/llvm/llvm-project/blob/cd200c8dfae0de1602b59011381377d147a86bdb/llvm/cmake/modules/HandleLLVMOptions.cmake#L567-L580
DeltaFile
+3-0utils/bazel/llvm-project-overlay/llvm/BUILD.bazel
+3-01 files

LLVM/project 4515297clang/docs ReleaseNotes.rst, clang/lib/Sema SemaExpr.cpp

[clang] fix common type calculation for l-values of 'void' type (#183972)

Fixes #111300
DeltaFile
+5-1clang/test/Sema/sugar-common-types.c
+2-2clang/lib/Sema/SemaExpr.cpp
+1-0clang/docs/ReleaseNotes.rst
+8-33 files

LLVM/project 02c7a6cllvm/test/Transforms/SLPVectorizer/X86 disjoint-or-reductions.ll

[SLP][NFC]Add tests for bitcasts/bswaps with large target type
DeltaFile
+101-0llvm/test/Transforms/SLPVectorizer/X86/disjoint-or-reductions.ll
+101-01 files

LLVM/project 406413dclang/docs ReleaseNotes.rst, clang/lib/Sema SemaExpr.cpp

[clang] fix common type calculation for l-values of 'void' type

Fixes #111300
DeltaFile
+5-1clang/test/Sema/sugar-common-types.c
+2-2clang/lib/Sema/SemaExpr.cpp
+1-0clang/docs/ReleaseNotes.rst
+8-33 files

LLVM/project ae79165clang/include/clang/Basic DiagnosticASTKinds.td, clang/lib/AST ItaniumMangle.cpp MicrosoftMangle.cpp

[clang][NFC][diagnostics] Remove several uses of `getCustomDiagID()` (#172532)

This change converts all existing uses of `getCustomDiagID()` within the
`clang/AST` library into regular diagnostics defined in
`DiagnosticASTKinds.td`.

This is mostly just cleanup, but it will also help with future changes
to the diagnostic system by letting us focus on the custom diagnostic
scenarios that _don't_ fit into the usual pre-declared diagnostic
scenario.
DeltaFile
+27-42clang/lib/AST/ItaniumMangle.cpp
+32-0clang/include/clang/Basic/DiagnosticASTKinds.td
+14-14clang/test/CodeGenObjC/aarch64-sve-types.m
+5-9clang/lib/AST/MicrosoftMangle.cpp
+3-5clang/lib/AST/VTableBuilder.cpp
+3-3clang/lib/AST/ASTContext.cpp
+84-731 files not shown
+86-767 files

LLVM/project 480ae86mlir/lib/Dialect/Tensor/IR TensorOps.cpp, mlir/test/Dialect/Tensor fold-constant-extract-slice.mlir

[mlir][tensor] Remove hard-coded types from `ConstantOpExtractSliceFolder`
DeltaFile
+8-23mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
+12-0mlir/test/Dialect/Tensor/fold-constant-extract-slice.mlir
+20-232 files

LLVM/project 320220ellvm/lib/Transforms/Vectorize LoopVectorizationLegality.cpp VPlanTransforms.cpp, llvm/test/Transforms/LoopVectorize predicated-multiple-exits.ll predicated-early-exits-interleave.ll

[VPlan] Support arbitrary predicated early exits. (#182396)

This removes the restriction requiring a single predicated early exit.
Using MaskedCond, we only combine early-exit conditions with block
masks from non-exiting control flow.

This means we have to ensure that we check the early exit conditions in
program order, to make sure we take the first exit in program order that
exits at the first lane for the combined exit condition.

To do so, sort the exits by their reverse post-order numbers.

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

PR: https://github.com/llvm/llvm-project/pull/182396
DeltaFile
+275-152llvm/test/Transforms/LoopVectorize/predicated-multiple-exits.ll
+82-25llvm/test/Transforms/LoopVectorize/predicated-early-exits-interleave.ll
+0-72llvm/test/Transforms/LoopVectorize/unsupported_early_exit.ll
+0-31llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
+20-3llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+5-2llvm/test/Transforms/LoopVectorize/early_exit_legality.ll
+382-2856 files

LLVM/project 9730d31llvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/AArch64 revec-reductions.ll

[SLP]Fix types for reductions in revec

Need to consider vector inputs, when building casts for the reduced
values

Fixes #170828
DeltaFile
+82-0llvm/test/Transforms/SLPVectorizer/AArch64/revec-reductions.ll
+12-3llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+94-32 files

LLVM/project 7b26069llvm/lib/Transforms/Vectorize VPlan.cpp, llvm/test/Transforms/LoopVectorize/AArch64 force-target-instruction-cost.ll

[VPlan] Pass ForceTargetInstructionCost insted of NumOccurences.

Update code incorrectly passing
ForceTargetInstructionCost.getNumOccurrences().

Fixes a cost-divergence with legacy cost model.
DeltaFile
+246-0llvm/test/Transforms/LoopVectorize/AArch64/force-target-instruction-cost.ll
+1-1llvm/lib/Transforms/Vectorize/VPlan.cpp
+247-12 files

LLVM/project a6e7c38llvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/AArch64 revec-select-scalar-vector-cond.ll

[SLP]Do not vectorize select nodes with scalar and vector conditions

If the select nodes contains selects with mixed scalar/vector
conditions, such nodes should not be revectorized.

Fixes #170836
DeltaFile
+29-0llvm/test/Transforms/SLPVectorizer/AArch64/revec-select-scalar-vector-cond.ll
+17-0llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+46-02 files

LLVM/project 49b77e3llvm/include/llvm/IR PatternMatch.h, llvm/lib/Transforms/Vectorize VectorCombine.cpp

[VectorCombine] Fold sign-bit check for multiple vectors (#182911)

## Alive2 proofs

| Reduction | Shift | Cmp      | Sources | Proof |
|-----------|-------|----------|---------|-------|
| add | lshr | == 0 | 2 | [proof](https://alive2.llvm.org/ce/z/f44vco) |
| add | lshr | == 8 | 2 | [proof](https://alive2.llvm.org/ce/z/Ks_nea) |
| add | ashr | == 0 | 2 | [proof](https://alive2.llvm.org/ce/z/ZsXJ5k) |
| add | ashr | == -8 | 2 | [proof](https://alive2.llvm.org/ce/z/HZfans)
|
| add | lshr | == 0 | 3 | [proof](https://alive2.llvm.org/ce/z/x-dEdz) |
| add | lshr | == 12 | 3 | [proof](https://alive2.llvm.org/ce/z/sfNvhr)
|

These proofs are not very exhaustive, but somewhat show that it works
for addition. Apart from the fact that we use multiple vectors, the
proofs from the previous changes generally apply here as well because we
effectively match on reductions of size M x N.
DeltaFile
+348-0llvm/test/Transforms/VectorCombine/X86/fold-signbit-reduction-cmp.ll
+348-0llvm/test/Transforms/VectorCombine/RISCV/fold-signbit-reduction-cmp.ll
+333-2llvm/test/Transforms/VectorCombine/AArch64/fold-signbit-reduction-cmp.ll
+115-30llvm/lib/Transforms/Vectorize/VectorCombine.cpp
+10-0llvm/include/llvm/IR/PatternMatch.h
+1,154-325 files

LLVM/project 3bdee9bllvm/lib/Transforms/Scalar GVN.cpp, llvm/test/Transforms/GVN load-select-addr-store-fwd.ll

[GVN] Forward store values through select addresses in findDominatingValue (#183316)

## Alive2 proof

https://alive2.llvm.org/ce/z/v6pX7C
DeltaFile
+163-0llvm/test/Transforms/GVN/load-select-addr-store-fwd.ll
+9-2llvm/lib/Transforms/Scalar/GVN.cpp
+3-1llvm/test/Transforms/GVN/PRE/pre-load-through-select.ll
+1-1llvm/test/Transforms/GVN/PRE/pre-loop-load-through-select.ll
+176-44 files

LLVM/project 2c97209mlir/cmake/modules AddMLIRPython.cmake, mlir/include/mlir/Bindings/Python NanobindUtils.h NanobindAdaptors.h

[mlir][python] Add stable ABI (abi3) support (#183856)

Add `MLIR_ENABLE_PYTHON_STABLE_ABI` cmake flag to build bindings against
the Python limited/stable API (abi3 / PEP 384). This allow for
compatibility across different >=3.12 versions with a single .so /
wheel. We also require CMake >=3.26.

The stable ABI restricts usage to a subset of the CPython C API: frame
and code object structs are opaque, so introspection APIs like
`PyCode_Addr2Location`, `PyFrame_GetLasti`, and `PyFrame_GetCode` are
unavailable. The traceback-based auto-location logic is dropped because
we don’t have stable ABI to produce complete locations.

Assisted-by: claude
DeltaFile
+84-43mlir/include/mlir/Bindings/Python/NanobindUtils.h
+8-42mlir/lib/Bindings/Python/IRCore.cpp
+8-40mlir/include/mlir/Bindings/Python/NanobindAdaptors.h
+35-4mlir/cmake/modules/AddMLIRPython.cmake
+25-0mlir/test/python/ir/auto_location_stable_abi.py
+22-3mlir/lib/Bindings/Python/IRAttributes.cpp
+182-1327 files not shown
+208-13513 files

LLVM/project 55651f7clang/test/CIR/CodeGen builtin-floating-point.c object-size.c, clang/test/CIR/CodeGenBuiltins builtins-floating-point.c builtin-object-size.c

Address comment

Created using spr 1.3.7
DeltaFile
+2,176-54clang/test/CIR/CodeGenBuiltins/builtins-floating-point.c
+0-2,212clang/test/CIR/CodeGen/builtin-floating-point.c
+2,157-0llvm/test/CodeGen/AArch64/fcvt-i256.ll
+1,118-0llvm/test/CodeGen/AArch64/div-i256.ll
+0-877clang/test/CIR/CodeGen/object-size.c
+877-0clang/test/CIR/CodeGenBuiltins/builtin-object-size.c
+6,328-3,143488 files not shown
+15,707-8,253494 files

LLVM/project 0ba4f13mlir/test/Dialect/Affine invalid-reify-bound-dim.mlir, mlir/test/lib/Dialect/Test TestOpDefs.cpp

[mlir][test] Fix crash in ReifyBoundOp with invalid 'type' attribute (#184004)

The `ReifyBoundOp::getBoundType()` called `llvm_unreachable("invalid
bound type")` when the `type` attribute was set to a value other than
"EQ", "LB", or "UB" (e.g., "scalable"). This caused an abort instead of
a user-visible diagnostic.

Add a verification check that rejects invalid `type` values with a
proper error message before `getBoundType()` is ever called.

Fixes #128805
DeltaFile
+10-0mlir/test/Dialect/Affine/invalid-reify-bound-dim.mlir
+3-0mlir/test/lib/Dialect/Test/TestOpDefs.cpp
+13-02 files

LLVM/project 785490emlir/include/mlir/Transforms Passes.h Passes.td, mlir/lib/Transforms OpStats.cpp LoopInvariantCodeMotion.cpp

[MLIR] Remove `let constructor = ` from mlir/include/mlir/Transforms/Passes.td (#183950)

This makes the constructor auto-generated.
DeltaFile
+20-69mlir/include/mlir/Transforms/Passes.h
+15-32mlir/include/mlir/Transforms/Passes.td
+18-18mlir/test/Pass/ir-printing.mlir
+18-16mlir/lib/Transforms/OpStats.cpp
+10-10mlir/test/Transforms/composite-pass.mlir
+4-12mlir/lib/Transforms/LoopInvariantCodeMotion.cpp
+85-15718 files not shown
+145-25724 files

LLVM/project b7e2044mlir/include/mlir/IR OpBase.td, mlir/test/lib/Dialect/Test TestOps.td

[MLIR][ODS] Fix AllElementCountsMatch crash on dynamic shaped types (#183948)

The AllElementCountsMatch trait called ShapedType::getNumElements() on
operands or results with dynamic dimensions, which unconditionally
asserts hasStaticShape(). This caused mlir-opt to crash instead of
failing gracefully when the trait was used with dynamically-shaped
types.

Fix this by rewriting AllElementCountsMatch to use an And<> predicate
combining Neg<AnyMatchOperatorPred> (requiring all types to be
statically shaped) with AllMatchSameOperatorPred (requiring equal
element counts). When any type has dynamic dimensions the verification
now fails with a diagnostic instead of crashing.

Update the regression test to expect a verification failure rather than
success when dynamic shapes are present.

Fixes #159740
DeltaFile
+21-0mlir/test/mlir-tblgen/types.mlir
+12-2mlir/include/mlir/IR/OpBase.td
+7-0mlir/test/lib/Dialect/Test/TestOps.td
+40-23 files

LLVM/project 2cb2fe7mlir/lib/Dialect/SCF/IR SCF.cpp, mlir/test/Dialect/SCF invalid.mlir

[mlir][scf] Fix crash in ForOp verifier when body block has no arguments (#183946)

A malformed `scf.for` whose body block contains no arguments caused
`getRegionIterArgs()` to crash via an out-of-bounds `drop_front(1)`
call. This happened because `verifyLoopLikeOpInterface` (a
`verifyRegionTrait`) invokes `getRegionIterArgs()` during
`verifyRegionInvariants`, which runs before `verifyRegions()` has a
chance to report a proper diagnostic.

Fix by adding an explicit check in `ForOp::verify()` (which runs in
`verifyInvariants`, before any region trait verifiers execute) that
ensures the body block has at least as many arguments as there are
induction variables. This prevents the crash and produces a clear error
message.

Fixes #159737
DeltaFile
+16-0mlir/lib/Dialect/SCF/IR/SCF.cpp
+15-0mlir/test/Dialect/SCF/invalid.mlir
+31-02 files

LLVM/project 9801e75llvm/lib/Target/ARM ARMInstrThumb.td, llvm/test/tools/llvm-mca/ARM simple-cortex-m33.s

[ARM] tADDrSPi no side effects change (#183071)

This is pulled out of #182771 in case it causes issues. The mis-compile
I believe is no longer present, as tADDrSPi is used in several test
cases which do not change due to of marking tADDrSPi as not affect side
effects.
DeltaFile
+4-1llvm/test/tools/llvm-mca/ARM/simple-cortex-m33.s
+1-3llvm/lib/Target/ARM/ARMInstrThumb.td
+5-42 files

LLVM/project 74c0ee7llvm/include/llvm/Analysis TargetTransformInfo.h, llvm/include/llvm/CodeGen BasicTTIImpl.h

[TTI] Remove TargetLibraryInfo from IntrinsicCostAttributes (NFC) (#183764)

This is a remnant from when `sincos` costs used the vector mappings from
`TargetLibraryInfo::getVectorMappingInfo`.
DeltaFile
+7-13llvm/lib/Analysis/CostModel.cpp
+9-8llvm/lib/Analysis/TargetTransformInfo.cpp
+2-5llvm/include/llvm/Analysis/TargetTransformInfo.h
+1-2llvm/include/llvm/CodeGen/BasicTTIImpl.h
+1-1llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
+1-1llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+21-306 files

LLVM/project 6fa90a3mlir/lib/IR SymbolTable.cpp, mlir/test/Dialect/IRDL invalid.irdl.mlir

[MLIR][SymbolTable] Fix crash when SymbolTable is built on unverified IR (#183945)

The SymbolTable::SymbolTable constructor asserted that all symbol names
in the region were unique. This could cause mlir-opt to crash instead of
producing a proper diagnostic when the IR contained both:

1. An IsolatedFromAbove op (e.g., irdl.dialect) with a symbol user that
looks up symbols in an ancestor symbol table, and
2. Duplicate symbols in that ancestor (e.g., two func.func @test).

The crash occurred because IsolatedFromAbove ops are verified in
verifyOnExit() before verifyRegionInvariants() runs the SymbolTable
trait's verifyRegionTrait (which produces the proper duplicate-symbol
diagnostic). When the isolated op's symbol use verification triggered
SymbolTableCollection::getSymbolTable() on the ancestor, the constructor
would assert instead of gracefully handling the invalid-but-not-yet-
reported duplicate symbols.

The fix removes the assertion and silently skips duplicate symbol

    [7 lines not shown]
DeltaFile
+20-0mlir/test/Dialect/IRDL/invalid.irdl.mlir
+7-4mlir/lib/IR/SymbolTable.cpp
+27-42 files