LLVM/project d85d2a4llvm/lib/Target/AArch64 AArch64InstrInfo.cpp, llvm/test/CodeGen/AArch64 sve-multivector-load-frame-index.ll

[AArch64][SVE] Handle multi-vector load/store opcodes in frame-index elimination

Lowering a wide scalable load from a stack object produces an
LD1*_{2Z,4Z}_IMM[_PSEUDO] with a frame-index base. getMemOpInfo() and getLoadStoreImmIdx()
had no entries for these SME2/SVE2p1 multi-vector opcodes, so PEI crasheds.
DeltaFile
+174-0llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
+79-0llvm/test/CodeGen/AArch64/sve-multivector-load-frame-index.ll
+253-02 files

LLVM/project fae9a1cclang/lib/Format UnwrappedLineParser.cpp UnwrappedLineParser.h, clang/unittests/Format FormatTestVerilog.cpp

[clang-format] Recognize Verilog class item qualifiers (#199085)

old

```SystemVerilog
class Packet
  extern protected virtual function int send
      (int value);
  endclass : Packet
```

new

```SystemVerilog
class Packet
  extern protected virtual function int send
      (int value);
endclass : Packet
```

    [3 lines not shown]
DeltaFile
+11-2clang/lib/Format/UnwrappedLineParser.cpp
+6-0clang/unittests/Format/FormatTestVerilog.cpp
+2-0clang/lib/Format/UnwrappedLineParser.h
+1-0clang/lib/Format/FormatToken.h
+20-24 files

LLVM/project 0631ac7clang/lib/Format DefinitionBlockSeparator.cpp, clang/unittests/Format DefinitionBlockSeparatorTest.cpp

[clang-format] Remove the blank line in the function try block (#199086)

old with config `{SeparateDefinitionBlocks: Always}`

```C++
void foo() try {
  // do something
} catch (const std::exception &e) {

  // handle exception
}
```

new

```C++
void foo() try {
  // do something
} catch (const std::exception &e) {

    [7 lines not shown]
DeltaFile
+17-1clang/unittests/Format/DefinitionBlockSeparatorTest.cpp
+3-0clang/lib/Format/DefinitionBlockSeparator.cpp
+20-12 files

LLVM/project 4298580llvm/lib/Target/ARM ARMISelLowering.cpp, llvm/test/CodeGen/Thumb2 mve-shuffle-fp16.ll

[ARM] Fix some fp16 Shuffle lowering without +fullfp16 (#200688)

Without fullfp16 f16 is not a legal type, meaning we need to be careful
with
how we legalize shuffle vector and buildvector operations that cannot be
treated more optimially using shuffles.
DeltaFile
+1,015-0llvm/test/CodeGen/Thumb2/mve-shuffle-fp16.ll
+16-3llvm/lib/Target/ARM/ARMISelLowering.cpp
+1,031-32 files

LLVM/project 62a2382llvm/lib/Target/AMDGPU SIISelLowering.cpp, llvm/test/CodeGen/AMDGPU fdiv.f16.ll

[AMDGPU] Use v_rsq_f32 for f16 rsqrt on targets without 16-bit insts (#200646)

On gfx6/gfx7 the f16 1.0/sqrt(x) pattern was not folded to a reciprocal
square root because performFDivCombine bailed out whenever f16 fsqrt was
not a legal operation. f16 fsqrt is Custom (promoted) on these targets,
so the combine never fired and the full f32 fdiv expansion was emitted.

Split the legality check: when same-type fsqrt is legal (gfx8+), keep
emitting the native rsq. For f16 without a legal fsqrt, compute the
reciprocal square root in f32 with v_rsq_f32 and round back. This is
accurate enough for f16, and needs no denormal scaling because every f16
value extends to a normal f32 and an f16 rsq result is never denormal.

bf16 is intentionally left expanded: it shares f32's exponent range, so
bf16 denormals would extend to f32 denormals that v_rsq_f32 does not
handle.

Fixes #76948

Co-authored-by: Claude Opus 4.8 <noreply at anthropic.com>
DeltaFile
+7-55llvm/test/CodeGen/AMDGPU/fdiv.f16.ll
+25-6llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+32-612 files

LLVM/project e3574d4llvm/include/llvm/IR Intrinsics.td

[NFC][LLVM] Fix Intrinsics.td to adhere to 80 col limit (#199346)

Verified that there is no difference in the tablegen generated files for
intrinsics except line number changes in the comments in
IntrinsicEnums.inc.
DeltaFile
+318-245llvm/include/llvm/IR/Intrinsics.td
+318-2451 files

LLVM/project 5000716mlir/lib/Conversion/MathToSPIRV MathToSPIRV.cpp, mlir/test/Conversion/MathToSPIRV math-to-gl-spirv.mlir

[mlir][SPIR-V] Convert math.cttz to spirv.GLFindILsb (#200455)
DeltaFile
+69-29mlir/lib/Conversion/MathToSPIRV/MathToSPIRV.cpp
+22-0mlir/test/Conversion/MathToSPIRV/math-to-gl-spirv.mlir
+91-292 files

LLVM/project 77860f2llvm/lib/IR Verifier.cpp

[NFC][LLVM] Remove redundant verifier type checks for some intrinsics (#200658)

Remove the following redundant type checks:

* `[s|u]div_fix*` intrinsics, existing checks in `isSignatureValid` will
verify that arg0 and arg1 are int or int vectors (since they use
`llvm_anyint_ty`) and arg2 is declared as i32, so checks related to it
are also redundant.
* For `lrint` family, the result is `llvm_anyfloat_ty` and the argument
is `llvm_anyint_ty`, so one of the checks is redundant.
DeltaFile
+2-20llvm/lib/IR/Verifier.cpp
+2-201 files

LLVM/project c42f188lldb/source/Commands CommandObjectFrame.cpp

[lldb] Fix up comment placement (NFC) (#200671)

Follow up to https://github.com/llvm/llvm-project/pull/200084
DeltaFile
+4-4lldb/source/Commands/CommandObjectFrame.cpp
+4-41 files

LLVM/project a89a659llvm/lib/Transforms/Scalar TailRecursionElimination.cpp, llvm/test/Transforms/TailCallElim accum_recursion.ll dropping_debugloc_acc_rec_inst_rnew.ll

[TailCallElim] Drop poison-generating flags on reassociated accumulators (#200624)

For example if you have recursion like

    int prod(n) {
      if (n == 0) return 1;
      return prod(n-1) * f(n)
    }

then logically this computes (((f(1) * f(2)) * f(3)) * f(4)) * ... f(n).

But TailCallElim reassociates this, computing instead
((f(n) * f(n-1)) * f(n-2)) * ...

If the operator (* in this case) had poison-generating flags like
nsw, those may not still apply after reassociation.  (For example,
suppose in this example f(1) returns 0 -- in that case the original
multiplication cannot overflow, but the new one still might.)

Fix this by clearing the poison-generating flags after reassociating.
DeltaFile
+45-7llvm/test/Transforms/TailCallElim/accum_recursion.ll
+2-2llvm/test/Transforms/TailCallElim/dropping_debugloc_acc_rec_inst_rnew.ll
+4-0llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp
+51-93 files

LLVM/project 6df37a4llvm/lib/Transforms/Utils SimplifyCFG.cpp, llvm/test/Transforms/SimplifyCFG rangereduce.ll

[spr] initial version

Created using spr 1.3.8-wip
DeltaFile
+27-26llvm/test/Transforms/SimplifyCFG/rangereduce.ll
+15-11llvm/lib/Transforms/Utils/SimplifyCFG.cpp
+4-9llvm/test/Transforms/SimplifyCFG/RISCV/switch-of-powers-of-two.ll
+46-463 files

LLVM/project 07f9a7dclang/lib/CIR/CodeGen CIRGenAtomic.cpp CIRGenExprComplex.cpp, clang/test/CIR/CodeGen complex-atomic-cast.c

[CIR] Implement Atomic Complex to Complex cast (#199260)

Implement Atomic Complex to Complex types cast

Issue https://github.com/llvm/llvm-project/issues/192331
DeltaFile
+45-2clang/lib/CIR/CodeGen/CIRGenAtomic.cpp
+37-0clang/test/CIR/CodeGen/complex-atomic-cast.c
+2-6clang/lib/CIR/CodeGen/CIRGenExprComplex.cpp
+84-83 files

LLVM/project 1aafb36llvm/include/llvm/IR DebugLoc.h, llvm/lib/IR DebugLoc.cpp

Also fix debug coverage instrumentation builds

Created using spr 1.3.8-wip
DeltaFile
+18-17llvm/include/llvm/IR/DebugLoc.h
+0-6llvm/lib/IR/DebugLoc.cpp
+18-232 files

LLVM/project 2bb09d5llvm/include/llvm/CodeGen MachineInstr.h SelectionDAGNodes.h, llvm/include/llvm/IR TrackingMDRef.h DebugLoc.h

drop hasTrivialDestructor + dyn_cast

Created using spr 1.3.8-wip
DeltaFile
+0-10llvm/include/llvm/IR/TrackingMDRef.h
+1-4llvm/include/llvm/CodeGen/MachineInstr.h
+0-4llvm/lib/CodeGen/MachineInstr.cpp
+2-2llvm/lib/CodeGen/MIRParser/MIParser.cpp
+0-3llvm/include/llvm/IR/DebugLoc.h
+0-1llvm/include/llvm/CodeGen/SelectionDAGNodes.h
+3-246 files

LLVM/project 025b9a2llvm/docs/TableGen ProgRef.rst, llvm/lib/TableGen TGParser.cpp TGParser.h

[TableGen] Add !switch operator (#199659)

This patch add a syntactic sugar operator to TableGen named `!switch`,
to simplify use cases where a user needs to conditionally use a value
based on exact key match. It supports variadic case arguments (0 or
more). It requires a default value - which creates a stricter grammar
that is simpler to parse, and I think the flexibility cost is not real -
it is considered a best practice in SW design for switch expressions (or
statements) on arbitrary types to always provide a default.

At parse time, after key and value type-checking, we reduce the
`!switch` expression to `!cond`, as they effectively entirely share the
downstream logic. The impl also extracts a shared pre-reduction
type-checking for `!switch` and `!cond` called
`TGParser::resolveInitTypes`.

Motivation: switch-behaving `!cond` value selection in `llvm/lib/Target`
e.g. from `llvm/lib/Target/AArch64/AArch64InstrFormats.td`:
```

    [11 lines not shown]
DeltaFile
+140-26llvm/lib/TableGen/TGParser.cpp
+119-0llvm/test/TableGen/switch.td
+18-0llvm/docs/TableGen/ProgRef.rst
+4-0llvm/lib/TableGen/TGParser.h
+1-0llvm/lib/TableGen/TGLexer.h
+1-0llvm/lib/TableGen/TGLexer.cpp
+283-266 files

LLVM/project 5d20fd3mlir/docs/Tutorials/Toy Ch-2.md

[mlir] Fix typo in toy tutorial (#200640)

Signed-off-by: Maximilian Ehlers <maximilian at sodawa.com>
DeltaFile
+1-1mlir/docs/Tutorials/Toy/Ch-2.md
+1-11 files

LLVM/project fe87c97llvm/tools/llubi/lib Context.cpp

[llubi] Fix the number of words to reserve in `Context::toBytes` (#200651)

The bits should be divided by 64 instead of 8 :(
DeltaFile
+8-6llvm/tools/llubi/lib/Context.cpp
+8-61 files

LLVM/project b48743bclang-tools-extra/clang-tidy/modernize UseRangesCheck.cpp, clang-tools-extra/docs ReleaseNotes.rst

[clang-tidy] `use-ranges`: preserve iterator results with `.begin()` (#196036)

Preserve used iterator results for `remove`, `partition`,
`stable_partition`, and `rotate`-style replacements by appending
`.begin()` where the ranges algorithm returns a subrange.

Fix #124794

Assisted by Codex.
DeltaFile
+25-0clang-tools-extra/test/clang-tidy/checkers/modernize/use-ranges.cpp
+16-0clang-tools-extra/test/clang-tidy/checkers/modernize/Inputs/use-ranges/fake_std.h
+6-6clang-tools-extra/clang-tidy/modernize/UseRangesCheck.cpp
+4-0clang-tools-extra/docs/ReleaseNotes.rst
+51-64 files

LLVM/project 5dfbb49llvm/utils/lit/lit/llvm fn_selection.py fn_param.py, llvm/utils/lit/tests fn-selection.py fn-filter-checks.py

[lit] Add lit.llvm.fn_selection: opt-in select-function pass via --param fn-pass
DeltaFile
+25-0llvm/utils/lit/tests/fn-selection.py
+16-0llvm/utils/lit/lit/llvm/fn_selection.py
+10-0llvm/utils/lit/tests/Inputs/fn-selection/lit.cfg
+3-3llvm/utils/lit/lit/llvm/fn_param.py
+4-0llvm/utils/lit/tests/fn-filter-checks.py
+2-0llvm/utils/lit/tests/Inputs/fn-selection/sample.ll
+60-36 files

LLVM/project c9bcb5allvm/utils/lit/lit/llvm fn_extract.py, llvm/utils/lit/tests fn-extract.py fn-filter-checks.py

[lit] Add lit.llvm.fn_extract: --param fn=NAMES prepends llvm-extract
DeltaFile
+26-0llvm/utils/lit/tests/fn-extract.py
+19-0llvm/utils/lit/lit/llvm/fn_extract.py
+19-0llvm/utils/lit/tests/Inputs/fn-extract/lit.cfg
+17-0llvm/utils/lit/tests/Inputs/fn-filter-checks/sample.ll
+15-0llvm/utils/lit/tests/Inputs/fn-filter-checks/lit.cfg
+10-0llvm/utils/lit/tests/fn-filter-checks.py
+106-04 files not shown
+114-310 files

LLVM/project e02f075llvm/test lit.cfg.py, llvm/utils/lit/lit/llvm fn_param.py

[lit] Add lit.llvm.fn_param shared helper for --param fn= substitutions
DeltaFile
+46-0llvm/utils/lit/lit/llvm/fn_param.py
+6-0llvm/test/lit.cfg.py
+52-02 files

LLVM/project a63ed38llvm/include/llvm/FileCheck FileCheck.h, llvm/lib/FileCheck FileCheck.cpp FileCheckImpl.h

[FileCheck] Add --filter-label to drop CHECKs outside selected CHECK-LABEL sections
DeltaFile
+51-0llvm/test/FileCheck/filter-label.txt
+24-0llvm/lib/FileCheck/FileCheck.cpp
+12-0llvm/utils/FileCheck/FileCheck.cpp
+5-0llvm/lib/FileCheck/FileCheckImpl.h
+5-0llvm/include/llvm/FileCheck/FileCheck.h
+97-05 files

LLVM/project cefc58cllvm/utils/lit/lit cl_arguments.py TestRunner.py, llvm/utils/lit/tests check-filter.py

[lit] Add --check to run only selected RUN lines from a test

`llvm-lit --check=LIST <test>` keeps only the listed RUN directives in
the test and discards the rest. LIST is a comma-separated mix
of 0-indexed integers and ranges (e.g. `--check=0,2,4-6`). The
selection is applied to the parseIntegratedTestScript output.

Run tests via
`llvm-lit --check=0 llvm/utils/lit/tests/Inputs/check-filter/sample.ll`,
`llvm-lit --check=1 llvm/utils/lit/tests/Inputs/check-filter/sample.ll`,
`llvm/utils/lit/lit.py llvm/utils/lit/tests/check-filter.py`.
DeltaFile
+36-0llvm/utils/lit/lit/cl_arguments.py
+23-0llvm/utils/lit/tests/check-filter.py
+18-0llvm/utils/lit/lit/TestRunner.py
+7-0llvm/utils/lit/tests/Inputs/check-filter/lit.cfg
+4-0llvm/utils/lit/tests/Inputs/check-filter/sample.ll
+2-0llvm/utils/lit/lit/LitConfig.py
+90-01 files not shown
+91-07 files

LLVM/project 8dc0985clang-tools-extra/clang-tidy/modernize UseDefaultMemberInitCheck.cpp, clang-tools-extra/docs ReleaseNotes.rst

[clang-tidy] Avoid unsafe `use-default-member-init` fixes (#191607)

Suppress `modernize-use-default-member-init` diagnostics when moving a
constructor initializer into a default member initializer would
reference a declaration not visible from the field declaration.

Add `IgnoreNonVisibleReferences` to allow preserving the warning without
emitting unsafe fix-its, and document the new behavior.

Fixes #156412

Assisted by Codex
DeltaFile
+156-0clang-tools-extra/test/clang-tidy/checkers/modernize/Inputs/use-default-member-init/non-visible-references.h
+95-16clang-tools-extra/clang-tidy/modernize/UseDefaultMemberInitCheck.cpp
+48-0clang-tools-extra/test/clang-tidy/checkers/modernize/use-default-member-init-non-visible-references.cpp
+14-0clang-tools-extra/test/clang-tidy/checkers/modernize/use-default-member-init-non-visible-references-notes.cpp
+7-0clang-tools-extra/docs/clang-tidy/checks/modernize/use-default-member-init.rst
+7-0clang-tools-extra/docs/ReleaseNotes.rst
+327-161 files not shown
+329-177 files

LLVM/project 9280f01clang-tools-extra/clang-tidy/modernize UseRangesCheck.cpp, clang-tools-extra/clang-tidy/utils UseRangesCheck.cpp

[clang-tidy] `use-ranges`: avoid unsafe result fix-its

Preserve callable results with .fun, allow structured-binding-safe rewrites, and keep diagnostics while suppressing unsafe fix-its when ranges result objects do not match the original result shape.

Assisted by Codex.
DeltaFile
+38-2clang-tools-extra/clang-tidy/utils/UseRangesCheck.cpp
+37-0clang-tools-extra/test/clang-tidy/checkers/modernize/use-ranges.cpp
+22-5clang-tools-extra/clang-tidy/modernize/UseRangesCheck.cpp
+26-0clang-tools-extra/test/clang-tidy/checkers/modernize/Inputs/use-ranges/fake_std.h
+7-0clang-tools-extra/docs/ReleaseNotes.rst
+2-0clang-tools-extra/docs/clang-tidy/checks/modernize/use-ranges.rst
+132-71 files not shown
+134-77 files

LLVM/project 2c051e5clang-tools-extra/clang-tidy/modernize UseRangesCheck.cpp, clang-tools-extra/docs ReleaseNotes.rst

[clang-tidy] `use-ranges`: preserve output results

Preserve used output iterator results for output algorithm replacements by appending .out where the ranges algorithm returns an algorithm result object.

Fix #110223

Assisted by Codex.
DeltaFile
+104-0clang-tools-extra/test/clang-tidy/checkers/modernize/use-ranges.cpp
+59-0clang-tools-extra/test/clang-tidy/checkers/modernize/Inputs/use-ranges/fake_std.h
+26-28clang-tools-extra/clang-tidy/modernize/UseRangesCheck.cpp
+3-0clang-tools-extra/docs/ReleaseNotes.rst
+2-0clang-tools-extra/docs/clang-tidy/checks/modernize/use-ranges.rst
+194-285 files

LLVM/project 932a12cclang-tools-extra/clang-tidy/modernize UseRangesCheck.cpp, clang-tools-extra/docs ReleaseNotes.rst

[clang-tidy] `use-ranges`: preserve remove iterator results

Preserve used iterator results for remove, partition, stable_partition, and rotate-style replacements by appending .begin() where the ranges algorithm returns a subrange.

Fix #124794

Assisted by Codex.
DeltaFile
+25-0clang-tools-extra/test/clang-tidy/checkers/modernize/use-ranges.cpp
+16-0clang-tools-extra/test/clang-tidy/checkers/modernize/Inputs/use-ranges/fake_std.h
+6-6clang-tools-extra/clang-tidy/modernize/UseRangesCheck.cpp
+4-0clang-tools-extra/docs/ReleaseNotes.rst
+51-64 files

LLVM/project 37845daclang-tools-extra/clang-tidy/modernize UseRangesCheck.cpp, clang-tools-extra/clang-tidy/utils UseRangesCheck.cpp UseRangesCheck.h

[clang-tidy] `use-ranges`: preserve used `unique` results (#196035)

Preserve iterator uses when replacing `std::unique` with
`std::ranges::unique` by appending `.begin()` in used-result contexts.

Fix #127658

Assisted by Codex.
DeltaFile
+41-0clang-tools-extra/clang-tidy/utils/UseRangesCheck.cpp
+30-9clang-tools-extra/clang-tidy/modernize/UseRangesCheck.cpp
+31-0clang-tools-extra/test/clang-tidy/checkers/modernize/use-ranges.cpp
+14-0clang-tools-extra/clang-tidy/utils/UseRangesCheck.h
+7-0clang-tools-extra/test/clang-tidy/checkers/modernize/Inputs/use-ranges/fake_std.h
+6-0clang-tools-extra/docs/ReleaseNotes.rst
+129-91 files not shown
+131-97 files

LLVM/project f5b80e3llvm/lib/CodeGen/SelectionDAG InstrEmitter.cpp, llvm/lib/Frontend/OpenMP OMPIRBuilder.cpp

fix unused variables

Created using spr 1.3.8-wip
DeltaFile
+0-36llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp
+3-5llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
+3-3llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+6-443 files

LLVM/project 7966cbbllvm/test/CodeGen/AArch64 sve-fixed-length-masked-expandloads.ll alias_mask.ll

[AArch64] Use ADDP tree for v16i8 to i16 bitmask extraction (#199812)

Re-land of #192974, reverted in 868aefd.

The original PR was reverted because the new lowering produced an
EXTRACT_VECTOR_ELT with an illegal i16 result type, which tripped the
operation legalizer when called from combineBoolVectorAndTruncateStore
on a `<32 x i1>` store split into two `<16 x i1>` halves. Returning i32
(handled by the caller's existing getZExtOrTrunc) avoids this.

Regression test added: bitmask_v32i8_split in
vec-combine-compare-to-bitmask.ll.

Note: in alias_mask.ll's whilewr_8_split2, the four halfword bitmask
results are now stored as separate `str h` × 4 rather than packed into
a d-register via ZIP1+EXT before a single store. Functionally
equivalent, slightly fewer NEON arithmetic ops. Side effect of the i32
return type; the store-merging combine doesn't match the same shape.
DeltaFile
+49-49llvm/test/CodeGen/AArch64/sve-fixed-length-masked-expandloads.ll
+36-36llvm/test/CodeGen/AArch64/alias_mask.ll
+36-11llvm/test/CodeGen/AArch64/vec-combine-compare-to-bitmask.ll
+16-16llvm/test/CodeGen/AArch64/dag-combine-setcc.ll
+12-12llvm/test/CodeGen/AArch64/fixed_masked_deinterleaved_loads.ll
+12-12llvm/test/CodeGen/AArch64/fixed_masked_interleaved_stores.ll
+161-1363 files not shown
+183-1559 files