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

LLVM/project c7a7e13llvm/include/llvm/IR DebugLoc.h, llvm/lib/AsmParser LLParser.cpp

[spr] initial version

Created using spr 1.3.8-wip
DeltaFile
+0-42llvm/test/Verifier/dbg-declare-invalid-debug-loc.ll
+38-0llvm/test/Assembler/dbg-declare-invalid-debug-loc.ll
+26-2llvm/lib/AsmParser/LLParser.cpp
+8-19llvm/include/llvm/IR/DebugLoc.h
+6-14llvm/lib/IR/AutoUpgrade.cpp
+8-9llvm/lib/IR/DebugProgramInstruction.cpp
+86-8622 files not shown
+150-15228 files

LLVM/project a67efdallvm/lib/Transforms/Vectorize VPlanUtils.cpp, llvm/test/Transforms/LoopVectorize/RISCV masked_gather_scatter.ll

[VPlan] Recognize shl by constant in getSCEVExprForVPValue. (#199359)

Treat `shl x, c` (with c < bitwidth) as `x * (1 << c)` so callers that
analyze GEP indices via SCEV can see through stride shifts written as
logical shifts.

PR: https://github.com/llvm/llvm-project/pull/199359
DeltaFile
+6-6llvm/test/Transforms/LoopVectorize/RISCV/masked_gather_scatter.ll
+7-0llvm/lib/Transforms/Vectorize/VPlanUtils.cpp
+13-62 files

LLVM/project c78c900llvm/test/CodeGen/AArch64 bf16-v8-instructions.ll bf16-instructions.ll

[AArch64] Add tests for bf16 convert with fast-math flags. NFC (#200643)
DeltaFile
+308-0llvm/test/CodeGen/AArch64/bf16-v8-instructions.ll
+173-10llvm/test/CodeGen/AArch64/bf16-instructions.ll
+177-0llvm/test/CodeGen/AArch64/bf16-v4-instructions.ll
+658-103 files

LLVM/project da3f152llvm/include/llvm/IR Constants.h Constant.h, llvm/lib/IR Constants.cpp ConstantsContext.h

[IR][NFC] Fast path for Constant::isNullValue (#200434)

Constant::isNullValue is the, by far, most frequently called out-of-line
function of Constant. It also has non-trivial logic and needs to switch
on the class type.

Therefore, compute the "is null" property once on construction and store
it in an unused bit in SubclassOptionalData.

This improves performance of stage2-O3 by 0.15%.
DeltaFile
+8-20llvm/lib/IR/Constants.cpp
+13-5llvm/include/llvm/IR/Constants.h
+10-1llvm/include/llvm/IR/Constant.h
+2-0llvm/lib/IR/ConstantsContext.h
+33-264 files

LLVM/project 80f6b76llvm/include/llvm/Object ELF.h, llvm/lib/Object ELF.cpp XCOFFObjectFile.cpp

[Object] Remove unused argument of DataExtractor constructor (NFC) (#197124)

`AddressSize` parameter is not used by `DataExtractor` and will be
removed in the future. See #190519 for more context.
DeltaFile
+2-2llvm/lib/Object/ELF.cpp
+1-2llvm/lib/Object/XCOFFObjectFile.cpp
+1-1llvm/include/llvm/Object/ELF.h
+1-1llvm/lib/Object/MachOObjectFile.cpp
+1-1llvm/lib/Object/Decompressor.cpp
+6-75 files

LLVM/project b49a468llvm/include/llvm/ProfileData GCOV.h, llvm/lib/ProfileData InstrProfCorrelator.cpp

[Profile] Remove unused argument of DataExtractor constructor (NFC) (#197119)

`AddressSize` parameter is not used by `DataExtractor` and will be
removed in the future. See #190519 for more context.
DeltaFile
+5-5llvm/include/llvm/ProfileData/GCOV.h
+1-1llvm/lib/ProfileData/InstrProfCorrelator.cpp
+6-62 files