LLVM/project e920ecellvm/lib/Target/RISCV RISCVOptWInstrs.cpp, llvm/test/CodeGen/RISCV prefer-w-inst.mir sextw-removal.ll

[RISCV] Prevent RISCVOptWInstrs from shrinking volatile LD instructions. (#200472)

Fixes #200379
DeltaFile
+39-6llvm/test/CodeGen/RISCV/prefer-w-inst.mir
+17-0llvm/test/CodeGen/RISCV/sextw-removal.ll
+13-1llvm/lib/Target/RISCV/RISCVOptWInstrs.cpp
+69-73 files

LLVM/project 1f2223dllvm/lib/CodeGen ExpandIRInsts.cpp, llvm/utils profcheck-xfail.txt

[ExpandIRInsts] Fix profile metadata after #200291 (#200629)
DeltaFile
+8-1llvm/lib/CodeGen/ExpandIRInsts.cpp
+0-2llvm/utils/profcheck-xfail.txt
+8-32 files

LLVM/project ec7769cclang/lib/CodeGen CGObjCMacConstantLiteralUtil.h, llvm/include/llvm/ADT CachedHashString.h DenseMapInfo.h

[𝘀𝗽𝗿] initial version

Created using spr 1.3.5-bogner
DeltaFile
+12-28llvm/include/llvm/ADT/CachedHashString.h
+6-29llvm/lib/IR/LLVMContextImpl.h
+0-32llvm/include/llvm/ADT/DenseMapInfo.h
+6-18clang/lib/CodeGen/CGObjCMacConstantLiteralUtil.h
+3-18llvm/lib/Transforms/Scalar/EarlyCSE.cpp
+1-18llvm/lib/Transforms/IPO/AttributorAttributes.cpp
+28-143228 files not shown
+108-1,382234 files

LLVM/project 6eb8d3aclang/include/clang/Basic DirectoryEntry.h, clang/lib/APINotes APINotesFormat.h

[𝘀𝗽𝗿] changes to main this commit is based on

Created using spr 1.3.5-bogner

[skip ci]
DeltaFile
+6-18clang/lib/CodeGen/CGObjCMacConstantLiteralUtil.h
+0-18clang/lib/APINotes/APINotesFormat.h
+0-17mlir/include/mlir/IR/TypeRange.h
+0-16mlir/include/mlir/IR/Value.h
+2-14mlir/include/mlir/IR/Remarks.h
+3-12clang/include/clang/Basic/DirectoryEntry.h
+11-95100 files not shown
+39-617106 files

LLVM/project b17edc6llvm/lib/CodeGen ExpandIRInsts.cpp

[ExpandIRInsts] Drop ProfcheckDisableMetadataFixes in some cases (#200627)

This is unnecessary inside of applyProfMetadataIfEnabled because it is
already handled before the callback lambda gets called within the
function. There was also a redundant case to remove.
DeltaFile
+15-19llvm/lib/CodeGen/ExpandIRInsts.cpp
+15-191 files

LLVM/project dbf01d4utils/bazel/llvm-project-overlay/clang/include/clang/Config config.h

[bazel] Add CLANG_USE_EXPERIMENTAL_CONST_INTERP (fixup for #199396) (#200619)
DeltaFile
+3-0utils/bazel/llvm-project-overlay/clang/include/clang/Config/config.h
+3-01 files

LLVM/project 16a127bllvm/lib/Transforms/Utils Local.cpp, llvm/test/Transforms/GVN invariant.group.ll

[IR] Fix !invariant.group in combineMetadataForCSE when K moves (#200551)

SimplifyCFG mergeConditionalStoreToAddress currently transforms

    if (cond)
      store ptr, x !invariant.group;
    else
      store ptr, y;

into

    store ptr, select(cond, x, y) !invariant.group;  // BUG

It's clearly not valid to preserve !invariant.group here.

Fix this inside combineMetadataForCSE.  It can only preserve
!invariant.group if

 1. !DoesKMove, meaning that original instruction ("K") is replaced by

    [5 lines not shown]
DeltaFile
+60-0llvm/test/Transforms/SimplifyCFG/merge-cond-stores.ll
+5-14llvm/lib/Transforms/Utils/Local.cpp
+1-1llvm/test/Transforms/NewGVN/invariant.group.ll
+1-1llvm/test/Transforms/GVN/invariant.group.ll
+67-164 files

LLVM/project baa0796compiler-rt/lib/asan asan_allocator.cpp asan_allocator.h, compiler-rt/lib/asan/tests asan_noinst_test.cpp

[asan] NFC: clang-format allocator-related files (#200478)

Depends on #200615
Groundwork for #196413.

Mechanical cleanup of allocator related files in preparation of
functional changes. clang-format (v21.1.2) applied whole-file to:

  compiler-rt/lib/asan/asan_allocator.cpp
  compiler-rt/lib/asan/asan_allocator.h
  compiler-rt/lib/asan/asan_malloc_linux.cpp
  compiler-rt/lib/asan/asan_malloc_mac.cpp
  compiler-rt/lib/asan/asan_new_delete.cpp
  compiler-rt/lib/asan/tests/asan_noinst_test.cpp

Both compiler-rt/lib/asan/.clang-format and
compiler-rt/lib/sanitizer_common/.clang-format use
"BasedOnStyle: Google", so pointer alignment becomes "Type* name"
throughout.

    [3 lines not shown]
DeltaFile
+182-188compiler-rt/lib/asan/asan_allocator.cpp
+55-53compiler-rt/lib/asan/asan_allocator.h
+53-52compiler-rt/lib/asan/asan_malloc_linux.cpp
+43-47compiler-rt/lib/asan/asan_new_delete.cpp
+35-31compiler-rt/lib/asan/tests/asan_noinst_test.cpp
+12-12compiler-rt/lib/asan/asan_malloc_mac.cpp
+380-3836 files

LLVM/project ab0e26fllvm/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 841be17llvm/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/tests/Inputs/fn-extract/lit.cfg
+19-0llvm/utils/lit/lit/llvm/fn_extract.py
+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 4085538llvm/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 ec42c02llvm/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 830b8c0utils/bazel/llvm-project-overlay/clang/include/clang/Config config.h

[bazel] Add CLANG_USE_EXPERIMENTAL_CONST_INTERP (fixup for #199396)
DeltaFile
+3-0utils/bazel/llvm-project-overlay/clang/include/clang/Config/config.h
+3-01 files

LLVM/project 3fc7e96llvm/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 d924db3llvm/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 b510548compiler-rt/lib/asan asan_allocator.cpp

[asan] NFC: tag ambiguous literal args at Allocate call sites (#200615)

Groundwork for #200478

Add /*name=*/ comments to ambiguous literal call-site arguments in
compiler-rt/lib/asan/asan_allocator.cpp so the parameter name is visible
at the call site for the Allocate / instance.Allocate uses. Covers the
can_fill flag and the bare alignment literals (8, 16, 0) used by:

  asan_malloc / asan_vec_malloc / asan_realloc / asan_valloc /
  asan_pvalloc / asan_memalign / asan_aligned_alloc /
  asan_posix_memalign / asan_new / asan_new_aligned

and the internal Reallocate / Calloc paths.

NFC.

Assisted by: Claude Opus 4.7
DeltaFile
+25-17compiler-rt/lib/asan/asan_allocator.cpp
+25-171 files

LLVM/project 80ed9c8llvm/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 0064ceellvm/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
+14-0llvm/utils/FileCheck/FileCheck.cpp
+5-0llvm/lib/FileCheck/FileCheckImpl.h
+5-0llvm/include/llvm/FileCheck/FileCheck.h
+99-05 files

LLVM/project 7a07381libc/src/wctype wctype_impl.h wctype.h, libc/test/src/wctype wctype_test.cpp iswctype_test.cpp

[libc][wctype] Rename src/wctype/wctype.h to avoid name collision with system header. (#200613)
DeltaFile
+22-0libc/src/wctype/wctype_impl.h
+0-22libc/src/wctype/wctype.h
+1-1libc/test/src/wctype/wctype_test.cpp
+1-1libc/test/src/wctype/iswctype_test.cpp
+1-1libc/src/wctype/wctype.cpp
+1-1libc/src/wctype/CMakeLists.txt
+26-266 files

LLVM/project fcb3c89llvm/test/Transforms/AtomicExpand/X86 expand-atomic-non-integer.ll

[AtomicExpand][test] Add CHECK32 and CHECK64 via whole-file regen
DeltaFile
+195-1llvm/test/Transforms/AtomicExpand/X86/expand-atomic-non-integer.ll
+195-11 files

LLVM/project 866945clibcxx/include/__ranges concat_view.h, libcxx/test/libcxx/ranges/range.adaptors/range.concat iterator.valueless_by_exception.pass.cpp

[libc++][ranges] P2542R8: Implement `views::concat` (#120920)

Closes #105419
Closes #105348
Closes #105349
Closes #171314

Assisted-by: Chatgpt. 
I use AI to help me write some tests, however. I have reviewed the code
I submit in the tests.

---------

Co-authored-by: A. Jiang <de34 at live.cn>
Co-authored-by: Hristo Hristov <hghristov.rmm at gmail.com>
Co-authored-by: Hristo Hristov <zingam at outlook.com>
DeltaFile
+659-0libcxx/test/libcxx/ranges/range.adaptors/range.concat/iterator.valueless_by_exception.pass.cpp
+655-0libcxx/test/std/ranges/range.adaptors/range.concat/iterator/arithmetic.pass.cpp
+651-0libcxx/include/__ranges/concat_view.h
+288-0libcxx/test/std/ranges/range.adaptors/range.concat/constraints.pass.cpp
+256-0libcxx/test/std/ranges/range.adaptors/range.concat/iterator/member_types.compile.pass.cpp
+236-0libcxx/test/std/ranges/range.adaptors/range.concat/iterator/compare.pass.cpp
+2,745-030 files not shown
+4,861-3036 files

LLVM/project 223ef1fclang/test/CodeGen builtins-nvptx-native-half-type.c promoted-complex-div.c, llvm/lib/IR IRBuilder.cpp

[IRBuilder] ConstFold unary intrinsics (#200496)

Extend TargetFolder and InstSimplifyFolder to fold unary intrinsics.
CreateUnaryIntrinsic now returns a Value, similar to
CreateBinaryIntrinsic, and this has necessitated more changes.
DeltaFile
+8-6llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp
+8-5llvm/lib/IR/IRBuilder.cpp
+1-10llvm/test/Transforms/SLPVectorizer/X86/revec-reduced-value-vectorized-later.ll
+7-4llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
+5-5clang/test/CodeGen/builtins-nvptx-native-half-type.c
+8-2clang/test/CodeGen/promoted-complex-div.c
+37-3232 files not shown
+116-10138 files

LLVM/project 8d5d550llvm/lib/Transforms/Vectorize VPlanUtils.h VPlanPatternMatch.h

[VPlan] Factor vputils::getIntrinsicID (NFC) (#200174)

In preparation to get getOpcodeOrIntrinsicID used by CSE to handle calls
and to constant-fold intrinsic calls, factor out vputils::getIntrinsicID
from VPlanPatternMatch to re-use.
DeltaFile
+24-22llvm/lib/Transforms/Vectorize/VPlanUtils.h
+19-21llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h
+10-10llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+7-7llvm/lib/Transforms/Vectorize/VPlanUtils.cpp
+4-5llvm/lib/Transforms/Vectorize/VPlanConstruction.cpp
+4-5llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+68-706 files

LLVM/project 3f673f7clang-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

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 ea7a200clang-tools-extra/clang-tidy/modernize UseRangesCheck.cpp, clang-tools-extra/clang-tidy/utils UseRangesCheck.cpp UseRangesCheck.h

[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/clang-tidy/utils/UseRangesCheck.h
+132-71 files not shown
+134-77 files

LLVM/project da0f0b3clang-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 9afac79clang-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 42d712ellvm/lib/Target/X86 X86TargetTransformInfo.cpp, llvm/test/Transforms/LoopVectorize/X86 vector_max_bandwidth.ll

[X86][TTI] Use dyn_cast_or_null in getGSVectorCost. (#200606)

Ptr may be nullptr, use dyn_cast_or_null to fix crash.

Fixes https://github.com/llvm/llvm-project/issues/200330.
DeltaFile
+24-0llvm/test/Transforms/LoopVectorize/X86/vector_max_bandwidth.ll
+1-1llvm/lib/Target/X86/X86TargetTransformInfo.cpp
+25-12 files

LLVM/project 6d2a90bllvm/lib/Target/X86 X86ISelLowering.cpp, llvm/test/CodeGen/X86 vector-shuffle-combining-avx512vbmi2.ll

[X86] matchBinaryPermuteShuffle - match to X86ISD::SHLD funnel shift patterns (REAPPLIED) (#200604)

Add matchShuffleAsVSHLD helper to recognise shuffle masks that can fold
to funnel shifts

Reapplied with fix for shift amount not being appropriately scaled -
test case added at #200569

Fixes #145276
DeltaFile
+46-0llvm/lib/Target/X86/X86ISelLowering.cpp
+16-18llvm/test/CodeGen/X86/vector-shuffle-combining-avx512vbmi2.ll
+62-182 files

LLVM/project 1f10f1cllvm/include/llvm/ADT DenseMap.h, llvm/lib/IR Value.cpp

[DenseMap] Replace tombstone deletion with TAOCP 6.4 Algorithm R (#200595)

DenseMap uses quadratic probing with lazy deletion: an erased entry
becomes a tombstone, a third bucket state alongside empty and live that
every find/insert must inspect.

Switch to linear probing with backward-shift deletion (Knuth TAOCP 6.4
Algorithm R), similar to the SmallPtrSet change #197637. This removes
the tombstone state entirely.

In exchange, erase now relocates the following live entries to close the
hole, so it invalidates iterators and references other than the erased
one. For callers that cache pointers into the bucket array,
erase(Key, OnMoved) and erase(iterator, OnMoved) fire a callback once
per
shifted bucket, so fix-ups cost O(cluster) rather than O(NumEntries).
ValueHandleBase::RemoveFromUseList uses this to refresh each moved
handle's PrevPtr.


    [17 lines not shown]
DeltaFile
+91-119llvm/include/llvm/ADT/DenseMap.h
+4-1llvm/lib/IR/Value.cpp
+1-2llvm/unittests/ADT/BitVectorTest.cpp
+96-1223 files