LLVM/project ebf1239 — libc/test/UnitTest Test.h PigweedTest.h

[libc][test] Split PigweedTest.h out of GTest.h (#247278)

Test.h previously routed LIBC_COPT_TEST_USE_PIGWEED to GTest.h with a
TODO to migrate Pigweed onto LIBC_COPT_TEST_USE_GTEST. However,
Pigweed's pw_unit_test:light backend does not provide ::testing::Matcher
or gmock-style matchers, so sharing GTest.h fails to compile against
pw_unit_test:light and leaves LIBC_TEST_HAS_MATCHERS() enabled when
matchers are unavailable.

Give LIBC_COPT_TEST_USE_PIGWEED its own minimal PigweedTest.h adapter
that exports LIBC_NAMESPACE::testing::Test from <gtest/gtest.h> and
defines LIBC_TEST_HAS_MATCHERS() as (0), matching ZxTest.h. This keeps
Pigweed builds working against pw_unit_test:light while allowing GTest.h
to rely on real GoogleTest and GoogleMock facilities.

Part of #91630

Assisted-by: Gemini
DeltaFile
+31-0libc/test/UnitTest/PigweedTest.h
+6-4libc/test/UnitTest/Test.h
+37-42 files

LLVM/project ebcc78b — compiler-rt/lib/tsan/rtl tsan_interceptors_mac.cpp, compiler-rt/test/tsan/Darwin xpc.mm

[TSan][Darwin] Fix false positive data race reports in __copy_helper_block in xpc_* interceptors (#243231)

I have been seeing false positive data race reports on
__copy_helper_block* functions occurring in xpc_* interceptors. This is
happening because the generated copy helper runs after the Release in
the interceptor, and writes memory that gets accessed on another thread
when the block actually executes.

This patch adopts the explicit Block_copy approach used by the
dispatch_* interceptors. This works because it forces the memory writes
to occur before the Release, so that the accesses in the block can see
the happens-before relationship to the block copy. It also adjusts the
xpc.mm test to force copy helpers to be generated - without the
interceptor fixes, these would produce false positive race reports.

Assisted by LLMs

rdar://192918489
DeltaFile
+40-20compiler-rt/test/tsan/Darwin/xpc.mm
+13-9compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cpp
+53-292 files

LLVM/project 8415da3 — llvm/test/CodeGen/AMDGPU srem.ll load-global-i8.ll, llvm/test/CodeGen/RISCV clmul.ll

Merge remote-tracking branch 'origin/main' into users/jroelofs/constraint-elim-minmax-2
DeltaFile
+4,870-4,906llvm/test/CodeGen/AMDGPU/memintrinsic-unroll.ll
+11-7,563mlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp
+3,141-3,182llvm/test/CodeGen/RISCV/clmul.ll
+2,602-2,926llvm/test/CodeGen/X86/vector-compress.ll
+0-5,394llvm/test/CodeGen/AMDGPU/load-global-i8.ll
+0-5,274llvm/test/CodeGen/AMDGPU/srem.ll
+10,624-29,2459,924 files not shown
+443,802-308,0219,930 files

LLVM/project dbb6ebc — lldb/source/Core Module.cpp CoreProperties.td, lldb/test/API/functionalities/module_cache/force_disable TestModuleCacheForceDisable.py

[lldb] Reorganize the lldb-index-cache settings (#244411)

I mentioned in a Discourse post that I want to reorganize the
DataFileCache settings to reflect how I'm growing its use

https://discourse.llvm.org/t/settings-for-lldbs-datafilecache-as-i-add-new-things-in-there/92701/8

I added a new feature to settings to mark them as
Deprecated, and issue a warning redirecting them to a new setting in
https://github.com/llvm/llvm-project/pull/243732

This changes the old settings

```
symbols.enable-lldb-index-cache default off
symbols.lldb-index-cache-expiration-days default 7 
symbols.lldb-index-cache-max-byte-size
symbols.lldb-index-cache-max-percent
symbols.lldb-index-cache-path

    [36 lines not shown]
DeltaFile
+142-31lldb/source/Core/ModuleList.cpp
+70-0lldb/test/Shell/Settings/TestDeprecatedIndexCacheSettings.test
+60-0lldb/test/API/functionalities/module_cache/force_disable/TestModuleCacheForceDisable.py
+44-0lldb/source/Core/CoreProperties.td
+16-10lldb/source/Core/Module.cpp
+12-8lldb/test/Shell/SymbolFile/DWARF/x86/dwp-separate-debug-file.cpp
+344-4914 files not shown
+392-8120 files

LLVM/project 1bc0849 — llvm/include/llvm/CodeGen MIR2Vec.h, llvm/lib/CodeGen MIR2Vec.cpp

[MIR2Vec][NewPM] Port the vocabulary printer (#245926)
DeltaFile
+21-12llvm/lib/CodeGen/MIR2Vec.cpp
+10-0llvm/include/llvm/CodeGen/MIR2Vec.h
+2-0llvm/test/CodeGen/MIR2Vec/mir2vec-basic-symbolic.mir
+1-0llvm/lib/Passes/PassRegistry.def
+34-124 files

LLVM/project 954b17b — llvm/include/llvm/CAS ObjectStore.h, llvm/lib/CAS PluginCAS.cpp

[CAS] Skip validate-if-needed for plugins that don't support it (#247305)

`llvm-cas validate-if-needed` failed when the CAS plugin doesn't
implement llcas_cas_validate_if_needed, and with --allow-recovery it
then also attempted recovery, which fails for plugins without
llcas_cas_recover_ondisk_data. Such a plugin can't be validated, so
skip validation instead and exit successfully.

Report the missing function with std::errc::not_supported so llvm-cas
can tell it apart from other validation errors.

rdar://193900425
DeltaFile
+13-2llvm/tools/llvm-cas/llvm-cas.cpp
+3-2llvm/include/llvm/CAS/ObjectStore.h
+1-0llvm/lib/CAS/PluginCAS.cpp
+17-43 files

LLVM/project 5d30d5c — libc/src/string/memory_utils/generic inline_strcmp.h

feedback

Created using spr 1.3.7
DeltaFile
+5-4libc/src/string/memory_utils/generic/inline_strcmp.h
+5-41 files

LLVM/project 235e932 — .github CODEOWNERS

[mlir] Add Hardcode84 as code owner for UB dialect and SCF parallel loop fusion (#247276)

I just happen to know something about them.
DeltaFile
+8-0.github/CODEOWNERS
+8-01 files

LLVM/project 110c261 — libc/src/string/memory_utils/generic inline_strcmp.h

feedback

Created using spr 1.3.7
DeltaFile
+5-4libc/src/string/memory_utils/generic/inline_strcmp.h
+5-41 files

LLVM/project ba7daa2 — libc/src/string/memory_utils/generic inline_strcmp.h

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+5-4libc/src/string/memory_utils/generic/inline_strcmp.h
+5-41 files

LLVM/project 4bffcad — compiler-rt/lib/asan asan_rtl.cpp

[spr] update

Created using spr 2.0.0-beta.2
DeltaFile
+54-32compiler-rt/lib/asan/asan_rtl.cpp
+54-321 files

LLVM/project 6a6ffed — compiler-rt/lib/asan asan_interceptors_memintrinsics.cpp asan_interceptors_memintrinsics.h

[NFC][asan] Move FastCheckForUnpoisonedRegion to asan_poisoning.h (#247038)

Move `FastCheckForUnpoisonedRegion` from
`asan_interceptors_memintrinsics.h` to `asan_poisoning.h` and mark it
`ALWAYS_INLINE` so it can be shared with non-interceptor ASan runtime
checks such as `__asan_loadN` and `__asan_storeN`.

Assisted-by: Gemini
DeltaFile
+0-20compiler-rt/lib/asan/asan_interceptors_memintrinsics.h
+20-0compiler-rt/lib/asan/asan_poisoning.h
+1-0compiler-rt/lib/asan/asan_interceptors_memintrinsics.cpp
+21-203 files

LLVM/project e66d5cd — llvm/lib/Transforms/Vectorize VPlanHelpers.h VPlan.cpp

[VPlan] Replace getRuntimeVF with IRBuilder::CreateElementCount (NFC) (#247236)

getRuntimeVF only forwards to IRBuilderBase::CreateElementCount. Call
the builder directly and remove the wrapper.
DeltaFile
+0-9llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+3-3llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
+0-5llvm/lib/Transforms/Vectorize/VPlanHelpers.h
+3-2llvm/lib/Transforms/Vectorize/VPlan.cpp
+6-194 files

LLVM/project f915e6d — flang/lib/Semantics expression.cpp, flang/test/Semantics/CUDA cuf-generic-pr239830-review-resolution.cuf cuf-generic-pr239830-review-examples.cuf

[flang] Apply the non-elemental preference before comparing CUDA distances

F2023 15.5.5.2 and 15.5.6p2 select a specific that is consistent with a
non-elemental reference before considering an elemental one. Generic
resolution compared each matching specific with the distance of the previous
match, whatever its kind, so an elemental specific was compared with
non-elemental ones and the result depended on the order of the specifics. With
non-elemental specifics at distances 2 and 1 declared around an elemental one
at 0, the worse one was selected, and a non-elemental specific at the same
distance as the elemental one was reported as a tie.

Collect the matching specifics, rank only the non-elemental ones when there
are any, and report a tie only between the best matches, so that a tie
between earlier specifics does not hide a better later one either. The
distances and the ranking of specifics of the same kind do not change.
DeltaFile
+79-0flang/test/Semantics/CUDA/cuf-generic-candidate-order.cuf
+44-30flang/lib/Semantics/expression.cpp
+30-0flang/test/Semantics/CUDA/cuf-generic-elemental-preference.cuf
+2-3flang/test/Semantics/CUDA/cuf-generic-pr239830-review-examples.cuf
+2-2flang/test/Semantics/CUDA/cuf-generic-pr239830-review-resolution.cuf
+157-355 files

LLVM/project 0132c7f — flang/test/Semantics/CUDA cuf-generic-pr239830-review-resolution.cuf

[flang][test] Check which specific the PR 239830 review examples resolve to

Read the specific from the unparsed call for each example that resolves, so the
selection is checked as well as the diagnostics of the ambiguous examples.
DeltaFile
+211-0flang/test/Semantics/CUDA/cuf-generic-pr239830-review-resolution.cuf
+211-01 files

LLVM/project a120f0c — mlir/include/mlir/Dialect/Math/IR MathOps.td, mlir/test/Conversion/GPUToNVVM gpu-to-nvvm.mlir

[mlir][Math] Add Idempotent trait to idempotent ops (#246405)

Add the `Idempotent` trait to idempotent math ops so f(f(x)) gets folded
to f(x). Applied to: `absf`, `absi`, `ceil`, `copysign`, `floor`,
`roundeven`, `round`, and `trunc`.
DeltaFile
+78-0mlir/test/Dialect/Math/canonicalize.mlir
+8-8mlir/include/mlir/Dialect/Math/IR/MathOps.td
+3-3mlir/test/Conversion/GPUToNVVM/gpu-to-nvvm.mlir
+89-113 files

LLVM/project 11e60c6 — llvm/lib/Transforms/Scalar GVN.cpp, llvm/test/Transforms/GVN/PRE load-metadata.ll

fixup! [GVN] Preserve PRE load metadata as much as possible
DeltaFile
+12-17llvm/lib/Transforms/Scalar/GVN.cpp
+16-8llvm/test/Transforms/GVN/PRE/load-metadata.ll
+28-252 files

LLVM/project b7ce08e — llvm/lib/Target/Mips/AsmParser MipsAsmParser.cpp, llvm/test/MC/Mips macro-li.d.s macro-li-d-align.s

[Mips] Place the li.d constant label after the alignment (#245475)

The li.d macro emitted the label for its constant in .rodata before
aligning to 8 bytes. When .rodata was not 8-byte aligned at that point,
for example after a li.s, the label pointed at the padding, so li.d
loaded the wrong value, and the ldc1 address was misaligned.

Emit the alignment first, then the label.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+40-0llvm/test/MC/Mips/macro-li-d-align.s
+13-13llvm/test/MC/Mips/macro-li.d.s
+4-4llvm/test/MC/Mips/mips1/fp-load-store-macros.s
+2-2llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
+59-194 files

LLVM/project 6a6ae87 — llvm/lib/Target/Mips MipsAsmPrinter.cpp, llvm/test/CodeGen/Mips inlineasm-modifier-a.ll

[Mips] Print %a on a register operand as 0($reg) (#244994)

The generic AsmPrinter handles %a on a register by calling
PrintAsmMemoryOperand, but the Mips version expects a base register
followed by an offset immediate. For a plain register operand it read
the next INLINEASM operand as the offset, e.g. the flag of the $at
clobber, and printed 12($reg).

Print the register with a zero offset, as GCC does.

Fixes #243133.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+27-0llvm/test/CodeGen/Mips/inlineasm-modifier-a.ll
+6-0llvm/lib/Target/Mips/MipsAsmPrinter.cpp
+33-02 files

LLVM/project 9cff8cc — clang/include/clang/StaticAnalyzer/Core/PathSensitive ProgramState.h, clang/lib/StaticAnalyzer/Core RangeConstraintManager.cpp

[analyzer][NFC] Memoize inferred symbol ranges per ProgramState (#246900)

The inferred range of a symbol is a pure function of the ProgramState,
yet simplifying an SVal queries the range of every sub-expression again and
again against the same state. Memoize the ranges for the most recently queried
state in RangeConstraintManager (a DenseMap<SymbolRef, RangeSet> plus
the state it belongs to; it is cleared when a different state is queried).
SymbolicRangeInferrer takes the cache as an optional, nullable pointer;
the static inferRange() call sites pass none (a stack-local cache there
never got a lookup: 0 hits over 76406 instances on the corpus below).

Why this is safe: the cache holds a ProgramStateRef, so the state stays alive
and its address cannot be recycled for a different state while it is the
cache key. To make that hold at destruction time, ConstraintMgr is now
declared last in ProgramStateManager and is destroyed first, while the
state set, the allocator and the GDM contexts are still alive.

Measurements (base = origin/main 2e6a92abfd76, which is the parent of
this change up to an NFC; both binaries built with the same config).

    [19 lines not shown]
DeltaFile
+39-15clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp
+5-1clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h
+44-162 files

LLVM/project 27b48a9 — llvm/lib/Transforms/IPO AttributorAttributes.cpp, llvm/test/Transforms/Attributor indirect-call-single-callee-limit.ll

[Attributor] Honor specialization policy for single-callee promotion (#246185)

Consult the configured specialization callback before promoting an
indirect call with a single known callee. Previously, this path bypassed
the callback, allowing promotion even when the specialization limit was
zero.

Assisted by gpt-6.
DeltaFile
+30-0llvm/test/Transforms/OpenMP/indirect-call-single-callee-limit.ll
+27-0llvm/test/Transforms/Attributor/indirect-call-single-callee-limit.ll
+4-0llvm/lib/Transforms/IPO/AttributorAttributes.cpp
+61-03 files

LLVM/project 9085b39 — llvm/include/llvm/ProfileData SampleProf.h, llvm/lib/Transforms/IPO SampleProfile.cpp

[SampleProfile][MemProf] Let MemProf clones use their original's profile (#247268)

MemProfContextDisambiguation creates function clones (`F.memprof.N`) at
the start of the ThinLTO backend, before the post-link
SampleProfileLoader
runs. Previously, this caused profile mismatches in two ways:

1. Because `.memprof.` was not in
`FunctionSamples::getCanonicalFnName`'s
`KnownSuffixes` list, internal clones (which use the `selected` suffix
   elision policy), calls to clones, and code inlined from clones failed
   to match the original function's profile.
2. In `SampleProfileLoader::runOnModule`, inserting stripped names for
   both `F` and `F.memprof.N` into `SymbolMap` caused a collision that
   nullified the `SymbolMap` entry, causing the profiled-call-graph
   ordering to skip `F` and its clones and preventing indirect call
   promotion to `F`.

Add `.memprof.` to `KnownSuffixes` (ordered between `.cfi` and

    [6 lines not shown]
DeltaFile
+140-0llvm/test/Transforms/SampleProfile/memprof-clones.ll
+40-0llvm/lib/Transforms/IPO/SampleProfile.cpp
+21-0llvm/test/Transforms/SampleProfile/Inputs/memprof-clones.prof
+18-0llvm/unittests/ProfileData/SampleProfTest.cpp
+8-3llvm/include/llvm/ProfileData/SampleProf.h
+227-35 files

LLVM/project 9cd3353 — llvm/lib/Transforms/IPO MergeFunctions.cpp

update

Created using spr 1.3.7
DeltaFile
+3-1llvm/lib/Transforms/IPO/MergeFunctions.cpp
+3-11 files

LLVM/project 170c740 — llvm/lib/CodeGen SelectOptimize.cpp, llvm/test/CodeGen/AArch64 selectopt-not.ll

[SelectOpt] Reject i1 BinOp select-likes (#226539)

`collectSelectGroups` treats `add`/`sub`/`or` with an auxiliary of the
condition as select-like, assuming the auxiliary widens an `i1`. For `i1`
binary operators a `not` or identity shift can match instead, which
`getTrueOrFalseValue()` can't materialize ("Unexpected opcode" assert).
Reject all `i1` binary operators, not only `or`.

Fixes #226417
DeltaFile
+105-0llvm/test/CodeGen/AArch64/selectopt-not.ll
+6-1llvm/lib/CodeGen/SelectOptimize.cpp
+111-12 files

LLVM/project 502cf53 — llvm/tools/llvm-strings llvm-strings.cpp

Use .Cases rather than duplicating values
DeltaFile
+6-12llvm/tools/llvm-strings/llvm-strings.cpp
+6-121 files

LLVM/project cf6db3e — clang/lib/Format ContinuationIndenter.cpp, clang/unittests/Format FormatTest.cpp

[clang-format] Stop moving lambda to new line only to indent it more. (#141576)

Hanging indents are minimised for lambdas by pushing them onto a new
line. However, it could still do this even if it would cause even more
hanging indents than it otherwise would.

The handling has been expanded to check for this case and avoid moving
the lambda to a new line.

Fix #141575
DeltaFile
+26-4clang/lib/Format/ContinuationIndenter.cpp
+11-0clang/unittests/Format/FormatTest.cpp
+37-42 files

LLVM/project bd82a23 — llvm/test/CodeGen/AMDGPU soft-waitcnt-loop-header.mir

[AMDGPU] Update soft-waitcnt-loop-header.mir for the fix

Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+9-6llvm/test/CodeGen/AMDGPU/soft-waitcnt-loop-header.mir
+9-61 files

LLVM/project 1bc330c — llvm/test/CodeGen/AMDGPU srem.ll load-global-i8.ll, llvm/test/CodeGen/ARM constant-islands-convergence.mir

Merge branch users/reble/amdgpu-soft-waitcnt-mir-test into users/reble/amdgpu-soft-waitcnt-loop-header
DeltaFile
+4,445-4,498llvm/test/CodeGen/AMDGPU/memintrinsic-unroll.ll
+3,141-3,182llvm/test/CodeGen/RISCV/clmul.ll
+2,602-2,926llvm/test/CodeGen/X86/vector-compress.ll
+0-5,394llvm/test/CodeGen/AMDGPU/load-global-i8.ll
+0-5,274llvm/test/CodeGen/AMDGPU/srem.ll
+4,635-0llvm/test/CodeGen/ARM/constant-islands-convergence.mir
+14,823-21,2746,750 files not shown
+292,201-221,6926,756 files

LLVM/project 73e0612 — compiler-rt/lib/asan asan_rtl.cpp

[spr] update

Created using spr 2.0.0-beta.2
DeltaFile
+54-32compiler-rt/lib/asan/asan_rtl.cpp
+54-321 files

LLVM/project 5ba832e — compiler-rt/lib/asan asan_interceptors_memintrinsics.cpp asan_interceptors_memintrinsics.h

[spr] update

Created using spr 2.0.0-beta.2
DeltaFile
+0-20compiler-rt/lib/asan/asan_interceptors_memintrinsics.h
+20-0compiler-rt/lib/asan/asan_poisoning.h
+1-0compiler-rt/lib/asan/asan_interceptors_memintrinsics.cpp
+21-203 files