LLVM/project 83cc133 — lldb/unittests/Protocol MCPClientTest.cpp ProtocolMCPServerTest.cpp

[lldb] Fix ambiguous ProtocolDescriptor in the MCP unit tests under C++20 (#237270)

When building as C++20, lldb/Host/JSONTransport.h declares the concept
lldb_private::transport::ProtocolDescriptor. MCPClientTest.cpp and
ProtocolMCPServerTest.cpp have using-directives for both that namespace
and lldb_protocol::mcp, so an unqualified ProtocolDescriptor is
ambiguous between the concept and
lldb_protocol::mcp::ProtocolDescriptor, and the tests fail to compile.
Qualify the six uses, as ProtocolMCPServerTest.cpp already does
elsewhere. No change under C++17.

assisted with: claude
DeltaFile
+8-8lldb/unittests/Protocol/ProtocolMCPServerTest.cpp
+4-2lldb/unittests/Protocol/MCPClientTest.cpp
+12-102 files

LLVM/project 125ddbd — llvm/test/CodeGen/AMDGPU shrink-add-sub-constant.ll build-vector-packed-partial-undef.ll, llvm/test/CodeGen/AMDGPU/GlobalISel fshr.ll llvm.amdgcn.image.atomic.dim.a16.ll

[AMDGPU][GlobalISel] Look through copies when matching GCNPat patterns
DeltaFile
+280-1,577llvm/test/CodeGen/AMDGPU/fmul-to-ldexp.ll
+352-1,035llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.image.atomic.dim.a16.ll
+100-940llvm/test/CodeGen/AMDGPU/llvm.amdgcn.av.load.b128.ll
+158-417llvm/test/CodeGen/AMDGPU/build-vector-packed-partial-undef.ll
+199-368llvm/test/CodeGen/AMDGPU/shrink-add-sub-constant.ll
+195-268llvm/test/CodeGen/AMDGPU/GlobalISel/fshr.ll
+1,284-4,60570 files not shown
+2,842-7,51276 files

LLVM/project 0285809 — clang/include/clang/StaticAnalyzer/Core/PathSensitive SVals.h SymExpr.h, clang/lib/StaticAnalyzer/Core SymbolManager.cpp

[analyzer] Make symbol iteration cheaper (#244865)

SymExpr::symbols() returned an llvm::iterator_range, which stores both
iterators, and each iterator owned a SmallVector worklist, so every
range-for copied worklists. The iterator operations were also out of
line, and comparing against the end iterator compared whole worklists.

Return a symbol_range that owns the worklist instead, and make the
iterator a pointer to it. The range is neither copyable nor movable, and
begin() is lifetimebound, so -Wdangling catches iterators that outlive a
temporary range. The iterators are single-pass and only meant to be
compared against end(). Also make the iterator operations inline and
skip expand() for SymbolData, which has no operands.

On some LLVM TUs (GVN, LiveVariables, RegionStore, SemaExpr) this
reduces the instructions of the static analyzer by 3.9-5.1% and the
cycles by 2.8-4.4%. Peak memory is unchanged, and so are the analyzer
statistics and diagnostics.


    [5 lines not shown]
DeltaFile
+47-9clang/include/clang/StaticAnalyzer/Core/PathSensitive/SymExpr.h
+7-32clang/lib/StaticAnalyzer/Core/SymbolManager.cpp
+2-5clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h
+56-463 files

LLVM/project 82f48dd — clang/lib/StaticAnalyzer/Checkers RunLoopAutoreleaseLeakChecker.cpp ObjCAutoreleaseWriteChecker.cpp

[analyzer] Avoid rebuilding AST matchers for every function (#244843)

NumberObjectConversionChecker built its whole AST matcher tree,
including a regex for matchesName, for every analyzed function body. The
matcher does not depend on the function or on the Pedantic option, so
build it once when the checker is constructed.

ObjCAutoreleaseWriteChecker and RunLoopAutoreleaseLeakChecker built and
ran Objective-C only matchers (they require Objective-C object pointer
types, message sends or @autoreleasepool) on every function body, even
in non-Objective-C translation units. Skip them when the language is not
Objective-C.

On some LLVM TUs (GVN, LiveVariables, RegionStore, SemaExpr) this
reduces the instructions of the static analyzer by 0.9-5.1% and the
cycles by 1.0-4.6% on darwin, where these checkers are enabled by
default. Peak memory is unchanged. The diagnostics are unchanged.

Assisted-by: Claude Opus 5.5

    [3 lines not shown]
DeltaFile
+16-4clang/lib/StaticAnalyzer/Checkers/NumberObjectConversionChecker.cpp
+3-4clang/lib/StaticAnalyzer/Checkers/ObjCAutoreleaseWriteChecker.cpp
+3-3clang/lib/StaticAnalyzer/Checkers/RunLoopAutoreleaseLeakChecker.cpp
+22-113 files

LLVM/project ec8ff14 — llvm/lib/ObjCopy/MachO MachOObjcopy.cpp, llvm/test/tools/llvm-objcopy/MachO add-section-32.test add-section-64.test

[llvm-objcopy][MachO] Don't create a second LC_SEGMENT in object files (#238352)

In Mach-O object files (MH_OBJECT), all sections from all segments are
stored in a single LC_SEGMENT/LC_SEGMENT_64 load command. Each section
header stores its own segment name, which the linker uses to place the
section. The load command name is normally empty, but this change does
not depend on it.
Source: [Mach-O Runtime Architecture, page
57](https://math-atlas.sourceforge.net/devel/assembly/MachORuntime.pdf).

`--add-section __FOO,__bar` looked for a load command named `__FOO`, did
not find one and added a second LC_SEGMENT to the object file, which
Apple's ld-classic rejects with error: more than one LC_SEGMENT found in
object file. For object files, add the new section to the existing load
command and keep `__FOO` as the segment name in its section header.

Similar issue with --update-section #127604

Fixes #238320

    [3 lines not shown]
DeltaFile
+210-131llvm/test/tools/llvm-objcopy/MachO/add-multiple-sections.test
+228-57llvm/test/tools/llvm-objcopy/MachO/add-section-64.test
+144-59llvm/test/tools/llvm-objcopy/MachO/add-section-32.test
+8-2llvm/lib/ObjCopy/MachO/MachOObjcopy.cpp
+590-2494 files

LLVM/project 85d70a3 — llvm/lib/Transforms/InstCombine InstCombineCalls.cpp

[InstCombine] Document requirements for transformConstExprCastCall() (NFC) (#244146)

This documents the cases in transformConstExprCastCall() that we care
about in practice, so they don't get dropped. Based on discussion on:
https://github.com/llvm/llvm-project/pull/243506
DeltaFile
+15-3llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
+15-31 files

LLVM/project c66fb2b — llvm/docs LangRef.md, llvm/include/llvm/IR BundleAttributes.h

[spr] update

Created using spr 2.0.0-beta.2
DeltaFile
+31-2llvm/lib/IR/Verifier.cpp
+33-0llvm/test/Verifier/kcfi-operand-bundles.ll
+20-4llvm/docs/LangRef.md
+13-0llvm/include/llvm/IR/BundleAttributes.h
+4-0llvm/lib/CodeGen/GlobalISel/CallLowering.cpp
+3-0llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+104-66 files

LLVM/project 8d4ff78 — llvm/test/CodeGen/X86 callbr-asm-outputs-indirect-isel-m32.ll

Merge branch 'users/void/callbr-asm-outputs' into users/void/x86-flags-copy-inlineasm-br
DeltaFile
+1-1llvm/test/CodeGen/X86/callbr-asm-outputs-indirect-isel-m32.ll
+1-11 files

LLVM/project 01df546 — llvm/test/CodeGen/AMDGPU memintrinsic-unroll.ll, llvm/test/CodeGen/AMDGPU/GlobalISel legalize-udiv.mir legalize-sdiv.mir

Merge branch 'users/void/asm-goto-_Complext-types' into users/void/cir-complex-asm-operands
DeltaFile
+11-7,508mlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp
+2,788-2,771llvm/test/CodeGen/AMDGPU/memintrinsic-unroll.ll
+1,001-1,337llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-sdiv.mir
+1,157-1,157llvm/test/CodeGen/RISCV/GlobalISel/legalizer/legalize-icmp-rv64.mir
+977-1,313llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-udiv.mir
+2,192-0mlir/lib/Dialect/LLVMIR/IR/NVVMMmaOps.cpp
+8,126-14,0863,642 files not shown
+135,276-76,3013,648 files

LLVM/project 2b4b8e7 — llvm/test/CodeGen/X86 callbr-asm-outputs-indirect-isel-m32.ll

Merge branch 'users/void/callbr-asm-error' into users/void/aarch64-asm-wide-gpr
DeltaFile
+1-1llvm/test/CodeGen/X86/callbr-asm-outputs-indirect-isel-m32.ll
+1-11 files

LLVM/project 2f89ad6 — llvm/test/CodeGen/X86 callbr-asm-outputs-indirect-isel-m32.ll

Regenerate callbr tests for inline asm operand counts

Main now prints the operand count of an inline asm operand with more than
one register, such as "regdef:GR32_NOREX2 ops:2" (#235184).

Assisted-by: Claude Opus 5.5
DeltaFile
+1-1llvm/test/CodeGen/X86/callbr-asm-outputs-indirect-isel-m32.ll
+1-11 files

LLVM/project 9f0625d — llvm/test/CodeGen/X86 callbr-asm-outputs-indirect-isel-m32.ll

Merge branch 'users/void/x86-flags-copy-inlineasm-br' into users/void/callbr-flag-outputs
DeltaFile
+1-1llvm/test/CodeGen/X86/callbr-asm-outputs-indirect-isel-m32.ll
+1-11 files

LLVM/project 92f7403 — llvm/test/CodeGen/AMDGPU memintrinsic-unroll.ll, llvm/test/CodeGen/AMDGPU/GlobalISel legalize-udiv.mir legalize-sdiv.mir

Merge branch 'users/void/ppc-asm-wide-gpr' into users/void/asm-goto-_Complext-types
DeltaFile
+11-7,508mlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp
+2,788-2,771llvm/test/CodeGen/AMDGPU/memintrinsic-unroll.ll
+1,001-1,337llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-sdiv.mir
+1,157-1,157llvm/test/CodeGen/RISCV/GlobalISel/legalizer/legalize-icmp-rv64.mir
+977-1,313llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-udiv.mir
+2,192-0mlir/lib/Dialect/LLVMIR/IR/NVVMMmaOps.cpp
+8,126-14,0863,642 files not shown
+135,276-76,3013,648 files

LLVM/project e073082 — llvm/test/CodeGen/X86 callbr-asm-outputs-indirect-isel-m32.ll

Merge branch 'users/void/aarch64-asm-wide-gpr' into users/void/ppc-asm-wide-gpr
DeltaFile
+1-1llvm/test/CodeGen/X86/callbr-asm-outputs-indirect-isel-m32.ll
+1-11 files

LLVM/project 4582fd7 — llvm/test/CodeGen/PowerPC inline-asm-wide-gpr.ll

Regenerate PowerPC wide GPR tests for inline asm operand counts

Main now prints the operand count of an inline asm operand with more than
one register, such as "reguse:G8RC ops:2" (#235184).

Assisted-by: Claude Opus 5.5
DeltaFile
+11-11llvm/test/CodeGen/PowerPC/inline-asm-wide-gpr.ll
+11-111 files

LLVM/project 98c0218 — llvm/test/CodeGen/X86 callbr-asm-outputs-indirect-isel-m32.ll

Merge branch 'users/void/callbr-flag-outputs' into users/void/callbr-asm-error
DeltaFile
+1-1llvm/test/CodeGen/X86/callbr-asm-outputs-indirect-isel-m32.ll
+1-11 files

LLVM/project b0ea853 — compiler-rt/lib/rtsan rtsan_context.h rtsan_context.cpp, compiler-rt/lib/rtsan/tests rtsan_test_context.cpp

[rtsan] Align each thread's context to a cache line (#245043)

Threads write to their contexts when they

- Enter/leave nonblocking functions
- Enter/leave disabled scopes

I observed that

1. We do this a lot
2. The contexts were 8 bytes and could be allocated side by side

This made it possible to have issues with false sharing between threads,
since each thread writes to its own context. So like, if e.g.

- T1 writes its ctx => it takes the cache line away from the other
threads
- T2 writes its ctx => it needs to pull the line back


    [14 lines not shown]
DeltaFile
+4-2compiler-rt/lib/rtsan/rtsan_context.cpp
+6-0compiler-rt/lib/rtsan/tests/rtsan_test_context.cpp
+3-1compiler-rt/lib/rtsan/rtsan_context.h
+13-33 files

LLVM/project d7ba01b — llvm/lib/CodeGen CodeGenPrepare.cpp, llvm/test/Transforms/CodeGenPrepare/X86 select-group-cycle.ll

[CodeGenPrepare] Don't hang on select cycles in unreachable code

When optimizeSelectInst() turns a group of selects into a branch,
getTrueOrFalseValue() looks through the selects of the group that a
select uses. In unreachable code, the selects can use themselves or
each other in a cycle, and this loop never ends. llc removes
unreachable blocks before CodeGenPrepare, so a normal llc run does not
hang.

In reachable code, the loop visits each select at most once. Stop it
after as many steps as there are selects in the group.

Assisted-by: Claude Code (Claude Opus 5.5)
DeltaFile
+96-0llvm/test/Transforms/CodeGenPrepare/X86/select-group-cycle.ll
+8-2llvm/lib/CodeGen/CodeGenPrepare.cpp
+104-22 files

LLVM/project 745eb71 — flang/lib/Lower PFTBuilder.cpp, flang/test/Lower do_loop_unstructured.f90 do_concurrent.f90

[flang] Keep do concurrent structured when its branching stays in the body (#244176)

A DO loop whose raw branching is confined to its body keeps its
structured
form, with only the body folded into an scf.execute_region. Only
increment
loops qualified. A do concurrent header puts no control flow in the body
either: its indices are always integer and its mask is a test inside the
innermost loop. So a do concurrent qualifies under the same body checks.

This lets a do concurrent with, for example, a SELECT CASE in its body
lower
inside an OpenACC kernels region instead of hitting the "unstructured do
loop
in acc kernels" TODO.

The tests cover a do concurrent that keeps its structured form with a
SELECT
CASE in its body, a mask over two indices, a CYCLE, a locality

    [14 lines not shown]
DeltaFile
+214-0flang/test/Lower/do-concurrent-unstructured-internals.f90
+55-27flang/test/Lower/do_concurrent.f90
+82-0flang/test/Transforms/DoConcurrent/unstructured_body.mlir
+65-0flang/test/Lower/OpenACC/acc-directive-loop-bounds.f90
+24-18flang/lib/Lower/PFTBuilder.cpp
+10-11flang/test/Lower/do_loop_unstructured.f90
+450-561 files not shown
+456-587 files

LLVM/project 459e56a — clang/lib/CodeGen CGCall.cpp CodeGenFunction.h

[spr] update

Created using spr 2.0.0-beta.2
DeltaFile
+2-1clang/lib/CodeGen/CodeGenFunction.h
+2-1clang/lib/CodeGen/CodeGenFunction.cpp
+1-1clang/lib/CodeGen/CGCall.cpp
+5-33 files

LLVM/project 2fddd34 — llvm/lib/CodeGen MachineInstrBundle.cpp, llvm/test/CodeGen/AMDGPU finalizebundle.mir

[CodeGen] Fix finalizeBundle for a redefinition after a dead def

Since 58f3b0dd8d7b (#155448), finalizeBundle() sets the register units
of a physical register in LocalDefsP only for the first def of the
register in the bundle, and only if that def is not dead. When a
register is defined dead and then defined again, a later read in the
bundle is not marked internal, and the BUNDLE reads the register from
outside the bundle. With -verify-machineinstrs, this gives "Using an
undefined physical register", for example after IT block insertion on
Thumb2.

Set the units for every def that is not dead, as before #155448. This
runs the loop over the units again for each such def, not only for the
first one.

This is a regression in LLVM 22: llc 21.1.8 compiles the IR that the
Thumb2 test is reduced from without the error. I did not see wrong code
from it: only the internal flag of the read and the operands of the
BUNDLE are wrong.

    [2 lines not shown]
DeltaFile
+34-0llvm/test/CodeGen/Thumb2/it-block-dead-redef.mir
+6-6llvm/lib/CodeGen/MachineInstrBundle.cpp
+2-2llvm/test/CodeGen/AMDGPU/finalizebundle.mir
+42-83 files

LLVM/project cbc7f35 — llvm/lib/Transforms/Instrumentation SanitizerCoverage.cpp, llvm/test/Instrumentation/SanitizerCoverage missing_dbg.ll

[spr] update

Created using spr 2.0.0-beta.2
DeltaFile
+186-0llvm/test/Instrumentation/SanitizerCoverage/missing_dbg.ll
+22-33llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp
+208-332 files

LLVM/project 59b94f0 — llvm/test/Instrumentation/SanitizerCoverage missing_dbg.ll

[spr] update

Created using spr 2.0.0-beta.2
DeltaFile
+250-0llvm/test/Instrumentation/SanitizerCoverage/missing_dbg.ll
+250-01 files

LLVM/project eca8b2a — llvm/lib/IR AutoUpgrade.cpp, llvm/test/Assembler auto_upgrade_coro_end_result.ll

[LLVM][AutoUpgrade] Preserve operand bundles when upgrading coro.end (#245322)

When `UpgradeIntrinsicCall` upgrades `llvm.coro.end` or
`llvm.coro.end.async`, forward any operand bundles (such as WinEH `[
"funclet"(token %cp) ]`) from the original call to the newly created
call instead of dropping them.

Stack:
1. #245322 **(this PR)**
2. #245323
3. #245324
4. #245325
DeltaFile
+19-0llvm/test/Assembler/auto_upgrade_coro_end_result.ll
+3-1llvm/lib/IR/AutoUpgrade.cpp
+22-12 files

LLVM/project 676e970 — llvm/lib/Target/Mips MipsSEISelLowering.cpp, llvm/test/CodeGen/Mips mips1-sqrt.ll

[Mips] Use libcalls for sqrt on MIPS I (#244947)

MIPS I has no sqrt.s and sqrt.d, but FSQRT and STRICT_FSQRT were left
legal, so llvm.sqrt and the constrained sqrt failed to select. Expand
them on MIPS I so they become calls to sqrtf and sqrt.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+99-0llvm/test/CodeGen/Mips/mips1-sqrt.ll
+8-0llvm/lib/Target/Mips/MipsSEISelLowering.cpp
+107-02 files

LLVM/project 41c611b — clang/lib/CodeGen MicrosoftCXXABI.cpp ItaniumCXXABI.cpp

[spr] update

Created using spr 2.0.0-beta.2
DeltaFile
+2-2clang/lib/CodeGen/ItaniumCXXABI.cpp
+2-1clang/lib/CodeGen/MicrosoftCXXABI.cpp
+4-32 files

LLVM/project d7518c5 — clang/test/CodeGen backend-unsupported-error.ll, clang/test/CodeGenOpenCL builtins-r600.cl

[AMDGPU] Remove R600 usage from clang, flang and lld tests. NFC

Test cleanup plan for removing the R600 (TeraScale) backend:
* [x] clang, flang, lld tests (this patch)
* [ ] llvm tests

Tests that only cover R600 are deleted. In tests shared with other
targets, the r600 RUN lines and their now unused checks are removed.
annotations-global.c tests annotations on globals in a non zero address
space, so it is retargeted to amdgpu, which also uses `G1`:

```
// RUN: %clang_cc1 %s -triple r600 -emit-llvm -o - | FileCheck %s --check-prefix AS1-GLOBALS
// AS1-GLOBALS: target datalayout = "{{.+}}-A5-G1"
  -->
// RUN: %clang_cc1 %s -triple amdgpu -emit-llvm -o - | FileCheck %s --check-prefix AS1-GLOBALS
// AS1-GLOBALS: target datalayout = "{{.+}}-A5-G1{{.*}}"
```


    [5 lines not shown]
DeltaFile
+0-153clang/test/Misc/r600.languageOptsOpenCL.cl
+0-61clang/test/Driver/amdgpu-macros.cl
+0-57clang/test/SemaCUDA/amdgpu-bf16.cu
+0-57clang/test/CodeGenOpenCL/builtins-r600.cl
+0-48clang/test/Driver/amdgpu-mcpu.cl
+0-44clang/test/CodeGen/backend-unsupported-error.ll
+0-42019 files not shown
+7-56625 files

LLVM/project b90f228 — clang/lib/CodeGen MicrosoftCXXABI.cpp ItaniumCXXABI.cpp, clang/test/CodeGenCXX target-features-error.cpp

[spr] update

Created using spr 2.0.0-beta.2
DeltaFile
+2-1clang/lib/CodeGen/ItaniumCXXABI.cpp
+1-1clang/lib/CodeGen/MicrosoftCXXABI.cpp
+1-0clang/test/CodeGenCXX/target-features-error.cpp
+4-23 files

LLVM/project 43a9f73 — clang/test/CodeGenCXX target-features-error.cpp

[spr] update

Created using spr 2.0.0-beta.2
DeltaFile
+13-0clang/test/CodeGenCXX/target-features-error.cpp
+13-01 files

LLVM/project 6db20c2 — clang/lib/CodeGen CodeGenFunction.h CGExprCXX.cpp

[spr] update

Created using spr 2.0.0-beta.2
DeltaFile
+8-7clang/lib/CodeGen/MicrosoftCXXABI.cpp
+5-4clang/lib/CodeGen/ItaniumCXXABI.cpp
+4-4clang/lib/CodeGen/CGExprCXX.cpp
+1-0clang/lib/CodeGen/CodeGenFunction.h
+18-154 files