LLVM/project 2370bf2llvm/include/llvm/CodeGen SDPatternMatch.h, llvm/lib/CodeGen/SelectionDAG DAGCombiner.cpp

[DAG] Extend MinMax matchers to detect flippable sign (#177504)

Fixes #174328
DeltaFile
+115-0llvm/unittests/CodeGen/SelectionDAGPatternMatchTest.cpp
+68-0llvm/test/CodeGen/AArch64/abds.ll
+22-8llvm/include/llvm/CodeGen/SDPatternMatch.h
+8-8llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+213-164 files

LLVM/project 61c1621mlir/lib/CAPI/Transforms Rewrite.cpp, mlir/lib/Dialect/ArmNeon/Transforms LowerContractToNeonPatterns.cpp

[MLIR] Fix GCC's `-Wreturn-type` warnings (#177654)

This patch fixes `-Wreturn-type` warnings which happens if MLIR is built
with GCC compiler (11.5 is used for detecting)


Founded errors
```
build/llvm-llvmorg-21.1.8/mlir/lib/CAPI/Transforms/Rewrite.cpp: In function ‘MlirGreedyRewriteStrictness mlirGreedyRewriteDriverConfigGetStrictness(MlirGreedyRewriteDriverConfig)’:
build/llvm-llvmorg-21.1.8/mlir/lib/CAPI/Transforms/Rewrite.cpp:399:1: warning: control reaches end of non-void function [-Wreturn-type]
  399 | }
      | ^
build/llvm-llvmorg-21.1.8/mlir/lib/CAPI/Transforms/Rewrite.cpp: In function ‘MlirGreedySimplifyRegionLevel mlirGreedyRewriteDriverConfigGetRegionSimplificationLevel(MlirGreedyRewriteDriverConfig)’:
build/llvm-llvmorg-21.1.8/mlir/lib/CAPI/Transforms/Rewrite.cpp:414:1: warning: control reaches end of non-void function [-Wreturn-type]
  414 | }
      | ^
build/llvm-llvmorg-21.1.8/mlir/lib/Dialect/GPU/IR/GPUDialect.cpp: In member function ‘mlir::Speculation::Speculatability mlir::gpu::SubgroupBroadcastOp::getSpeculatability()’:
build/llvm-llvmorg-21.1.8/mlir/lib/Dialect/GPU/IR/GPUDialect.cpp:2522:1: warning: control reaches end of non-void function [-Wreturn-type]
 2522 | }

    [20 lines not shown]
DeltaFile
+2-0mlir/lib/CAPI/Transforms/Rewrite.cpp
+2-0mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
+1-0mlir/test/lib/Dialect/Test/TestOpDefs.cpp
+1-0mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
+1-0mlir/lib/Dialect/ArmNeon/Transforms/LowerContractToNeonPatterns.cpp
+7-05 files

LLVM/project 2297e0dllvm/lib/Transforms/Utils MoveAutoInit.cpp, llvm/test/Transforms/MoveAutoInit loop-store.ll

[MoveAutoInit] Fix for miscompilation for #150120 (#173961)

Fixes the miscompilation discussed for the PR #164882 as part of
generalizing the optimization for the issue #150120.

Without this commit, MoveAutoInit moves the store instruction to a
different branch which does not dominate the user dominator node. This
results in UB at runtime. The example in the test case is specifically
for an irreducible loop, in which all the predecessor may not dominate
user dominator head.

To fix this problem, we've introduced a new check to verify if the
predecessor of the user dominator node does in fact dominate user
dominator node before deciding that it is the node where the instruction
will be moved to.
DeltaFile
+59-0llvm/test/Transforms/MoveAutoInit/loop-store.ll
+2-1llvm/lib/Transforms/Utils/MoveAutoInit.cpp
+61-12 files

LLVM/project 2cc4d45mlir/include/mlir/Bindings/Python IRCore.h, mlir/python CMakeLists.txt

[MLIR][Python] Add a DSL for defining dialects in Python bindings (#169045)

Python bindings for the IRDL dialect were introduced in #158488. They
are currently usable—for constructing IR and dynamically loading modules
that contain `irdl.dialect` into MLIR. However, there are still several
pain points when working with them:

* The IRDL IR-building interface is not very intuitive and tends to be
quite verbose.
* We do not yet have the corresponding `OpView` classes for IRDL-defined
operations.

To address these issues, I propose creating a wrapper (effectively a
small “DSL”) on top of the existing IRDL Python bindings. This wrapper
aims to simplify IR construction and automatically generate the
corresponding `OpView` types. A simple example is shown below.

Currently, using the IRDL bindings looks like this:


    [72 lines not shown]
DeltaFile
+471-0mlir/python/mlir/dialects/ext.py
+340-0mlir/test/python/dialects/ext.py
+4-3mlir/include/mlir/Bindings/Python/IRCore.h
+1-0mlir/python/CMakeLists.txt
+816-34 files

LLVM/project db4405ellvm/lib/Transforms/InstCombine InstCombineSimplifyDemanded.cpp, llvm/test/Transforms/InstCombine simplify-demanded-fpclass-rounding-intrinsics.ll

InstCombine: Infer nnan/ninf on rounding intrinsics (#177770)

DeltaFile
+52-42llvm/test/Transforms/InstCombine/simplify-demanded-fpclass-rounding-intrinsics.ll
+8-0llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
+60-422 files

LLVM/project b98e160llvm/lib/Transforms/Vectorize SLPVectorizer.cpp

Fix a crash in TTI

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

LLVM/project 2f94635llvm/lib/Transforms/InstCombine InstCombineSimplifyDemanded.cpp, llvm/test/Transforms/InstCombine simplify-demanded-fpclass-fptrunc-round.ll simplify-demanded-fpclass-fptrunc.ll

InstCombine: Infer nnan and ninf on fptrunc (#177769)

Teach SimplifyDemandedFPClass to do this, although this is
not yet applied directly to the cast.
DeltaFile
+31-21llvm/test/Transforms/InstCombine/simplify-demanded-fpclass-fptrunc-round.ll
+19-19llvm/test/Transforms/InstCombine/simplify-demanded-fpclass-fptrunc.ll
+11-11llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
+61-513 files

LLVM/project 786a207llvm/lib/Target/AMDGPU GCNSubtarget.h AMDGPUSubtarget.h

[NFCI][AMDGPU] Use `GET_SUBTARGETINFO_MACRO` in `GCNSubtarget.h` and `R600Subtarget.h` (#177402)

We can finally get rid of the manually defined boolean variables, like
other targets. Even though most of them are now defined by macros, we
still need to add the entries.
DeltaFile
+9-295llvm/lib/Target/AMDGPU/GCNSubtarget.h
+18-44llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h
+14-11llvm/lib/Target/AMDGPU/R600Subtarget.h
+7-5llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+3-3llvm/lib/Target/AMDGPU/R600Processors.td
+0-2llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp
+51-3602 files not shown
+53-3628 files

LLVM/project 431dea9llvm/lib/Transforms/InstCombine InstCombineSimplifyDemanded.cpp, llvm/test/Transforms/InstCombine simplify-demanded-fpclass-fpext.ll

InstCombine: Infer nnan and ninf on fpext (#177768)

Teach SimplifyDemandedFPClass to do this, although this is
not yet applied directly to the cast.
DeltaFile
+12-12llvm/test/Transforms/InstCombine/simplify-demanded-fpclass-fpext.ll
+4-3llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
+16-152 files

LLVM/project d77ced0llvm/lib/Transforms/InstCombine InstCombineSimplifyDemanded.cpp, llvm/test/Transforms/InstCombine simplify-demanded-fpclass-canonicalize.ll

InstCombine: Infer nnan/ninf on canonicalize (#177771)

DeltaFile
+22-12llvm/test/Transforms/InstCombine/simplify-demanded-fpclass-canonicalize.ll
+8-0llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
+30-122 files

LLVM/project 60b1e95llvm/lib/Transforms/InstCombine InstCombineSimplifyDemanded.cpp, llvm/test/Transforms/InstCombine simplify-demanded-fpclass-log.ll simplify-demanded-fpclass.ll

InstCombine: Infer nnan and ninf flags on log intrinsics (#177767)

Use the new common utility function to try fold to constant
or introduce flags.
DeltaFile
+8-8llvm/test/Transforms/InstCombine/simplify-demanded-fpclass-log.ll
+2-2llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
+2-2llvm/test/Transforms/InstCombine/simplify-demanded-fpclass.ll
+12-123 files

LLVM/project e9aae6allvm/lib/Transforms/InstCombine InstCombineSimplifyDemanded.cpp, llvm/test/Transforms/InstCombine simplify-demanded-fpclass-exp.ll simplify-demanded-fpclass.ll

InstCombine: Infer nnan and ninf flags on exp intrinsics (#177766)

Use the new common utility function to try fold to constant
or introduce flags.
DeltaFile
+11-11llvm/test/Transforms/InstCombine/simplify-demanded-fpclass-exp.ll
+3-3llvm/test/Transforms/InstCombine/simplify-demanded-fpclass.ll
+2-2llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
+16-163 files

LLVM/project 51a262fllvm/utils/gn/secondary/clang-tools-extra/clang-tidy/llvm BUILD.gn

[gn build] Port 49d464ccaf44
DeltaFile
+1-0llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/llvm/BUILD.gn
+1-01 files

LLVM/project 94b90c6llvm/utils/gn/secondary/libcxx/include BUILD.gn

[gn build] Port 9311996261e1
DeltaFile
+1-0llvm/utils/gn/secondary/libcxx/include/BUILD.gn
+1-01 files

LLVM/project 8fce1d7llvm/lib/Target/X86 X86ISelDAGToDAG.cpp, llvm/test/CodeGen/X86 extract-lowbits.ll

[X86] Prefer andl to andb to save one byte encoding when using with bzhi or bextr (#86921)

DeltaFile
+18-3llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
+2-2llvm/test/CodeGen/X86/extract-lowbits.ll
+20-52 files

LLVM/project 696572cllvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/X86 vec_list_bias-inseltpoison.ll

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+96-14llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+12-13llvm/test/Transforms/SLPVectorizer/X86/vec_list_bias-inseltpoison.ll
+108-272 files

LLVM/project 50f1bd8libcxx/docs/ReleaseNotes 23.rst, libcxx/include/__algorithm ranges_fold.h

optimize fold_left_with_iter
DeltaFile
+11-5libcxx/include/__algorithm/ranges_fold.h
+4-0libcxx/docs/ReleaseNotes/23.rst
+15-52 files

LLVM/project 21fdd49clang/bindings/python/clang cindex.py, clang/bindings/python/tests/cindex test_code_completion.py

[libclang/python] Move SPELLING_CACHE into CodeCompletion (#177586)

This adresses point 2 from
https://github.com/llvm/llvm-project/issues/156680.

Also add a dummy object that serves as an alias to `SPELLING_CACHE`,
used to replicate the old behavior and throw a `DeprecationWarning`.
DeltaFile
+58-32clang/bindings/python/clang/cindex.py
+22-0clang/bindings/python/tests/cindex/test_code_completion.py
+5-0clang/docs/ReleaseNotes.rst
+85-323 files

LLVM/project 9311996libcxx/include algorithm, libcxx/include/__algorithm ranges_shift_left.h shift_left.h

[libc++][ranges] implement `ranges::shift_left` (#83231)

Implement the `ranges::shift_left` algorithm from
[P2440R1](https://wg21.link/P2440R1).

Closes: #134061

---------

Co-authored-by: Hui Xie <hui.xie1990 at gmail.com>
Co-authored-by: Louis Dionne <ldionne.2 at gmail.com>
DeltaFile
+371-0libcxx/test/std/algorithms/alg.modifying.operations/alg.shift/ranges.shift_left.pass.cpp
+73-0libcxx/include/__algorithm/ranges_shift_left.h
+30-13libcxx/include/__algorithm/shift_left.h
+28-0libcxx/test/libcxx/algorithms/alg.modifying.operations/alg.shift/assert.shift_left.pass.cpp
+8-0libcxx/include/algorithm
+3-1libcxx/test/std/algorithms/ranges_robust_against_proxy_iterators.pass.cpp
+513-147 files not shown
+527-1613 files

LLVM/project 778a249mlir/include/mlir/Dialect/Affine Utils.h, mlir/include/mlir/Dialect/Affine/TransformOps AffineTransformOps.td

[mlir][Affine] affine-super-vectorize transform op (#177755)

Added an operation in the transform dialect to apply the
affine-super-vectorize pass locally.
The operation vectorizes the loops that are children of the provided
operation, itself included.
Also added a test file verifying the operation behaves.
DeltaFile
+129-0mlir/test/Dialect/Affine/SuperVectorize/transform_op.mlir
+33-26mlir/lib/Dialect/Affine/Transforms/SuperVectorize.cpp
+40-0mlir/lib/Dialect/Affine/TransformOps/AffineTransformOps.cpp
+34-0mlir/include/mlir/Dialect/Affine/TransformOps/AffineTransformOps.td
+5-0mlir/include/mlir/Dialect/Affine/Utils.h
+241-265 files

LLVM/project a06a0e2clang-tools-extra/clang-tidy/bugprone MacroParenthesesCheck.cpp, clang-tools-extra/docs ReleaseNotes.rst

[clang-tidy] Improve diagnostics of bugprone-macro-parentheses (#177841)

Closes #177594
DeltaFile
+25-5clang-tools-extra/clang-tidy/bugprone/MacroParenthesesCheck.cpp
+2-3clang-tools-extra/test/clang-tidy/checkers/bugprone/macro-parentheses-cmdline.cpp
+4-0clang-tools-extra/docs/ReleaseNotes.rst
+31-83 files

LLVM/project ac88f7bmlir/include/mlir-c BuiltinAttributes.h, mlir/include/mlir/Bindings/Python IRAttributes.h

[mlir][python] Support Arbitrary Precision Integers in MLIR C API and Python Bindings (#177733)

This PR extends the MLIR C API and Python bindings to support
**arbitrary-precision integers (`APInt`)**, overcoming the previous
limitation where `IntegerAttr` values were restricted to 64 bits.

Cryptographic applications often require integer types much larger than
standard machine words (e.g., the 256-bit modulus for the BN254 curve).
Previously, attempting to bind these values resulted in truncation or
errors. This PR exposes the underlying word-based `APInt` structure via
the C API and updates the Python bindings to seamlessly handle Python's
arbitrary-precision integers.
DeltaFile
+82-8mlir/lib/Bindings/Python/IRAttributes.cpp
+57-0mlir/test/python/ir/attributes.py
+26-0mlir/include/mlir-c/BuiltinAttributes.h
+23-0mlir/lib/CAPI/IR/BuiltinAttributes.cpp
+1-1mlir/include/mlir/Bindings/Python/IRAttributes.h
+189-95 files

LLVM/project 701b08eclang/test/CIR/CodeGen/CUDA filter-decl.cu

fix nit test case
DeltaFile
+1-1clang/test/CIR/CodeGen/CUDA/filter-decl.cu
+1-11 files

LLVM/project 32dcaa6llvm/lib/Target/AMDGPU GCNSubtarget.h AMDGPUSubtarget.h

[NFCI][AMDGPU] Use `GET_SUBTARGETINFO_MACRO` in `GCNSubtarget.h`
DeltaFile
+9-295llvm/lib/Target/AMDGPU/GCNSubtarget.h
+18-44llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h
+14-11llvm/lib/Target/AMDGPU/R600Subtarget.h
+7-5llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+3-3llvm/lib/Target/AMDGPU/R600Processors.td
+1-1llvm/lib/Target/AMDGPU/R600ControlFlowFinalizer.cpp
+52-3592 files not shown
+53-3628 files

LLVM/project 2192fb2clang/lib/CIR/CodeGen CIRGenModule.cpp

le format monseiur
DeltaFile
+3-4clang/lib/CIR/CodeGen/CIRGenModule.cpp
+3-41 files

LLVM/project 3d2b769clang/lib/CIR/CodeGen CIRGenModule.cpp TargetInfo.cpp, clang/test/CIR/CodeGen/CUDA filter-decl.cu nvptx-basic.cu

[CIR][CUDA] Add NVPTX target info and CUDA/HIP global emission filtering
DeltaFile
+66-0clang/lib/CIR/CodeGen/CIRGenModule.cpp
+37-0clang/test/CIR/CodeGen/CUDA/filter-decl.cu
+30-0clang/test/CIR/CodeGen/CUDA/nvptx-basic.cu
+19-0clang/lib/CIR/CodeGen/TargetInfo.cpp
+4-0clang/lib/CIR/CodeGen/CIRGenModule.h
+2-0clang/lib/CIR/CodeGen/TargetInfo.h
+158-06 files

LLVM/project 402ee51llvm/lib/Target/AMDGPU SILowerControlFlow.cpp, llvm/test/CodeGen/AMDGPU si-lower-control-flow-preserve-dom-tree.mir

[AMDGPU] Fix DomTree preservation in SILowerControlFlow when nodes are removed (#176691)

I would think the "applyUpdates" API should also take care of deleting
the nodes from the analyses objects but this does not seem to be the
case. https://godbolt.org/z/38a7rfzjd shows an example where
SILowerControlFlow removes a basic block which is not removed in the
Post dominator tree.
DeltaFile
+65-0llvm/test/CodeGen/AMDGPU/si-lower-control-flow-preserve-dom-tree.mir
+5-0llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp
+70-02 files

LLVM/project cf9adf5clang/lib/Format FormatTokenLexer.cpp, clang/unittests/Format TokenAnnotatorTest.cpp FormatTestJava.cpp

[clang-format] Handle \\""" at end of Java text block (#177736)

DeltaFile
+8-3clang/lib/Format/FormatTokenLexer.cpp
+9-0clang/unittests/Format/TokenAnnotatorTest.cpp
+7-0clang/unittests/Format/FormatTestJava.cpp
+24-33 files

LLVM/project 3c4ce40llvm/lib/Target/RISCV RISCVInstrInfoV.td, llvm/lib/Target/RISCV/Disassembler RISCVDisassembler.cpp

[RISCV] Use decodeVMaskReg for VMaskCarryInOp. NFC (#177742)

After #177678 we don't need DecodeVMV0RegisterClass to reject vm=1
cases. All instructions that use VMaskCarryInOp have set vm=0 in their
tablegen classes.
DeltaFile
+0-10llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp
+4-0llvm/lib/Target/RISCV/RISCVInstrInfoV.td
+4-102 files

LLVM/project 0515a5dllvm/lib/Target/AArch64 MachineSMEABIPass.cpp

[AArch64][SME] Use LibcallLoweringInfo in the MachineSMEABIPass (#177762)

This adds a new helper to add calls to SME routines (addSMELibCall) and
check they are using the expected CC.

---------

Co-authored-by: Matt Arsenault <arsenm2 at gmail.com>
DeltaFile
+50-30llvm/lib/Target/AArch64/MachineSMEABIPass.cpp
+50-301 files