LLVM/project 8cdfc2d — clang/lib/StaticAnalyzer/Checkers/WebKit RawPtrRefLocalVarsChecker.cpp RawPtrRefCallArgsChecker.cpp

[WebKit checkers] Use different bug description for unborrowed local variables and call arguments (#232913)
DeltaFile
+2-2clang/lib/StaticAnalyzer/Checkers/WebKit/RawPtrRefLocalVarsChecker.cpp
+2-2clang/lib/StaticAnalyzer/Checkers/WebKit/RawPtrRefCallArgsChecker.cpp
+4-42 files

LLVM/project 5a2f2c1 — libc/src/__support/math exp2_accurate_128.h exp_utils.h, libc/test/src/math exp_test.cpp

[libc][math] Optimize exp and share double-precision evaluation with exp2.

Refactor double-precision exp to share most of the computations with exp2,
and adding support for `LIBC_MATH_HAS_SMALL_TABLES` and
`LIBC_MATH_HAS_SKIP_ACCURATE_PATH.

Assisted by: Gemini is used for performance and code size analysis and refactoring.
DeltaFile
+13-433libc/src/__support/math/exp.h
+155-91libc/test/src/math/exp_test.cpp
+153-0libc/src/__support/math/exp_double_eval.h
+83-44libc/test/src/math/smoke/exp_test.cpp
+72-17libc/src/__support/math/exp_utils.h
+50-13libc/src/__support/math/exp2_accurate_128.h
+526-5988 files not shown
+614-64714 files

LLVM/project 068c1af — clang/tools/driver cc1as_main.cpp

cc1as: Parse library options into a context. NFC (#233017)

Follow-up to #231407: move tools off cl::ParseCommandLineOptions, which
sets the libraries' `XXXOptions::Global`, to
`cl::parseCommandLineOptions(LibraryOptionsContext &, ...)`.

This prepares for removing the T::Global fallback in
`LibraryOptionsContext::get<T>()`.
DeltaFile
+16-8clang/tools/driver/cc1as_main.cpp
+16-81 files

LLVM/project 3b40709 — llvm/lib/Target/AMDGPU AMDGPUTargetMachine.cpp

[AMDGPU] Fix sramecc value in subtarget cache key (#232983)
DeltaFile
+1-1llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
+1-11 files

LLVM/project b6121a1 — llvm/tools/llvm-mc llvm-mc.cpp, llvm/tools/llvm-mca llvm-mca.cpp

Parse library options into a context. NFC (#233013)

Follow-up to #231407: move tools off cl::ParseCommandLineOptions, which
sets the libraries' `XXXOptions::Global`, to
`cl::parseCommandLineOptions(LibraryOptionsContext &, ...)`.

This prepares for removing the T::Global fallback in
`LibraryOptionsContext::get<T>()`.
DeltaFile
+6-3llvm/tools/llvm-mca/llvm-mca.cpp
+5-1llvm/tools/llvm-mc/llvm-mc.cpp
+3-1llvm/tools/llvm-split/llvm-split.cpp
+14-53 files

LLVM/project d792ae9 — llvm/tools/llc/lib llcdriver.cpp, llvm/tools/llvm-extract llvm-extract.cpp

Parse library options into a context in more tools. NFC

Follow-up to #231407: move tools off cl::ParseCommandLineOptions, which
sets the libraries' `XXXOptions::Global`, to
`cl::parseCommandLineOptions(LibraryOptionsContext &, ...)`.

This prepares for removing the T::Global fallback in
`LibraryOptionsContext::get<T>()`.
DeltaFile
+7-4llvm/tools/llvm-extract/llvm-extract.cpp
+6-3llvm/tools/llvm-profgen/llvm-profgen.cpp
+6-3llvm/tools/llvm-profgen/ProfiledBinary.cpp
+7-1llvm/tools/llvm-profgen/ProfiledBinary.h
+4-2llvm/tools/llc/lib/llcdriver.cpp
+30-135 files

LLVM/project 5d53453 — llvm/tools/llc/lib llcdriver.cpp, llvm/tools/llvm-extract llvm-extract.cpp

Parse library options into a context in more tools. NFC (#233016)

Follow-up to #231407: move tools off cl::ParseCommandLineOptions, which
sets the libraries' `XXXOptions::Global`, to
`cl::parseCommandLineOptions(LibraryOptionsContext &, ...)`.

This prepares for removing the T::Global fallback in
`LibraryOptionsContext::get<T>()`.
DeltaFile
+5-4llvm/tools/llvm-extract/llvm-extract.cpp
+6-3llvm/tools/llvm-profgen/llvm-profgen.cpp
+6-3llvm/tools/llvm-profgen/ProfiledBinary.cpp
+7-1llvm/tools/llvm-profgen/ProfiledBinary.h
+4-2llvm/tools/llc/lib/llcdriver.cpp
+28-135 files

LLVM/project fe3f16a — clang/docs/CIR/_raw PostProcessCIRDocs.py, llvm/lib/ObjectYAML BBAddrMapYAML.cpp

Merge branch 'main' into users/chinmaydd/amdgpu-sramecc-subtarget-key
DeltaFile
+146-307llvm/test/CodeGen/NVPTX/mulwide.ll
+30-138llvm/test/CodeGen/AMDGPU/hard-clauses-gfx1250.mir
+6-116llvm/tools/obj2yaml/elf2yaml.cpp
+121-0llvm/lib/ObjectYAML/BBAddrMapYAML.cpp
+54-53llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp
+72-19clang/docs/CIR/_raw/PostProcessCIRDocs.py
+429-633144 files not shown
+1,667-1,246150 files

LLVM/project 90a3063 — llvm/lib/Analysis ValueTracking.cpp, llvm/test/Transforms/InstCombine fpclass-from-dom-cond.ll

[ValueTracking] Require full nan/inf masks when propagating FMA class exclusions (#232675)

Fixes https://github.com/llvm/llvm-project/issues/232565, which is
introduced by https://github.com/llvm/llvm-project/pull/175999.
`KnownNotFromFlags & fcInf` is nonzero even when only one infinity class
is excluded. Require `(KnownNotFromFlags & fcInf) == fcInf` to exclude
both +inf and -inf. Same for nan.
DeltaFile
+26-0llvm/test/Transforms/InstCombine/fpclass-from-dom-cond.ll
+4-4llvm/lib/Analysis/ValueTracking.cpp
+30-42 files

LLVM/project 383ff59 — libc/src/__support/OSUtil/linux/syscall_wrappers CMakeLists.txt getcpu.h, libc/src/sched/linux CMakeLists.txt sched_getcpu.cpp

[libc] Use a syscall wrapper for sched_getcpu
DeltaFile
+38-0libc/src/__support/OSUtil/linux/syscall_wrappers/getcpu.h
+28-0utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+12-0libc/src/__support/OSUtil/linux/syscall_wrappers/CMakeLists.txt
+4-7libc/src/sched/linux/sched_getcpu.cpp
+4-1libc/src/sched/linux/CMakeLists.txt
+86-85 files

LLVM/project 55180e5 — .github/workflows libcxx-lnt-pipeline.yml libcxx-lnt-pipeline-libstdcxx.yml

[libc++] Properly pass the LNT submission token to the submit workflow (#233010)

Reusable worklows don't automatically get their environment secrets
passed, they need to declare them and their callers to pass them
explicitly.
DeltaFile
+4-0.github/workflows/libcxx-lnt-submit.yml
+2-0.github/workflows/libcxx-lnt-pipeline.yml
+2-0.github/workflows/libcxx-lnt-pipeline-libstdcxx.yml
+8-03 files

LLVM/project 5b79bc4 — llvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/lib/Transforms/Vectorize/SLPVectorizer SLPMemoryUtils.cpp

[SLP] Handle REVEC when costing expanded compress mask

With REVEC the scalars are vectors. The masked-load-compress shuffle that is
emitted uses the compress mask expanded to the elements of those vectors
(transformScalarShuffleIndiciesToVector), but the cost was computed with the
unexpanded per-vector mask, so a shuffle such as <24 x i8> -> <16 x i8> was
costed as a <2 x i8> shuffle. This made the compress sequence looked cheaper
than it is.

Assisted-By: Claude Sonnet 5.5
DeltaFile
+13-9llvm/test/Transforms/SLPVectorizer/RISCV/revec-compress-mask-cost.ll
+7-2llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+6-2llvm/lib/Transforms/Vectorize/SLPVectorizer/SLPMemoryUtils.cpp
+26-133 files

LLVM/project 58db2aa — mlir/lib/Transforms/Utils GreedyPatternRewriteDriver.cpp

[mlir] Check greedy rewrite fingerprints and changed flag (#232576)

Under EXPENSIVE_CHECKS, compare operation fingerprints before and after
greedy rewriting. If the IR changes but the driver reports no change,
emit a fatal error.

Assisted-by: gpt 6.1 sol
DeltaFile
+31-2mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp
+31-21 files

LLVM/project b58f8b4 — libc/src/__support/OSUtil/linux/syscall_wrappers CMakeLists.txt getcpu.h, libc/src/sched/linux CMakeLists.txt sched_getcpu.cpp

[libc] Use a syscall wrapper for sched_getcpu
DeltaFile
+37-0libc/src/__support/OSUtil/linux/syscall_wrappers/getcpu.h
+28-0utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+12-0libc/src/__support/OSUtil/linux/syscall_wrappers/CMakeLists.txt
+4-7libc/src/sched/linux/sched_getcpu.cpp
+4-1libc/src/sched/linux/CMakeLists.txt
+85-85 files

LLVM/project 7f658fb — llvm/lib/Transforms/InstCombine InstCombineAtomicRMW.cpp, llvm/test/Transforms/InstCombine atomicrmw-add-neg.ll

Support vector
DeltaFile
+4-3llvm/lib/Transforms/InstCombine/InstCombineAtomicRMW.cpp
+3-3llvm/test/Transforms/InstCombine/atomicrmw-add-neg.ll
+7-62 files

LLVM/project 075886b — clang/test/CodeGen ms-intrinsics-other.c ms-intrinsics.c

Fix clang lit test
DeltaFile
+12-12clang/test/CodeGen/ms-intrinsics.c
+4-4clang/test/CodeGen/ms-intrinsics-other.c
+16-162 files

LLVM/project 88487fb — llvm/lib/Transforms/InstCombine InstCombineAtomicRMW.cpp, llvm/test/Transforms/InstCombine atomicrmw-add-neg.ll

[InstCombine] Canonicalize atomicrmw sub of a constant to add

Rewrite `atomicrmw sub ptr, C` as `atomicrmw add ptr, -C`. This
matches the canonical form InstCombine already uses for plain `sub`.
In wrapping arithmetic $old - C = old + (-C)$, so both the stored
value and the returned old value stay the same, including when C is
`INT_MIN`. Ordering, syncscope and metadata are kept.

```llvm
; before
%old = atomicrmw sub ptr %p, i32 1 syncscope("agent") monotonic
; after
%old = atomicrmw add ptr %p, i32 -1 syncscope("agent") monotonic
```
This benefits AMDGPU, for example: https://godbolt.org/z/39xsYro3o
DeltaFile
+7-0llvm/lib/Transforms/InstCombine/InstCombineAtomicRMW.cpp
+2-2llvm/test/Transforms/InstCombine/atomicrmw-add-neg.ll
+9-22 files

LLVM/project a5df646 — llvm/test/Transforms/InstCombine atomicrmw-add-neg.ll

Add vector test
DeltaFile
+30-0llvm/test/Transforms/InstCombine/atomicrmw-add-neg.ll
+30-01 files

LLVM/project 08b8038 — clang/lib/CIR/Dialect/Transforms CXXABILowering.cpp, clang/test/CIR/Transforms cxx-abi-lowering-member-record.cir cxx-abi-lowering-same-type-cast-fold.cir

[CIR] Skip record rebuilds for unchanging types in CXXABI lowering (#232880)

CIRABITypeConverter only rewrites data-member and method types, but it
did not override typeMayChange, so every named record converted to a
renamed copy and every op touching one was illegal, forcing the generic
pattern to rebuild them all. Override it to report only those two types
as possibly changing, letting records that reach neither convert to
themselves and stay legal.

Small gains across the more expensive selfhosting TUs (no CIR output
changes):
- Registry 36.7->35.8,
- ASTImporterTest 64.4->63.7,
- SLPVectorizer 93.6->91.9,
- OpenMPDecomp 39.5->38.1, 
- SemaExpr 59.3->57.5.
DeltaFile
+45-0clang/test/CIR/Transforms/cxx-abi-lowering-same-type-cast-fold.cir
+28-0clang/lib/CIR/Dialect/Transforms/CXXABILowering.cpp
+26-0clang/test/CIR/Transforms/cxx-abi-lowering-member-record.cir
+99-03 files

LLVM/project 67f7c59 — flang/include/flang/Semantics openmp-utils.h, flang/lib/Lower/OpenMP OpenMP.cpp

[flang][OpenMP] Don't drop NOTHING with clauses in METADIRECTIVE

A METADIRECTIVE replacement of NOTHING was treated as having no
directive, even when it had clauses. A selected `nothing apply(...)` was
therefore lowered as a no-op, silently dropping the loop transformation.

Keep NOTHING as a replacement when it has clauses, and report it as not
yet implemented in lowering.

Assisted-by: GitHub Copilot (Claude Opus 5.5)
DeltaFile
+12-11flang/lib/Semantics/openmp-utils.cpp
+23-0flang/test/Lower/OpenMP/Todo/metadirective-nothing-apply.f90
+2-2flang/include/flang/Semantics/openmp-utils.h
+2-0flang/lib/Lower/OpenMP/OpenMP.cpp
+39-134 files

LLVM/project bf64404 — llvm/include/llvm/Target TargetMacroFusion.td, llvm/test/TableGen MacroFusion.td

[TableGen] Mark Macro Fusion Features as Inline Ignore (#232889)

Tuning features are conventionally inline ignore -- you tune the whole
function according to the caller rather than merging caller/callee
tuning features.

Macro Fusion features are a kind of tuning feature, and until now were
marked InlineDefault - with this change they should be ignored and
therefore not prevent inlining.

Assisted-by: AI (for Tests)
DeltaFile
+14-0llvm/test/TableGen/MacroFusion.td
+2-0llvm/include/llvm/Target/TargetMacroFusion.td
+16-02 files

LLVM/project cad1dc5 — llvm/test/Transforms/InstCombine atomicrmw-add-neg.ll

[InstCombine] Add tests for atomicrmw sub of a constant. NFC

atomicrmw sub C can be canonicalized to atomicrmw add -C because both
produce the same stored and returned values under wrapping arithmetic.
Cover syncscope, INT_MIN, and negative cases.
DeltaFile
+44-0llvm/test/Transforms/InstCombine/atomicrmw-add-neg.ll
+44-01 files

LLVM/project 7fbbf41 — utils/bazel/llvm-project-overlay/llvm/unittests BUILD.bazel

[Bazel] Fixes 372a4c3 (#233000)

This fixes 372a4c35991023298bbb35d3371f9010656fa176 (#232599).

Buildkite error link:
https://buildkite.com/llvm-project/upstream-bazel/builds?commit=372a4c35991023298bbb35d3371f9010656fa176

Co-authored-by: Google Bazel Bot <google-bazel-bot at google.com>
DeltaFile
+1-0utils/bazel/llvm-project-overlay/llvm/unittests/BUILD.bazel
+1-01 files

LLVM/project 8333e5e — llvm/lib/Target/LoongArch LoongArchLASXInstrInfo.td, llvm/test/CodeGen/LoongArch llvm.exp10.ll llvm.sincos.ll

[LoongArch] Extract FP vector element 0 as a subregister

Element 0 of an LSX/LASX floating-point vector is the aliased FPR, so
extractelement with index 0 needs no [x]vreplvei/xvpickve.
DeltaFile
+62-68llvm/test/CodeGen/LoongArch/llvm.sincos.ll
+35-39llvm/test/CodeGen/LoongArch/lsx/ir-instruction/flog2.ll
+34-36llvm/test/CodeGen/LoongArch/lsx/fpowi.ll
+6-6llvm/test/CodeGen/LoongArch/llvm.exp10.ll
+9-0llvm/lib/Target/LoongArch/LoongArchLASXInstrInfo.td
+2-5llvm/test/CodeGen/LoongArch/lsx/extract-fp-elt0.ll
+148-1545 files not shown
+157-16811 files

LLVM/project 749454c — llvm/test/CodeGen/LoongArch/lasx extract-fp-elt0.ll, llvm/test/CodeGen/LoongArch/lsx extract-fp-elt0.ll

[LoongArch][NFC] Pre-commit tests for extracting FP vector element 0
DeltaFile
+61-0llvm/test/CodeGen/LoongArch/lsx/extract-fp-elt0.ll
+61-0llvm/test/CodeGen/LoongArch/lasx/extract-fp-elt0.ll
+122-02 files

LLVM/project 97f7708 — flang/test/Driver bbc-openmp-target-context.f90, flang/tools/bbc bbc.cpp

[flang] Set the target in bbc's semantics context

bbc created a target machine but never passed its triple and features to
the semantics context. Without a target triple, semantics treats device
and implementation context selectors as possibly matching, so it
checked METADIRECTIVE replacements that can never be selected for the
target. For example, bbc reported a COLLAPSE error for the SIMD
replacement of when(device={arch(nvptx64)}: simd collapse(2)) on
x86-64, while flang accepts it.

Set the semantics target triple and features from the target machine, as
the flang driver does.

Assisted-by: GitHub Copilot (Claude Opus 5.5)
DeltaFile
+20-0flang/test/Driver/bbc-openmp-target-context.f90
+2-0flang/tools/bbc/bbc.cpp
+22-02 files

LLVM/project 372a4c3 — clang/lib/CodeGen BackendUtil.cpp, llvm/include/llvm/CGData CodeGenData.h

[Option] Make Passes, Scalar, Instrumentation, and CGData options per-context (#232599)

Follow-up to #232365: drop `perContext = false` from PassesOptions,
ScalarOptions, InstrumentationOptions, and CGDataOptions.

* IR passes read their LLVMContext's options in run(). Legacy passes
  that chose analyses from an option now always require them
  (ConstantHoisting, StructurizeCFG, GVN).
* Pass parameters that an option overrides are combined in run(), so
  -print-pipeline-passes no longer folds such options (e.g.
  -bonus-inst-threshold) into the printed parameters.
* PipelineTuningOptions carries the library options to PassBuilder,
  which falls back to the TargetMachine's. opt, clang, flang, and Polly
  pass their module's.
* The CodeGenData singleton is configured by its first caller's context.
  lld and llvm-cgdata pass an empty context, which reads the global
  values their -mllvm sets.

LLM-aided
DeltaFile
+54-53llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp
+38-44llvm/lib/Passes/StandardInstrumentations.cpp
+40-38llvm/lib/Transforms/Scalar/LICM.cpp
+28-42llvm/lib/Transforms/Scalar/GVN.cpp
+35-18llvm/include/llvm/CGData/CodeGenData.h
+29-19clang/lib/CodeGen/BackendUtil.cpp
+224-214108 files not shown
+899-613114 files

LLVM/project dc4ed10 — flang/lib/Lower/OpenMP OpenMP.cpp Utils.cpp, flang/test/Lower/OpenMP declare-variant-construct.f90 variant-source-context.f90

[flang][OpenMP] Match variant selectors in the source construct context

The construct context for METADIRECTIVE and DECLARE VARIANT came from
enclosing MLIR operations. It recognized only a few operations, followed
operation nesting instead of source nesting, kept constructs outside an
enclosing TARGET, and used the body context for clause expressions and
loop bounds.

Build the context from the evaluation's source ancestors and from frames
for construct regions entered during lowering:
- A selected METADIRECTIVE replacement stands in for its source construct.
- TARGET discards the outer context.
- Constructs without a selector property still add a nesting level.
- Clause expressions see only enclosing constructs.
- Loop bounds see the leaves that precede the first loop-associated leaf.
- Specification expressions see no construct.

Add llvm::omp::getConstructTraits, which returns the construct traits a
directive adds in source order, with an invalid placeholder for a

    [14 lines not shown]
DeltaFile
+580-0flang/test/Lower/OpenMP/declare-variant-loop-bounds.f90
+303-0flang/test/Lower/OpenMP/declare-variant-metadirective-context.f90
+211-0flang/test/Lower/OpenMP/variant-source-context.f90
+111-2flang/test/Lower/OpenMP/declare-variant-construct.f90
+86-22flang/lib/Lower/OpenMP/Utils.cpp
+71-18flang/lib/Lower/OpenMP/OpenMP.cpp
+1,362-4216 files not shown
+1,759-5622 files

LLVM/project 5a9da12 — clang-tools-extra/clangd/unittests FindTargetTests.cpp, clang/include/clang/AST RecursiveASTVisitor.h

[clang] Fix incorrect PackIndexingTypeLoc traversal in RecursiveASTVisitor (#231191)

Fixes [clangd/clangd#2713](https://github.com/clangd/clangd/issues/2713)

Assisted-by: Claude
DeltaFile
+20-0clang/unittests/AST/SourceLocationTest.cpp
+9-0clang-tools-extra/clangd/unittests/FindTargetTests.cpp
+1-1clang/include/clang/AST/RecursiveASTVisitor.h
+30-13 files

LLVM/project c9ab784 — clang/docs/CIR/_raw PostProcessCIRDocs.py, clang/include/clang/CIR/Dialect CMakeLists.txt

[CIR][Docs][www] Generate and publish the CIR dialect reference docs (#232912)

Wire up a consolidated CIR dialect reference page: the existing
-gen-dialect-doc output (operations, types, attributes, enums) plus a
passes section generated from Passes.td (-gen-pass-doc), merged ahead of
the other sections with an explicit index of the page sections.

The landing page grows a "CIR Dialect Reference" section right after
"Using ClangIR", showing an index into the reference page.

Also fix the doc tablegen include roots: the `MLIR_*_INCLUDE_DIR`
variables are still empty when Clang configures (MLIR configures later),
so derive the same roots from LLVM dirs instead; without this the
tablegen cannot find `mlir/*.td`.
DeltaFile
+72-19clang/docs/CIR/_raw/PostProcessCIRDocs.py
+7-1clang/include/clang/CIR/Dialect/CMakeLists.txt
+79-202 files