LLVM/project 84d75c8 — llvm/lib/TargetParser AArch64TargetParser.cpp

[AArch64] Make compiling arm_neon.h faster (#226378)

Replace two linear scans with map lookups.

On my system, reduces time to compile a TU that does nothing but
`#include <arm_neon.h>` from 92.0 ms ± 1.4 ms to 70.9 ms ± 1.3 ms.

No behavior change.
DeltaFile
+20-8llvm/lib/TargetParser/AArch64TargetParser.cpp
+20-81 files

LLVM/project 1ae3b71 — llvm/lib/Target/LoongArch LoongArchAsmPrinter.h LoongArchAsmPrinter.cpp, llvm/test/CodeGen/LoongArch module-target-abi.ll

LoongArch: Respect the target-abi module flag in the ELF header

The target streamer read the ABI from MCTargetOptions when constructed,
so the e_flags recorded the command line -target-abi and ignored the
module flag.

Co-Authored-By: Claude Opus 5 <noreply at anthropic.com>
DeltaFile
+13-0llvm/test/CodeGen/LoongArch/module-target-abi.ll
+10-0llvm/lib/Target/LoongArch/LoongArchAsmPrinter.cpp
+2-0llvm/lib/Target/LoongArch/LoongArchAsmPrinter.h
+25-03 files

LLVM/project 09f6270 — llvm/lib/Target/LoongArch/MCTargetDesc LoongArchMCTargetDesc.cpp, llvm/test/CodeGen/LoongArch null-streamer.ll

LoongArch: Register a null target streamer

Emitting a TLS variable's debug location calls into the target streamer,
which was only registered for asm and object output. -filetype=null
therefore null dereferenced.

Co-Authored-By: Claude Opus 5 <noreply at anthropic.com>
DeltaFile
+20-0llvm/test/CodeGen/LoongArch/null-streamer.ll
+6-0llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchMCTargetDesc.cpp
+26-02 files

LLVM/project 83589c8 —

Fix Bazel build for 0a0e0fa (#226489)

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

Co-authored-by: Google Bazel Bot <google-bazel-bot at google.com>
DeltaFile
+0-00 files

LLVM/project 637d0af — llvm/lib/MC GOFFObjectWriter.cpp, llvm/test/CodeGen/SystemZ zos-symbol-2.ll zos-section-2.ll

[SystemZ][z/OS] Use section ordinal for temporary symbols

A relocation involving a temporary symbol is interpreted as offset
of the symbol to the section begin. Currently, this is resolved via
the begin symbol of the section. However, that symbol may also have
the temporary flag set, and therefore has an index of 0. Since a
symbol is emitted of reach section, it is safe to use the ordinal
of the section instead, avoiding all issues with temporary symbols.
DeltaFile
+1-3llvm/lib/MC/GOFFObjectWriter.cpp
+2-2llvm/test/CodeGen/SystemZ/zos-symbol-2.ll
+2-2llvm/test/CodeGen/SystemZ/zos-section-2.ll
+2-2llvm/test/CodeGen/SystemZ/zos-section-1.ll
+7-94 files

LLVM/project c5949de — clang/lib/CIR/CodeGen CIRGenExprCXX.cpp, clang/test/CIR/CodeGen new-delete.cpp new-delete-deactivation.cpp

[CIR] Match OGCG noalias and memory effects on operator new

Sane replaceable operator new calls get return noalias, and new-expressions
also get memory(inaccessiblemem: readwrite, errnomem: write), matching classic
codegen. -fno-assume-sane-operator-new drops both.

Co-authored-by: Cursor <cursoragent at cursor.com>
DeltaFile
+44-44clang/test/CIR/CodeGen/new.cpp
+19-19clang/test/CIR/CodeGenCXX/new-array-init.cpp
+24-0clang/test/CIR/CodeGen/operator-new-noalias.cpp
+11-11clang/test/CIR/CodeGen/new-delete-deactivation.cpp
+15-4clang/lib/CIR/CodeGen/CIRGenExprCXX.cpp
+8-8clang/test/CIR/CodeGen/new-delete.cpp
+121-865 files not shown
+142-9911 files

LLVM/project fe3587c — llvm/test/Transforms/CodeGenPrepare/AArch64 strength-reduce-vector-as-data.ll

update new IR test
DeltaFile
+14-3llvm/test/Transforms/CodeGenPrepare/AArch64/strength-reduce-vector-as-data.ll
+14-31 files

LLVM/project 8de4cb4 — orc-rt/test/unit/support move_only_function-test.cpp

[orc-rt] Tighten move_only_function ShouldCopyInitialize test. (#226483)

ShouldCopyInitialize only checked that constructing a move_only_function
from an lvalue didn't move the callable, so it passed when the callable
was held by reference and never copied at all.

This commit replaces the moved flag with copy and move counters, and
checks that construction performs exactly one copy and no moves.
DeltaFile
+17-8orc-rt/test/unit/support/move_only_function-test.cpp
+17-81 files

LLVM/project 35a519d —

[fixup] Empty commit in an attempt to unstuck CI
DeltaFile
+0-00 files

LLVM/project 176a246 — clang/docs SourceBasedCodeCoverage.md, compiler-rt/include/profile instr_prof_interface.h

[docs][clang] Document additional public profile runtime APIs (#224424)

Android's code coverage runtime started using these functions recently,
and I noticed they were undocumented (and the reviewer highlighted
that `instr_prof_interface.h` exists).

So this commit:
- Moves their declarations to that header
- Updates `SourceBasedCodeCoverage.md` to highlight that header
- Adds quips to said `.md` file for these functions

An LLM was used to take a first pass at this; I reviewed and refined.
DeltaFile
+70-0compiler-rt/include/profile/instr_prof_interface.h
+40-25clang/docs/SourceBasedCodeCoverage.md
+0-61compiler-rt/lib/profile/InstrProfiling.h
+36-0compiler-rt/test/profile/instrprof-api.c
+146-864 files

LLVM/project 0fbcf66 — llvm/lib/CodeGen CodeGenPrepare.cpp, llvm/test/CodeGen/AArch64 strength-reduce-vector-as-data.ll

Implement single gep case
DeltaFile
+145-0llvm/lib/CodeGen/CodeGenPrepare.cpp
+7-9llvm/test/CodeGen/AArch64/strength-reduce-vector-as-data.ll
+152-92 files

LLVM/project 7be97a9 — llvm/lib/Target/ARM ARMTargetObjectFile.h ARMTargetMachine.cpp, llvm/test/CodeGen/ARM module-target-abi.ll

ARM: Remove cached TargetABI from ARMBaseTargetMachine

This cannot account for the "target-abi" module flag, so
let the uses query that. ARMElfTargetObjectFile was the one user of
this value, so this failed to respect the module flag.

Co-Authored-By: Claude Opus 5 <noreply at anthropic.com>
DeltaFile
+13-7llvm/lib/Target/ARM/ARMTargetObjectFile.cpp
+0-18llvm/lib/Target/ARM/ARMTargetMachine.h
+12-1llvm/test/CodeGen/ARM/module-target-abi.ll
+2-3llvm/lib/Target/ARM/ARMTargetMachine.cpp
+2-0llvm/lib/Target/ARM/ARMTargetObjectFile.h
+29-295 files

LLVM/project 9b9feab — flang/lib/Semantics check-omp-variant.cpp check-omp-structure.cpp

[flang][OpenMP] Rename some symbols in check-omp-syntax.cpp

Some function names did not conform to the naming convention.
Include a couple of other non-significant changes.
DeltaFile
+36-26flang/lib/Semantics/check-omp-syntax.cpp
+2-2flang/lib/Semantics/check-omp-structure.h
+1-1flang/lib/Semantics/check-omp-variant.cpp
+1-1flang/lib/Semantics/check-omp-structure.cpp
+40-304 files

LLVM/project eae3e9e — orc-rt/include/orc-rt/support move_only_function.h, orc-rt/test/unit/support move_only_function-test.cpp

[orc-rt] Fix move_only_function storing references to lvalue callables. (#226474)

move_only_function's converting constructor instantiated CallableImpl
with the deduced forwarding-reference type, so constructing from an
lvalue callable stored a reference to it rather than a copy, leaving the
move_only_function dangling once the original went out of scope.

This commit decays the callable type before instantiating CallableImpl,
and adds a static_assert to CallableImpl to enforce that it's only
instantiated with decayed types.
DeltaFile
+20-0orc-rt/test/unit/support/move_only_function-test.cpp
+7-1orc-rt/include/orc-rt/support/move_only_function.h
+27-12 files

LLVM/project b60afea — llvm/lib/Transforms/Utils SimplifyCFG.cpp, llvm/test/Transforms/SimplifyCFG fold-branch-to-common-dest-call-debugloc.ll

[SimplifyCFG] Keep a debug location on calls cloned by `FoldBranchToCommonDest` (#224247)

Fixes #220848

When folding a branch to a common destination, SimplifyCFG clones the
bonus instructions into the predecessor and resets their debug
locations, so the debugger doesn't step onto code from a branch that
wasn't taken. It did that with `setDebugLoc(DebugLoc::getDropped())` for
every instruction. That's fine for an `icmp`, but with
`-bonus-inst-threshold=2` a `speculatable` call can be a bonus
instruction too, and an inlinable call in a function with debug info
must have a `!dbg` location, otherwise the inliner can't set up the
inlined-at scope. The verifier rejects the module with "inlinable
function call in a function with debug info must have a !dbg location".

The clone now uses `Instruction::dropLocation()`, which is what
`speculativelyExecuteBB` in the same file already does. Non-call
instructions still lose their location as before, while calls get a line
0 location in the function's scope, so nothing misleading shows up when

    [4 lines not shown]
DeltaFile
+91-0llvm/test/Transforms/SimplifyCFG/fold-branch-to-common-dest-call-debugloc.ll
+2-2llvm/lib/Transforms/Utils/SimplifyCFG.cpp
+93-22 files

LLVM/project 0c07796 — llvm/unittests/IR PatternMatch.cpp

Add gtest coverage, matching the existing m_Shuffle cases
DeltaFile
+11-0llvm/unittests/IR/PatternMatch.cpp
+11-01 files

LLVM/project a509a4e — clang/docs LifetimeSafety.md, clang/include/clang/Options Options.td

[LifetimeSafety] Enable C support by default under -Wlifetime-safety (#224028)

This PR extends the lifetime safety analysis to C. When the analysis is
enabled with `-Wlifetime-safety`, it now also runs on C code without the
extra `-fexperimental-lifetime-safety-c` flag.

I have renamed `-fexperimental-lifetime-safety-c` to
`-flifetime-safety-c` since it is on by default from now on. The
`-fno-lifetime-safety-c` flag disables the analysis for C. I have
updated the documentation and the release notes and rewrote the RUN
lines of the test cases that used the old flag.
DeltaFile
+22-2clang/docs/LifetimeSafety.md
+5-6clang/include/clang/Options/Options.td
+5-5clang/test/Sema/LifetimeSafety/annotation-suggestions-fixits.c
+7-0clang/test/Driver/flifetime-safety-c.c
+2-2clang/test/Sema/LifetimeSafety/safety-c.c
+3-0clang/lib/Driver/ToolChains/Clang.cpp
+44-152 files not shown
+48-168 files

LLVM/project f05fce6 — llvm/lib/Target/AMDGPU AMDGPUInstCombineIntrinsic.cpp, llvm/test/Transforms/InstCombine/AMDGPU llvm.amdgcn.sudot.ll

[AMDGPU] Fold sudot intrinsics with a zero multiplicand

Replace sudot4 and sudot8 with their accumulator when either
multiplicand is zero.

For example:
```
  sudot4(sign0, x, sign1, 0, acc, clamp)
  ->
  acc
```
DeltaFile
+2-4llvm/test/Transforms/InstCombine/AMDGPU/llvm.amdgcn.sudot.ll
+3-0llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp
+5-42 files

LLVM/project b6ad737 — llvm/lib/Target/AMDGPU AMDGPUInstCombineIntrinsic.cpp, llvm/test/Transforms/InstCombine/AMDGPU llvm.amdgcn.sudot.ll

[AMDGPU] Canonicalize constant operands of sudot intrinsics

Move a constant multiplicand and its sign flag to the second operand.

For example:
```
  sudot4(true, 1, false, x, acc, clamp)
  ->
  sudot4(false, x, true, 1, acc, clamp)
```
DeltaFile
+15-0llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp
+4-4llvm/test/Transforms/InstCombine/AMDGPU/llvm.amdgcn.sudot.ll
+19-42 files

LLVM/project dcdeeeb — llvm/lib/CodeGen/SelectionDAG TargetLowering.cpp, llvm/test/CodeGen/LoongArch pr177863.ll

[DAG] SimplifySetCC - adjust setcc result type when peeking through truncates (#226422)

For the "(setcc (trunc x) (trunc y)) -> (setcc x y)" fold with non vXi1
cmp result type, make sure we adjust the type and then trunc/extend it
correctly using BooleanContent.

Fixes #226365
DeltaFile
+53-0llvm/test/CodeGen/X86/vec_setcc-3.ll
+12-1llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+4-2llvm/test/CodeGen/LoongArch/pr177863.ll
+69-33 files

LLVM/project 61df57b — mlir/include/mlir/Transforms GreedyPatternRewriteDriver.h, mlir/lib/Transforms/Utils GreedyPatternRewriteDriver.cpp

[mlir] Avoid rewriting unreachable blocks in the greedy driver

A rewrite can disconnect a block after the iteration's initial CFG sweep.
Track reachability through rewriter notifications and skip worklist
operations in unreachable blocks until the next iteration removes them.

Cache reachability per region and compare final successors after each
rewrite. Preserve the cache for successor-equivalent changes, added edges,
and block merges that keep surviving blocks reachable. Recompute for other
CFG changes, including entry changes and cross-region block moves.

Keep cache updates separate from reachability queries, returning failure
when a full traversal is required. Collect each successor set once for
validation and retain compact vector snapshots in the cache. Entry-block
queries return before cache lookup or CFG traversal.

Cover inserted and redirected blocks, blocks connected before rewrite
completion, nested regions, block moves and merges, and explicit op lists.
Use observer diagnostics to check whether affected operations are processed

    [17 lines not shown]
DeltaFile
+180-1mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp
+133-0mlir/test/Transforms/greedy-cfg-reachability.mlir
+75-4mlir/test/lib/Dialect/Test/TestPatterns.cpp
+51-5mlir/test/Transforms/test-strict-pattern-driver.mlir
+41-0mlir/test/Transforms/canonicalize-dce.mlir
+9-3mlir/include/mlir/Transforms/GreedyPatternRewriteDriver.h
+489-136 files

LLVM/project ffd851a — flang/lib/Semantics check-omp-loop.cpp, flang/test/Semantics/OpenMP ordered03.f90 linear-clause03.f90

[flang][OpenMP] Improve checks of ORDERED clause

Make the checks version-sensitive.

This adds some diagnostics that effectively replace existing ones.
The old ones will be removed in a later PR, for the time being both
will be shown.
DeltaFile
+39-6flang/lib/Semantics/check-omp-loop.cpp
+3-1flang/test/Semantics/OpenMP/clause-validity01.f90
+1-0flang/test/Semantics/OpenMP/ordered03.f90
+1-0flang/test/Semantics/OpenMP/linear-clause03.f90
+44-74 files

LLVM/project d69a262 — mlir/include/mlir/Transforms GreedyPatternRewriteDriver.h, mlir/lib/Transforms/Utils GreedyPatternRewriteDriver.cpp

[mlir] Avoid rewriting unreachable blocks in the greedy driver

A rewrite can disconnect a block after the iteration's initial CFG sweep.
Track reachability through rewriter notifications and skip worklist
operations in unreachable blocks until the next iteration removes them.

Cache reachability per region and compare final successors after each
rewrite. Preserve the cache for successor-equivalent changes, added edges,
and block merges that keep surviving blocks reachable. Recompute for other
CFG changes, including entry changes and cross-region block moves.

Keep cache updates separate from reachability queries, returning failure
when a full traversal is required. Collect each successor set once for
validation and retain compact vector snapshots in the cache. Single-block
regions return before cache lookup or CFG traversal.

Cover inserted and redirected blocks, blocks connected before rewrite
completion, nested regions, block moves and merges, and explicit op lists.
Use observer diagnostics to check whether affected operations are processed

    [16 lines not shown]
DeltaFile
+177-1mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp
+116-0mlir/test/Transforms/greedy-cfg-reachability.mlir
+68-1mlir/test/lib/Dialect/Test/TestPatterns.cpp
+41-0mlir/test/Transforms/canonicalize-dce.mlir
+18-2mlir/test/Transforms/test-strict-pattern-driver.mlir
+9-3mlir/include/mlir/Transforms/GreedyPatternRewriteDriver.h
+429-76 files

LLVM/project df26d54 — llvm/include/llvm/CodeGen TargetLowering.h, llvm/lib/CodeGen/SelectionDAG TargetLowering.cpp

ARM: Use divmod type signatures from RuntimeLibcallsInfo (#217869)

Start moving towards an API to emit calls from RuntimeLibcallsInfo's
knowledge about the type signature of a function instead of manually
computing an IR type from the EVT of the operation.

Also change the swap of arguments to be based on the libcall impl,
rather than the ABI since it's logically a property of the function
itself.

Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
DeltaFile
+85-27llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+38-41llvm/lib/Target/ARM/ARMISelLowering.cpp
+8-0llvm/include/llvm/CodeGen/TargetLowering.h
+131-683 files

LLVM/project 597ae7a — llvm/test/Analysis/CostModel/AArch64 sve-arith-overflow.ll sve-arith.ll

Use poison instead of undef
DeltaFile
+100-100llvm/test/Analysis/CostModel/AArch64/sve-arith.ll
+60-60llvm/test/Analysis/CostModel/AArch64/sve-arith-overflow.ll
+160-1602 files

LLVM/project f1c5f1e — orc-rt/include/orc-rt/bedrock BootstrapInfo.h, orc-rt/lib/bedrock BootstrapInfo.cpp

[orc-rt] Make BootstrapInfo construction noexcept. (#226459)

These methods should never throw.
DeltaFile
+2-2orc-rt/lib/bedrock/BootstrapInfo.cpp
+2-2orc-rt/include/orc-rt/bedrock/BootstrapInfo.h
+4-42 files

LLVM/project f2f2085 — llvm/include/llvm/IR PatternMatch.h, llvm/lib/Transforms/InstCombine InstructionCombining.cpp

PatternMatch splats from an all-zeroes shufflevector
DeltaFile
+20-5llvm/include/llvm/IR/PatternMatch.h
+1-1llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
+21-62 files

LLVM/project 1566559 — mlir/include/mlir/Transforms GreedyPatternRewriteDriver.h, mlir/lib/Transforms/Utils GreedyPatternRewriteDriver.cpp

[mlir] Avoid rewriting unreachable blocks in the greedy driver

A rewrite can disconnect a block after the iteration's initial CFG sweep.
Track reachability through rewriter notifications and skip worklist
operations in unreachable blocks until the next iteration removes them.

Cache reachability per region. Compare the final successors of changed
blocks after each rewrite, preserving the cache for successor-equivalent
changes and block merges that keep surviving blocks reachable. Recompute for
other CFG changes. This avoids repeated full CFG scans during branch
canonicalization.

Single-block regions return before cache lookup or CFG traversal. Before the
cache bookkeeping simplification, in the same Release build, canonicalizing
32,000 sibling single-block regions took 22.8 ms versus 21.9 ms with the
parent driver. With 16,000 regions containing folds, the times were 35.7 ms
and 34.3 ms, respectively. Nesting to 256 levels showed no measurable
difference.


    [23 lines not shown]
DeltaFile
+183-1mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp
+116-0mlir/test/Transforms/greedy-cfg-reachability.mlir
+76-1mlir/test/lib/Dialect/Test/TestPatterns.cpp
+41-0mlir/test/Transforms/canonicalize-dce.mlir
+18-2mlir/test/Transforms/test-strict-pattern-driver.mlir
+6-0mlir/include/mlir/Transforms/GreedyPatternRewriteDriver.h
+440-46 files

LLVM/project 8493b9c — llvm/test/Transforms/CodeGenPrepare/AArch64 strength-reduce-vector-as-data.ll

Copy tests to CGP IR test directory
DeltaFile
+356-0llvm/test/Transforms/CodeGenPrepare/AArch64/strength-reduce-vector-as-data.ll
+356-01 files

LLVM/project 108c55a — flang/lib/Semantics check-omp-structure.cpp, flang/test/Semantics/OpenMP flush03.f90 clause-validity01.f90

[flang][OpenMP] Improve clause checks on FLUSH construct

Make the checks version-sensitive.
DeltaFile
+48-6flang/lib/Semantics/check-omp-structure.cpp
+7-6flang/test/Semantics/OpenMP/flush02.f90
+2-1flang/test/Semantics/OpenMP/clause-validity01.f90
+1-0flang/test/Semantics/OpenMP/flush03.f90
+58-134 files