LLVM/project 9fa05b0mlir/lib/Dialect/MemRef/IR MemRefOps.cpp, mlir/test/Dialect/MemRef invalid.mlir ops.mlir

[mlir][memref] Make memref.cast areCastCompatible return true when meet same types (#192029)

When both the source and destination types of `memref.cast` are
unranked, it causes an IR verification failure, which impacts downstream
projects and its behavior is inconsistent with the documentation. To
address this, this PR now allows the operation to return true if the
source and destination types are identical.
DeltaFile
+14-3mlir/test/Dialect/MemRef/invalid.mlir
+3-0mlir/test/Dialect/MemRef/ops.mlir
+2-0mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp
+19-33 files

LLVM/project ea7e752offload/tools/deviceinfo llvm-offload-device-info.cpp

[offload] Add backend L0 to offload deviceinfo tool (#192622)
DeltaFile
+3-0offload/tools/deviceinfo/llvm-offload-device-info.cpp
+3-01 files

LLVM/project 5cfed7fmlir/lib/Dialect/Transform/IR Utils.cpp, mlir/test/Dialect/Transform normal-forms.mlir

[mlir] reduce excessive verification in transform

`mergeSymbolsInto` called by the transform interpreter for named
sequence management was calling a full verifier after renaming symbols.
The renaming could have potentially broken symbol table-related
invariants, but not really anything else. Only verify the symbol
table-related invariants intead.
DeltaFile
+8-4mlir/lib/Dialect/Transform/IR/Utils.cpp
+4-5mlir/test/Dialect/Transform/normal-forms.mlir
+12-92 files

LLVM/project 3878a1dmlir/include/mlir/Dialect/Transform/IR TransformOps.td, mlir/include/mlir/Dialect/Transform/Interfaces TransformInterfaces.td

[mlir] add normal form checked transform interface

This interface can be implemented by operations that guarantee certain
normal forms for themselves and their regions. The operations provide
the list of normal forms they guarantee. This interface interacts with
the typed transform handles removing the need for them to check normal
forms that are guaranteed (and preserved by transforms).

Provide a simple `transform.payload` operation to carry a list of normal
forms and implement the interface.

This exposes the fact that the transform interpreter may be running the
verifier too much, but this is a pre-existing beavior that is orthogonal
to this patch.

Assisted-by: Claude Opus 4.7 / Cursor
DeltaFile
+84-1mlir/test/Dialect/Transform/normal-forms.mlir
+16-25mlir/lib/Dialect/Transform/IR/TransformTypes.cpp
+39-0mlir/lib/Dialect/Transform/Interfaces/TransformInterfaces.cpp
+29-0mlir/include/mlir/Dialect/Transform/Interfaces/TransformInterfaces.td
+17-0mlir/include/mlir/Dialect/Transform/IR/TransformOps.td
+16-0mlir/test/lib/Dialect/Transform/TestTransformDialectExtension.cpp
+201-264 files not shown
+243-2810 files

LLVM/project ab799d3utils/bazel/llvm-project-overlay/libc BUILD.bazel

[Bazel] Fixes c74c4a8 (#192646)

This fixes c74c4a8bf6f7663e1fc645e3bd43935791f33123.

Co-authored-by: Google Bazel Bot <google-bazel-bot at google.com>
DeltaFile
+4-1utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+4-11 files

LLVM/project 1ba89ddclang/include/clang/AST ExprCXX.h Stmt.h, clang/lib/AST ExprCXX.cpp

[AST]Fix Location and Range for reversed rewritten CXXOperatorCallExpr (#192467)

In C++20+, when `a != b` is automatically rewritten to `!(b == a)`, the
range and sourceLocation of the generated nodes are incorrect and the
range has begin > end.

Assisted-by: Claude code
DeltaFile
+29-0clang/test/AST/ast-dump-cxx20-reversed-operator.cpp
+10-8clang/lib/AST/ExprCXX.cpp
+5-2clang/include/clang/AST/ExprCXX.h
+5-0clang/include/clang/AST/Stmt.h
+2-1clang/lib/Sema/SemaOverload.cpp
+2-1clang/lib/Serialization/ASTWriterStmt.cpp
+53-123 files not shown
+56-129 files

LLVM/project 0cc39bbflang/test/Parser enumeration-type.f90

Adding a parser test.
DeltaFile
+113-0flang/test/Parser/enumeration-type.f90
+113-01 files

LLVM/project fd08cd1flang/include/flang/Parser parse-tree.h, flang/include/flang/Semantics type.h

Enumeration Type Sem-1: Foundation types + Parser (PRs 1-2)

Adds DerivedTypeSpec::Category::EnumerationType to the type system,
parse tree nodes for ENUMERATION TYPE per F2023, and parser/unparser
support. Includes a stub in resolve-names that rejects ENUMERATION TYPE
as 'not yet implemented' (enabled in Sem-2).

Files from original PRs 1-2.
DeltaFile
+34-4flang/include/flang/Parser/parse-tree.h
+29-0flang/lib/Parser/Fortran-parsers.cpp
+20-0flang/lib/Semantics/type.cpp
+16-0flang/lib/Parser/unparse.cpp
+10-1flang/include/flang/Semantics/type.h
+6-5flang/lib/Evaluate/type.cpp
+115-108 files not shown
+155-1214 files

LLVM/project efd8a91llvm/test/Transforms/LoopVectorize find-last-iv-sinkable-expr.ll find-last-iv-sinkable-expr-tail-folding.ll

[VPlan] Split sinkable FindLastIV tail folding tests into new test. NFC (#191195)

Follow up to
https://github.com/llvm/llvm-project/pull/191176#pullrequestreview-4082422318
DeltaFile
+731-1,359llvm/test/Transforms/LoopVectorize/find-last-iv-sinkable-expr.ll
+827-0llvm/test/Transforms/LoopVectorize/find-last-iv-sinkable-expr-tail-folding.ll
+1,558-1,3592 files

LLVM/project 7eeee80mlir/include/mlir/Dialect/Transform/IR TransformOps.td, mlir/include/mlir/Dialect/Transform/Interfaces TransformInterfaces.td

[mlir] add normal form checked transform interface

This interface can be implemented by operations that guarantee certain
normal forms for themselves and their regions. The operations provide
the list of normal forms they guarantee. This interface interacts with
the typed transform handles removing the need for them to check normal
forms that are guaranteed (and preserved by transforms).

Provide a simple `transform.payload` operation to carry a list of normal
forms and implement the interface.

This exposes the fact that the transform interpreter may be running the
verifier too much, but this is a pre-existing beavior that is orthogonal
to this patch.

Assisted-by: Claude Opus 4.7 / Cursor
DeltaFile
+83-0mlir/test/Dialect/Transform/normal-forms.mlir
+16-25mlir/lib/Dialect/Transform/IR/TransformTypes.cpp
+39-0mlir/lib/Dialect/Transform/Interfaces/TransformInterfaces.cpp
+29-0mlir/include/mlir/Dialect/Transform/Interfaces/TransformInterfaces.td
+17-0mlir/include/mlir/Dialect/Transform/IR/TransformOps.td
+16-0mlir/test/lib/Dialect/Transform/TestTransformDialectExtension.cpp
+200-254 files not shown
+242-2710 files

LLVM/project 99031a4clang/lib/Sema SemaConcept.cpp SemaTemplateInstantiate.cpp, clang/test/SemaCXX cxx2c-fold-exprs.cpp

release/22.x: [Clang] Track constraint's SubstIndex only if it contains outer parameter packs

I believe that is the intent of SubstIndex in AssociatedConstraint.
So this enforces the checking explicitly, in case nested SubstIndexes
confuses our poor constraint evaluator.

As a drive-by fix, this also removes an strange assertion and an
unnecessary
SubstIndex setup in nested requirement transform.

No release note because this is a regression fix.

This backports #191484
DeltaFile
+90-0clang/test/SemaCXX/cxx2c-fold-exprs.cpp
+12-22clang/lib/Sema/SemaConcept.cpp
+9-3clang/lib/Sema/SemaTemplateInstantiate.cpp
+4-1clang/lib/Sema/TreeTransform.h
+115-264 files

LLVM/project 5a1590cclang/tools/clang-linker-wrapper LinkerWrapperOpts.td ClangLinkerWrapper.cpp

[ClangLinkerWrapper] Fix `-v` for newer CMake passing it directly (#188883)

Summary:
Normally `-v` is version for tools, but it's also verbose for the
linker. CMake tries to identify the linker by passing `-Wl,-v` which
goes to the linker wrapper instead. Make this only print version on
`--version` and forward the other one to the linker so it appears
transparent to the host ABI. A bit of a hack, but it should work.

(cherry picked from commit 80b1fbecf4df3296b3976ce3cb42eb7832fc9053)
DeltaFile
+1-2clang/tools/clang-linker-wrapper/LinkerWrapperOpts.td
+1-1clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp
+2-32 files

LLVM/project c74c4a8libc/include string.h.def string.yaml

[libc] Fix missing strings symbols in string.h (#192640)

The glibc string.h includes strings.h if it's in the default mode. Added
to allow more programs to be built.
DeltaFile
+21-0libc/include/string.h.def
+1-0libc/include/string.yaml
+22-02 files

LLVM/project 0b88e33llvm/lib/Target/AArch64 AArch64ISelLowering.cpp, llvm/test/Analysis/CostModel/AArch64 masked-divrem.ll

[LLVM][CodeGen][SVE] Add custom lowering for ISD::MASKED_SDIV/UDIV. (#191164)

Also refactor custom lowering of ISD::SDIV/UDIV to replace uses of
Arch64ISD::PRED_SDIV/UDIV with the new target independent equivalents.
DeltaFile
+1,957-0llvm/test/CodeGen/AArch64/sve-fixed-length-masked-rem.ll
+1,693-0llvm/test/CodeGen/AArch64/sve-fixed-length-masked-div.ll
+48-48llvm/test/Analysis/CostModel/AArch64/masked-divrem.ll
+45-20llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+15-25llvm/test/CodeGen/AArch64/masked-sdiv-fixed-length.ll
+15-25llvm/test/CodeGen/AArch64/masked-udiv-fixed-length.ll
+3,773-1183 files not shown
+3,783-1489 files

LLVM/project 4c7ed8dllvm/test/CodeGen/SPIRV freeze.ll, llvm/test/CodeGen/SPIRV/branching analyze-branch-opt.ll

[NFC][SPIR-V] Enable testing using spirv-val in CodeGen tests (#192407)
DeltaFile
+2-2llvm/test/CodeGen/SPIRV/branching/analyze-branch-opt.ll
+2-2llvm/test/CodeGen/SPIRV/linkage/LinkOnceODR.ll
+3-0llvm/test/CodeGen/SPIRV/opencl/metadata/opencl_version_metadata.ll
+1-1llvm/test/CodeGen/SPIRV/transcoding/GlobalFunAnnotate.ll
+1-1llvm/test/CodeGen/SPIRV/freeze.ll
+1-1llvm/test/CodeGen/SPIRV/llvm-intrinsics/ctpop.ll
+10-7158 files not shown
+168-10164 files

LLVM/project 7dddddcflang-rt/lib/runtime type-info.cpp, flang-rt/unittests/Runtime Descriptor.cpp

[flang-rt] Fix REAL(10)/COMPLEX(10) component sizes in runtime type info (#192049)

This fixes a crash caused by incorrect component sizes in runtime type
info.

For REAL(10) and COMPLEX(10) components,
`Component::GetElementByteSize()` was using the Fortran kind value as
the byte size. On x86-64 that underestimates the actual storage size, so
component size computation can be wrong for extended-precision types.

This patch routes REAL and COMPLEX component sizes through
`Descriptor::BytesFor()`, which matches the runtime’s existing
storage-size handling. I also added a runtime unit test covering the
relevant `Descriptor::BytesFor()` storage-size behavior for REAL and
COMPLEX kinds, including kind 10.

Fixes #192085

---------

Co-authored-by: Sairudra More <moresair at pe31.hpc.amslabs.hpecorp.net>
DeltaFile
+35-0flang-rt/unittests/Runtime/Descriptor.cpp
+3-2flang-rt/lib/runtime/type-info.cpp
+38-22 files

LLVM/project e13c07bclang/test/Driver serenity.cpp

[clang] Reland NO_LIBCXX test in serenity.cpp (#192638)

The test was first introduced in 934f7950 and then removed in 9c94881f.
The first iteration was depending on the default runtime being
compiler-rt, which isn't true for all bots and thus caused failures:
https://lab.llvm.org/buildbot/#/builders/10/builds/26512

The new version of the test doesn't depend on the compiler runtime.
DeltaFile
+7-0clang/test/Driver/serenity.cpp
+7-01 files

LLVM/project ed19c77mlir/include/mlir/Dialect/Async/IR Async.h, mlir/include/mlir/Dialect/Func/IR FuncOps.h

[mlir] Fix definition of type traits struct member for some ops (#192047)

This commit fixes all appearences of `numLowBitsAvailable` to the
correct `NumLowBitsAvailable`. Prior to this change, instantiation of
templates like `llvm::PointerIntPair<mlir::ModuleOp, 3>` would not
compile.

See usage of `NumLowBitsAvailable`:
https://github.com/llvm/llvm-project/blob/224c429e858f8171852990a6f7b2b3590eeaffb7/llvm/include/llvm/ADT/PointerIntPair.h#L169
DeltaFile
+1-1mlir/include/mlir/Dialect/Async/IR/Async.h
+1-1mlir/include/mlir/Dialect/Func/IR/FuncOps.h
+1-1mlir/include/mlir/Dialect/SPIRV/IR/SPIRVOps.h
+1-1mlir/include/mlir/IR/BuiltinOps.h
+4-44 files

LLVM/project e270662clang/include/clang/Basic Builtins.td, clang/lib/AST/ByteCode InterpBuiltin.cpp

[clang]Implement the c23 stdc bit builtins (#185978)

This patch implements the following C23 bit builtins

  __builtin_stdc_leading_zeros/ones
  __builtin_stdc_trailing_zeros/ones
  __builtin_stdc_first_leading/trailing_zero/one
  __builtin_stdc_count_zeros/ones
  __builtin_stdc_has_single_bit
  __builtin_stdc_bit_width
  __builtin_stdc_bit_floor
  __builtin_stdc_bit_ceil

Additional Notes:
* Supports all unsigned integer types including _BitInt and __int128
 * lowers to llvm.ctlz / llvm.cttz / llvm.ctpop intrinsics
* constexpr support 

Addresses: #79630
DeltaFile
+585-0clang/test/Sema/builtin-stdc-bit-functions.c
+486-0clang/test/CodeGen/builtin-stdc-bit-functions.c
+476-0clang/test/SemaCXX/constexpr-builtin-stdc-bit-functions.cpp
+169-0clang/include/clang/Basic/Builtins.td
+151-0clang/lib/CodeGen/CGBuiltin.cpp
+136-0clang/lib/AST/ByteCode/InterpBuiltin.cpp
+2,003-09 files not shown
+2,294-015 files

LLVM/project 15e523b.github CODEOWNERS

[MLIR][CODEOWNERS] Update CODEOWNERS to include MLIR Shard Dialect (#192642)

Add CODEOWNERS for MLIR Shard Dialect.
DeltaFile
+4-0.github/CODEOWNERS
+4-01 files

LLVM/project 027ca61clang/docs ReleaseNotes.rst, clang/lib/Lex LiteralSupport.cpp

Suppress octal literal diagnostics from system macros (#192481)

We emit two kinds of diagnostics related to octal literals. One is a
compat/extension warning for use of 0o as the literal prefix and the
other is a deprecation warning for use of 0 as the literal prefix.

Clang now suppresses both of those diagnostics when the octal literal
comes from a macro expansion of a macro defined in a system header.
Those are not uses of the literal the user has any control over,
generally, so the diagnostics are not helpful in that case.

Fixes #192389
DeltaFile
+55-4clang/test/C/C2y/n3353.c
+14-3clang/lib/Lex/LiteralSupport.cpp
+6-0clang/docs/ReleaseNotes.rst
+75-73 files

LLVM/project fa7d199utils/bazel/llvm-project-overlay/libc BUILD.bazel

[bazel] Port d00a49fc3495f260d8b3125b5d9f4e263ac13166 (#192637)
DeltaFile
+16-0utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+16-01 files

LLVM/project 873a259llvm/lib/Target/SPIRV SPIRVPreLegalizer.cpp, llvm/test/CodeGen/SPIRV trunc-nonstd-bitwidth.ll

[SPIRV] Fix trunc nonstandard int types  (#191393)

In some cases, the trunc dst type was widened to higher bit size, which
changes behavior of the instruction.

Now, in case of need of widening, the trunc instruction is replaced with
AND with appropriate mask.

Assisted-by: Claude Code.

---------

Co-authored-by: Marcos Maronas <mmaronas at amd.com>
Co-authored-by: Arseniy Obolenskiy <gooddoog at student.su>
DeltaFile
+49-43llvm/test/CodeGen/SPIRV/trunc-nonstd-bitwidth.ll
+69-0llvm/lib/Target/SPIRV/SPIRVPreLegalizer.cpp
+118-432 files

LLVM/project c872a64clang/lib/Sema SemaDeclCXX.cpp, clang/test/CXX/drs cwg17xx.cpp

[clang] Add diagnostic for friend declaration of closure type member (#191419)

Clang allows friend declarations of closure type members, which is
disallowed per CWG 1780 (Issue #26540).

Added a new diagnostic when the friend declaration targets a member of a
`CXXRecordDecl` that is a lambda.

---------

Co-authored-by: Corentin Jabot <corentinjabot at gmail.com>
DeltaFile
+50-8clang/test/SemaCXX/lambda-expressions.cpp
+30-0clang/test/CXX/drs/cwg17xx.cpp
+5-0clang/lib/Sema/SemaDeclCXX.cpp
+2-2clang/test/SemaCXX/cxx1z-constexpr-lambdas.cpp
+1-2clang/test/SemaTemplate/GH75426.cpp
+1-1clang/www/cxx_dr_status.html
+89-133 files not shown
+93-149 files

LLVM/project 91339fdllvm/test/CodeGen/AArch64 branch-relax-cross-section.mir, llvm/test/CodeGen/AMDGPU local-stack-alloc-add-references.gfx8.mir coalesce-copy-to-agpr-to-av-registers.mir

[AMDGPU][NFC] Update MIR tests to use symbolic INLINEASM operands (#186839)
DeltaFile
+180-180llvm/test/CodeGen/AMDGPU/local-stack-alloc-add-references.gfx8.mir
+120-120llvm/test/CodeGen/AMDGPU/coalesce-copy-to-agpr-to-av-registers.mir
+90-90llvm/test/CodeGen/AMDGPU/local-stack-alloc-add-references.gfx9.mir
+71-71llvm/test/CodeGen/AArch64/branch-relax-cross-section.mir
+56-56llvm/test/CodeGen/AMDGPU/machine-sink-cycle.mir
+36-36llvm/test/CodeGen/Mips/longbranch/branch-limits-int-mips64r6.mir
+553-553124 files not shown
+1,251-1,251130 files

LLVM/project 0823d79mlir/include/mlir/Dialect/Arith/IR ArithOps.td, mlir/lib/Conversion/ArithAndMathToAPFloat ArithToAPFloat.cpp

[mlir][arith] Add `flush_denormals` operations
DeltaFile
+23-13mlir/lib/Conversion/ArithAndMathToAPFloat/ArithToAPFloat.cpp
+34-0mlir/include/mlir/Dialect/Arith/IR/ArithOps.td
+32-0mlir/test/Dialect/Arith/ops.mlir
+26-0mlir/test/Conversion/ArithAndMathToAPFloat/arith-to-apfloat.mlir
+23-0mlir/test/Dialect/Arith/canonicalize.mlir
+22-0mlir/lib/Dialect/Arith/IR/ArithOps.cpp
+160-132 files not shown
+190-138 files

LLVM/project e659f8allvm/test/CodeGen/AMDGPU/NextUseAnalysis spill-vreg-many-lanes.mir acyclic-770bb.mir

Merge branch 'main' into users/KseniyaTikhomirova/kernel_submit_single_3
DeltaFile
+275,101-0llvm/test/CodeGen/AMDGPU/NextUseAnalysis/spill-vreg-many-lanes.mir
+144,679-0llvm/test/CodeGen/AMDGPU/NextUseAnalysis/acyclic-770bb.mir
+57,682-0llvm/test/CodeGen/AMDGPU/NextUseAnalysis/double-nested-loops-complex-cfg.mir
+41,844-0llvm/test/CodeGen/AMDGPU/NextUseAnalysis/test_ers_multiple_spills2.mir
+40,613-0llvm/test/CodeGen/AMDGPU/NextUseAnalysis/test_ers_multiple_spills1.mir
+37,209-0llvm/test/CodeGen/AMDGPU/NextUseAnalysis/test_ers_multiple_spills3.mir
+597,128-03,644 files not shown
+1,088,558-106,4053,650 files

LLVM/project 96266b7clang-tools-extra/clang-tidy/readability RedundantLambdaParameterListCheck.cpp RedundantLambdaParameterListCheck.h, clang-tools-extra/docs ReleaseNotes.rst

[clang-tidy] Add `readability-redundant-lambda-parameter-list` (#190438)

Adds a new clang-tidy check that removes redundant empty parameter lists
from lambda expressions when the rewrite is valid for the active
language standard.

Fixes #190396 

Assisted by Claude (Anthropic), all decisions taken in
this PR involved my active judgment
DeltaFile
+126-0clang-tools-extra/test/clang-tidy/checkers/readability/redundant-lambda-parameter-list.cpp
+66-0clang-tools-extra/clang-tidy/readability/RedundantLambdaParameterListCheck.cpp
+39-0clang-tools-extra/clang-tidy/readability/RedundantLambdaParameterListCheck.h
+35-0clang-tools-extra/docs/clang-tidy/checks/readability/redundant-lambda-parameter-list.rst
+5-0clang-tools-extra/docs/ReleaseNotes.rst
+3-0clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp
+274-02 files not shown
+276-08 files

LLVM/project 8d488fcutils/bazel/llvm-project-overlay/mlir BUILD.bazel

[bazel] Fix nanobind header build (#192627)

The build was broken by 3b3ac5a1169722bff1ae0f5f8f27a48cc08c3d02
changing textual_hdrs to hdrs - the copts/features weren't copied over,
meaning Nanobind was attempted to be built with exceptions disabled.

Co-authored-by: James Molloy <jmolloy at google.com>
DeltaFile
+2-0utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+2-01 files

LLVM/project 5c3afd0llvm/lib/Target/AMDGPU AMDGPUMCInstLower.cpp SIInstrInfo.cpp

AMDGPU: Implement getInstSizeVerifyMode

Replace the custom instruction size check.
DeltaFile
+0-22llvm/lib/Target/AMDGPU/AMDGPUMCInstLower.cpp
+7-0llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
+3-0llvm/lib/Target/AMDGPU/SIInstrInfo.h
+10-223 files