LLVM/project 21cd772cmake/Modules LLVMVersion.cmake, libcxx/include __config

Bump version to 23.1.1
DeltaFile
+1-1llvm/utils/mlgo-utils/mlgo/__init__.py
+1-1llvm/utils/lit/lit/__init__.py
+1-1llvm/utils/gn/secondary/llvm/version.gni
+1-1libcxx/include/__config
+1-1cmake/Modules/LLVMVersion.cmake
+5-55 files

LLVM/project 0c1af4ellvm/lib/Target/SPIRV SPIRVPassRegistry.def SPIRVCodeGenPassBuilder.cpp

[SPIRV][NewPM] Port AsmPrinter

Standard NewPM AsmPrinter porting.

Reviewers: aeubanks, Keenuts, VyacheslavLevytskyy

Pull Request: https://github.com/llvm/llvm-project/pull/219111
DeltaFile
+38-0llvm/lib/Target/SPIRV/SPIRVAsmPrinter.h
+36-0llvm/lib/Target/SPIRV/SPIRVAsmPrinter.cpp
+17-0llvm/lib/Target/SPIRV/SPIRVCodeGenPassBuilder.cpp
+3-0llvm/lib/Target/SPIRV/SPIRVPassRegistry.def
+94-04 files

LLVM/project 6318635clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/zvabd/policy/non-overloaded vabd.c vabdu.c, clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/zvabd/policy/overloaded vabdu.c

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+2,428-0llvm/test/CodeGen/SPIRV/extensions/SPV_EXT_long_vector/unmerge-crash-0.ll
+2,426-0llvm/test/CodeGen/SPIRV/extensions/SPV_EXT_long_vector/unmerge-crash-1.ll
+2,058-2libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp
+1,449-52clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/zvabd/policy/overloaded/vabdu.c
+1,449-52clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/zvabd/policy/non-overloaded/vabdu.c
+1,419-52clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/zvabd/policy/non-overloaded/vabd.c
+11,229-158816 files not shown
+41,082-7,717822 files

LLVM/project 0233576llvm/lib/Target/SPIRV SPIRVPassRegistry.def SPIRVCodeGenPassBuilder.cpp

[SPIRV][NewPM] Port SPIRVPostLegalizer

Standard NewPM pass porting. Most of the implementation was already in
static functions so this was pretty simple.

Reviewers: Keenuts, aeubanks, VyacheslavLevytskyy

Pull Request: https://github.com/llvm/llvm-project/pull/219109
DeltaFile
+23-8llvm/lib/Target/SPIRV/SPIRVPostLegalizer.cpp
+10-2llvm/lib/Target/SPIRV/SPIRV.h
+2-2llvm/lib/Target/SPIRV/SPIRVTargetMachine.cpp
+1-1llvm/lib/Target/SPIRV/SPIRVCodeGenPassBuilder.cpp
+1-0llvm/lib/Target/SPIRV/SPIRVPassRegistry.def
+37-135 files

LLVM/project 8c56622clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/zvabd/policy/non-overloaded vabd.c vabdu.c, clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/zvabd/policy/overloaded vabdu.c

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+2,428-0llvm/test/CodeGen/SPIRV/extensions/SPV_EXT_long_vector/unmerge-crash-0.ll
+2,426-0llvm/test/CodeGen/SPIRV/extensions/SPV_EXT_long_vector/unmerge-crash-1.ll
+2,058-2libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp
+1,449-52clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/zvabd/policy/overloaded/vabdu.c
+1,449-52clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/zvabd/policy/non-overloaded/vabdu.c
+1,419-52clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/zvabd/policy/non-overloaded/vabd.c
+11,229-158816 files not shown
+41,082-7,717822 files

LLVM/project 6bdcba2llvm/lib/Target/SPIRV SPIRVPassRegistry.def SPIRVCodeGenPassBuilder.cpp

[SPIRV][NewPM] Port SPIRVPreLegalizerCombiner

Standard NewPM pass porting. We do need to move the rule config parsing
into being per MF, but this should not be a noticeable regression.

Reviewers: aeubanks, Keenuts, VyacheslavLevytskyy

Pull Request: https://github.com/llvm/llvm-project/pull/219108
DeltaFile
+51-22llvm/lib/Target/SPIRV/SPIRVPreLegalizerCombiner.cpp
+10-2llvm/lib/Target/SPIRV/SPIRV.h
+2-2llvm/lib/Target/SPIRV/SPIRVTargetMachine.cpp
+1-2llvm/lib/Target/SPIRV/SPIRVCodeGenPassBuilder.cpp
+1-0llvm/lib/Target/SPIRV/SPIRVPassRegistry.def
+65-285 files

LLVM/project e4f71fbllvm/lib/Target/SPIRV SPIRVCodeGenPassBuilder.cpp SPIRVTargetMachine.cpp

[SPIRV][NewPM] Port SPIRVPreLegalizer

Standard NewPM pass porting. The pass does not use any analyses and was
already largely implemented as static functions so this is mostly just
adding the NewPM boilerplate.

Reviewers: aeubanks, Keenuts, VyacheslavLevytskyy

Pull Request: https://github.com/llvm/llvm-project/pull/219104
DeltaFile
+27-9llvm/lib/Target/SPIRV/SPIRVPreLegalizer.cpp
+13-2llvm/lib/Target/SPIRV/SPIRV.h
+6-0llvm/lib/Target/SPIRV/SPIRVPassRegistry.def
+2-2llvm/lib/Target/SPIRV/SPIRVTargetMachine.cpp
+1-1llvm/lib/Target/SPIRV/SPIRVCodeGenPassBuilder.cpp
+49-145 files

LLVM/project 467ec76llvm/lib/Target/SPIRV SPIRVGlobalRegistry.cpp

[NFC][SPIRV] Fix dangling reference to a temporary MachineInstrBuilder (#219243)
DeltaFile
+1-1llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.cpp
+1-11 files

LLVM/project 6d7053allvm/include/llvm/ProfileData InstrProfWriter.h, llvm/lib/ProfileData InstrProfWriter.cpp

[InstrProf] Init -memprof-random-hotness-seed to constant default value (#217083)

There are two places where `llvm-profdata` uses randomness.
1. To generate random hotness values in MemProf, created in
https://github.com/llvm/llvm-project/pull/113998
2. To sample a set of traces here

https://github.com/llvm/llvm-project/blob/bc2e50bf7baf1c52370f8d8cdfee4bba2180d27a/llvm/lib/ProfileData/InstrProfWriter.cpp#L383-L391

Prior to this PR, these used two different implementations. Apparently
the implementation of `std::rand()` depends on the platform, causing the
test in https://github.com/llvm/llvm-project/pull/216878 to fail on
windows. Switching to `std::mt19937` should solve this problem, which is
already used to sample traces.

While I'm here, also create the `-random-seed` flag to alias
`-memprof-random-hotness-seed`, which is now used by both places in
`llvm-profdata`. Deprecate `-memprof-random-hotness-seed` in favor of
the alias `-random-seed`.

    [4 lines not shown]
DeltaFile
+57-0llvm/test/tools/llvm-profdata/merge-traces-seed.proftext
+7-17llvm/test/Transforms/PGOProfile/memprof.ll
+14-8llvm/tools/llvm-profdata/llvm-profdata.cpp
+5-13llvm/lib/ProfileData/InstrProfWriter.cpp
+2-4llvm/include/llvm/ProfileData/InstrProfWriter.h
+85-425 files

LLVM/project 44fd26cllvm/test/Transforms/PGOProfile thinlto_indirect_call_promotion.ll, llvm/test/Transforms/PGOProfile/Inputs thinlto_indirect_call_promotion.profraw update_thinlto_indirect_call_promotion_inputs.sh

[PGOProfile] Use .proftext in test to avoid binary blob (#219055)

Use `.proftext` in `thinlto_indirect_call_promotion.ll` to avoid
checking in the binary file `thinlto_indirect_call_promotion.profraw`
(and `update_thinlto_indirect_call_promotion_inputs.sh` that generates
the profile).

I ran `llvm-profdata show --text` to convert the `.profdata` file into a
`.proftext` file that could be inlined into the test. I actually had to
regenerate the `.profraw` file because of a version mismatch. I suspect
that the `REQUIRES: zlib` in the test was actually making this test not
run at all, because it was failing on my machine before this.

Also delete
`llvm/test/tools/llvm-profdata/Inputs/thinlto_indirect_call_promotion.profraw`
which seems to be completely unused.
DeltaFile
+56-30llvm/test/Transforms/PGOProfile/thinlto_indirect_call_promotion.ll
+0-62llvm/test/Transforms/PGOProfile/Inputs/update_thinlto_indirect_call_promotion_inputs.sh
+0-0llvm/test/tools/llvm-profdata/Inputs/thinlto_indirect_call_promotion.profraw
+0-0llvm/test/Transforms/PGOProfile/Inputs/thinlto_indirect_call_promotion.profraw
+56-924 files

LLVM/project adb74d0clang/test/CodeGen pgo-instrumentation.c, clang/test/CodeGen/Inputs pgotestir.profraw pgotestclang.profraw

[InstrProf] Remove pgotestir.profraw test file (#219068)

Remove `pgotestir.profraw` which is actually the same as
`pgotestir.proftext`. Also rename `pgotestclang.profraw` to
`pgotestclang.proftext` since it is actually just a test file, not a
binary blob. Update the test to reflect these changes.
DeltaFile
+2-2clang/test/CodeGen/pgo-instrumentation.c
+0-1clang/test/CodeGen/Inputs/pgotestir.profraw
+0-1clang/test/CodeGen/Inputs/pgotestclang.profraw
+1-0clang/test/CodeGen/Inputs/pgotestclang.proftext
+3-44 files

LLVM/project 18d1ed0llvm/lib/Transforms/Scalar Reassociate.cpp, llvm/test/Transforms/PhaseOrdering/AArch64 reassociate-fma-pairs.ll reduce_submuladd.ll

[Reassociate] Improve handling of fadd/fmul pairs (#218675)

Currently fadd/fmul pairs are treated as leaf nodes in order to preserve
pairs of instructions likely to result in FMA generation. However, doing
this unconditionally can prevent reassociation of deeper expression
trees. This commit fixes that by preserving an fadd/fmul pair as a leaf
only when the other operand of the fadd is not itself a reassociable
fadd expression.
DeltaFile
+70-70llvm/test/Transforms/PhaseOrdering/AArch64/reduce_submuladd.ll
+31-32llvm/test/Transforms/PhaseOrdering/AArch64/reassociate-fma-pairs.ll
+10-14llvm/test/Transforms/Reassociate/fma-pairs.ll
+8-3llvm/lib/Transforms/Scalar/Reassociate.cpp
+119-1194 files

LLVM/project e775aaallvm/test/CodeGen/AArch64/GlobalISel legalize-fshr.mir legalize-fshl.mir, llvm/test/CodeGen/AMDGPU/GlobalISel fshr.ll fshl.ll

[GlobalISel] Drop nuw/nsw/disjoint when widening a result with G_ANYEXT (#218558)

nuw/nsw/disjoint flags are only true at the original width. G_ANYEXT
leaves the new high bits unconstrained, so they must be dropped.
DeltaFile
+38-38llvm/test/CodeGen/AMDGPU/GlobalISel/fshl.ll
+34-34llvm/test/CodeGen/AMDGPU/GlobalISel/fshr.ll
+51-0llvm/unittests/CodeGen/GlobalISel/LegalizerHelperTest.cpp
+8-8llvm/test/CodeGen/AArch64/GlobalISel/legalize-fshr.mir
+8-8llvm/test/CodeGen/AArch64/GlobalISel/legalize-fshl.mir
+6-6llvm/test/CodeGen/RISCV/GlobalISel/legalizer/legalize-rotate-rv64.mir
+145-949 files not shown
+191-13115 files

LLVM/project f194226llvm/lib/Transforms/Scalar StraightLineStrengthReduce.cpp, llvm/test/Transforms/StraightLineStrengthReduce/NVPTX scev-candidate-differences.ll scev-unknown-filtering.ll

[SLSR] Skip candidate-basis differences when `SCEVUnknown`s differ (NFC) (#217451)

After SLSR finds a non-constant delta for a candidate, it will continue
searching for a constant delta. However, when the set of `SCEVUnknown`s
differs between a candidate and a basis, the offset cannot be constant.
Thus, prune that candidate and avoid an expensive, fruitless call to
`getSCEVMinus()`.
DeltaFile
+43-0llvm/lib/Transforms/Scalar/StraightLineStrengthReduce.cpp
+34-0llvm/test/Transforms/StraightLineStrengthReduce/NVPTX/scev-unknown-filtering.ll
+1-1llvm/test/Transforms/StraightLineStrengthReduce/NVPTX/scev-candidate-differences.ll
+78-13 files

LLVM/project 86779acllvm/lib/Target/AMDGPU AMDGPUPreLegalizerCombiner.cpp, llvm/test/CodeGen/AMDGPU/GlobalISel combine-short-clamp-inverted-bounds.mir

[AMDGPU][GlobalISel] Fix i64-to-i16 clamp combine on inverted bounds (#216306)

`abs(Cmp2 - Cmp1)` check couldn't tell inverted bounds `(Lo > Hi)` from
valid ones, letting the combine build a med3 that clamped to the wrong
range instead of the constant smin/smax result
DeltaFile
+137-0llvm/test/CodeGen/AMDGPU/GlobalISel/combine-short-clamp-inverted-bounds.mir
+12-14llvm/lib/Target/AMDGPU/AMDGPUPreLegalizerCombiner.cpp
+149-142 files

LLVM/project 4655324llvm/lib/Analysis CodeMetrics.cpp

[CodeMetrics] Cleanup ec75980 (NFC) (#219233)

Cleanup [[CodeMetrics] Remove NumCalls
(NFC)](https://github.com/llvm/llvm-project/pull/219120)
DeltaFile
+0-1llvm/lib/Analysis/CodeMetrics.cpp
+0-11 files

LLVM/project f85d895clang/include/clang/StaticAnalyzer/Checkers Checkers.td

Added HasDocumentation tag to the UseAfterLifetimeEnd checker.
DeltaFile
+1-1clang/include/clang/StaticAnalyzer/Checkers/Checkers.td
+1-11 files

LLVM/project d1a280dclang/docs/analyzer checkers.md

Address review comments
DeltaFile
+21-8clang/docs/analyzer/checkers.md
+21-81 files

LLVM/project 6d2323cclang/docs/analyzer checkers.md

Update clang/docs/analyzer/checkers.md

Co-authored-by: Balázs Benics <benicsbalazs at gmail.com>
DeltaFile
+1-2clang/docs/analyzer/checkers.md
+1-21 files

LLVM/project 27011ddclang/docs/analyzer checkers.md

[analyzer][docs] Add documentation for the UseAfterLifetimeEnd checker
DeltaFile
+59-0clang/docs/analyzer/checkers.md
+59-01 files

LLVM/project 322bd25clang/docs/analyzer checkers.md

Resolve nits from superseeded PR review.
DeltaFile
+5-5clang/docs/analyzer/checkers.md
+5-51 files

LLVM/project 3891beaclang/lib/CIR/CodeGen CIRGenBuiltin.cpp, clang/test/CIR/CodeGenBuiltins builtin-undef-rvalue.cpp builtin-sync.cpp

[CIR] Implement missing __sync_* atomic builtins (#214606)

Add CIR codegen support for five legacy __sync_* builtins that
previously emitted "Not Yet Implemented" errors:

  __sync_val_compare_and_swap  ->  cir.atomic.cmpxchg (seq_cst)
  __sync_bool_compare_and_swap ->  cir.atomic.cmpxchg + cmp (seq_cst)
  __sync_swap                  ->  cir.atomic.xchg (seq_cst)
  __sync_lock_test_and_set     ->  cir.atomic.xchg (seq_cst)
  __sync_lock_release          ->  cir.store 0 (release)

Size-suffixed forms (_1, _2, _4, _8) are handled, covering 20 builtin
variants in total; the unsuffixed forms are rewritten by Sema and the
_16 variants fall back to errorBuiltinNYI.

The existing emitBinaryAtomic / emitBinaryAtomicPost infrastructure
already handled the arithmetic __sync_* family (fetch_and_add, etc.).
This patch adds the remaining compare-and-swap, exchange, and
lock-release helpers: emitAtomicCmpXchgValue, emitAtomicCmpXchgBool,

    [10 lines not shown]
DeltaFile
+186-0clang/test/CIR/CodeGenBuiltins/builtin-sync.cpp
+68-7clang/lib/CIR/CodeGen/CIRGenBuiltin.cpp
+1-1clang/test/CIR/CodeGenBuiltins/builtin-undef-rvalue.cpp
+255-83 files

LLVM/project cf618e1llvm/lib/CodeGen/SelectionDAG LegalizeVectorTypes.cpp, llvm/lib/IR Verifier.cpp

Restrict intrinsic to fixed->scalable with same min EC

This simplifies a lot of the legalisation code. The codegen regressions
for 64b -> scalable 128b can be addressed with a DAG combiner in a
follow-up.
DeltaFile
+56-200llvm/test/CodeGen/AArch64/sve-vector-broadcast.ll
+16-71llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+23-59llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
+0-68llvm/test/CodeGen/AArch64/vector-broadcast.ll
+17-17llvm/test/Verifier/vector-broadcast-intrinsic-invalid.ll
+9-18llvm/lib/IR/Verifier.cpp
+121-4337 files not shown
+135-49813 files

LLVM/project 155fe33llvm/test/CodeGen/AMDGPU llvm.sin.bf16.ll llvm.cos.bf16.ll, llvm/test/Transforms/InstCombine cos-sin-intrinsic.ll

[AMDGPU] Allow constant folding of bfloat
DeltaFile
+43-26llvm/test/Transforms/InstCombine/AMDGPU/amdgcn-intrinsics.ll
+39-8llvm/test/CodeGen/AMDGPU/llvm.sin.bf16.ll
+39-8llvm/test/CodeGen/AMDGPU/llvm.cos.bf16.ll
+39-8llvm/test/CodeGen/AMDGPU/llvm.amdgcn.sin.bf16.ll
+39-8llvm/test/CodeGen/AMDGPU/llvm.amdgcn.cos.bf16.ll
+36-0llvm/test/Transforms/InstCombine/cos-sin-intrinsic.ll
+235-582 files not shown
+243-668 files

LLVM/project 74bed73clang/docs ReleaseNotes.md, clang/docs/analyzer checkers.md

[analyzer] Move the lifetime checkers from alpha.cplusplus to alpha.core (#216739)

This PR moves the lifetime checkers from `alpha.cplusplus` to
`alpha.core`. This PR is the beginning of future PRs that will bring the
lifetime checkers from `alpha` to `core`. To meet the requirements of a
`core` checker there are still missing works for these checkers that is
the reason this PR only moves them from `alpha.cplusplus` to
`alpha.core`.
DeltaFile
+60-59clang/docs/analyzer/checkers.md
+16-16clang/include/clang/StaticAnalyzer/Checkers/Checkers.td
+2-2clang/test/Analysis/lifetime-bound.cpp
+1-1clang/test/Analysis/debug-lifetime-bound.cpp
+1-1clang/test/Analysis/dangling-ptr-deref.cpp
+2-0clang/docs/ReleaseNotes.md
+82-796 files

LLVM/project b0ab8c6clang/test/CodeGen/AArch64/neon load.c, libcxx/test/std/language.support/support.limits/support.limits.general version.version.compile.pass.cpp

Merge commit '6d0f89b56ac44b6e7a9bf4279a8647807bf62b02' into HEAD

# Conflicts:
#       flang/unittests/Evaluate/designator-path.cpp
DeltaFile
+0-6,246llvm/test/CodeGen/AMDGPU/NextUseAnalysis/test_ers_nested_loops.mir
+0-4,877llvm/test/CodeGen/AMDGPU/NextUseAnalysis/test_ers_emit_restore_in_loop_preheader2.mir
+1,217-1,125llvm/test/CodeGen/AMDGPU/atomic_optimizations_global_pointer.ll
+2,240-0clang/test/CodeGen/AArch64/neon/load.c
+853-1,375llvm/test/CodeGen/AMDGPU/splitkit-getsubrangeformask-phi-extend.ll
+2,058-2libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp
+6,368-13,6252,442 files not shown
+102,963-64,0392,448 files

LLVM/project f30a8dfmlir/lib/Dialect/LLVMIR/Transforms InlinerInterfaceImpl.cpp, mlir/test/Dialect/LLVMIR inlining-alias-scopes.mlir

[mlir][LLVM] Use a disjoint scope domain when inlining noalias

This matches recent changes to the LLVM inliner.

AI disclosure: Claude wrote the code, I wrote the commit message and
have done initial review.
DeltaFile
+28-25mlir/lib/Dialect/LLVMIR/Transforms/InlinerInterfaceImpl.cpp
+10-18mlir/test/Dialect/LLVMIR/inlining-alias-scopes.mlir
+38-432 files

LLVM/project 56b7bf7mlir/lib/Dialect/LLVMIR/Transforms InlinerInterfaceImpl.cpp

Update comment
DeltaFile
+2-2mlir/lib/Dialect/LLVMIR/Transforms/InlinerInterfaceImpl.cpp
+2-21 files

LLVM/project 6095daamlir/lib/Dialect/LLVMIR/Transforms InlinerInterfaceImpl.cpp

Remove pointless comment
DeltaFile
+0-2mlir/lib/Dialect/LLVMIR/Transforms/InlinerInterfaceImpl.cpp
+0-21 files

LLVM/project b67912emlir/test/Dialect/LLVMIR inlining-alias-scopes.mlir

Test that the inliner keeps the flag when it clones a domain

Co-Authored-By: Claude Opus 5 (1M context) <noreply at anthropic.com>
DeltaFile
+35-0mlir/test/Dialect/LLVMIR/inlining-alias-scopes.mlir
+35-01 files