LLVM/project 9f65a28 — llvm/include/llvm/CodeGen/GlobalISel CombinerHelper.h, llvm/include/llvm/Target/GlobalISel Combine.td

[GlobalISel][AArch64] Fold vector multiplication by 0/1 masks into AND (#240134)

Multiplying a vector by a constant whose elements are all 0 or 1 only
keeps or clears lanes, so it can be done with an AND mask, as
SelectionDAG does. This adds a generic combine,
`mul_by_zero_one_vector`: `(mul x, <0/1...>) -> (and x, <0/-1...>)`, for
either operand order. All-zero and all-one vectors are left to the
existing combines.

```
define <2 x i32> @test(<2 x i32> %a) {
  %r = mul <2 x i32> <i32 1, i32 0>, %a
  ret <2 x i32> %r
}
```

Before:
```
adrp x8, .LCPI1_0

    [7 lines not shown]
DeltaFile
+198-0llvm/test/CodeGen/AArch64/GlobalISel/postlegalizercombiner-mul-identity.mir
+41-0llvm/test/CodeGen/AArch64/GlobalISel/combine-mul-one-zero-vector.ll
+18-15llvm/test/CodeGen/AArch64/combine-sdiv.ll
+10-0llvm/include/llvm/Target/GlobalISel/Combine.td
+9-0llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
+4-0llvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h
+280-151 files not shown
+281-157 files

LLVM/project 4070e41 — mlir/test/Dialect/SPIRV/Transforms vce-deduction.mlir, mlir/tools/mlir-tblgen SPIRVUtilsGen.cpp

[mlir][SPIR-V] Collect availability of optional enum attributes (#240532)

The availability generator skipped OptionalAttr enums, so update-vce
gave ImageRead with Nontemporal v1.0 instead of v1.6
DeltaFile
+20-10mlir/tools/mlir-tblgen/SPIRVUtilsGen.cpp
+13-0mlir/test/Dialect/SPIRV/Transforms/vce-deduction.mlir
+33-102 files

LLVM/project c4e4af6 — llvm/lib/Analysis BasicAliasAnalysis.cpp, llvm/test/Analysis/BasicAA linear-expr-offset-overflow.ll

[BasicAA] Drop nsw when folding an overflowing constant offset (#242541)

Folding the constants in a chain of `nsw` adds or subtracts can overflow
even when the operations themselves are defined. Keeping `nsw` on the
resulting linear expression lets BasicAA return `NoAlias` for overlapping
accesses. Check the folded offset for signed overflow and drop `nsw` if
it wraps.

Split from #241380.

Proofs: https://alive2.llvm.org/ce/z/nq85ze

Assisted-by: Claude Code
Assisted-by: OpenAI Codex
DeltaFile
+54-0llvm/test/Analysis/BasicAA/linear-expr-offset-overflow.ll
+7-4llvm/lib/Analysis/BasicAliasAnalysis.cpp
+61-42 files

LLVM/project 59202a6 — clang/lib/CIR/Dialect/Transforms FlattenCFG.cpp, clang/test/CIR/Transforms flatten-cleanup-scope-multi-exit.cir

[CIR] Keep volatile and atomic return loads before cleanups

When FlattenCFG routes a cir.return through a cleanup, it sinks a load
of an entry-block alloca that feeds the return into the block after the
cleanup. For a volatile or atomic load this moved the access past the
cleanup code. Such a load is now spilled to a temporary before the
cleanup, like any other return operand.

Assisted-by: Claude Code (claude-opus-5-5).
DeltaFile
+27-0clang/test/CIR/Transforms/flatten-cleanup-scope-multi-exit.cir
+4-0clang/lib/CIR/Dialect/Transforms/FlattenCFG.cpp
+31-02 files

LLVM/project 3df9266 — clang/include/clang/CIR/Dialect/IR CIROps.td, clang/lib/CIR/Dialect/IR CIRDialect.cpp CIRMemorySlot.cpp

[CIR][NFC] Add isVolatileOrAtomic() to cir.load and cir.store

Several places spelled out getIsVolatile() || getMemOrder() to decide
whether a load or store must stay as written. Name that check once on
both ops and use it in the load effects, mem2reg, CIRSimplify and the
ABI rewriter.

Assisted-by: Claude Code (claude-opus-5-5).
DeltaFile
+13-0clang/include/clang/CIR/Dialect/IR/CIROps.td
+2-4clang/lib/CIR/Dialect/IR/CIRMemorySlot.cpp
+2-3clang/lib/CIR/Dialect/Transforms/CIRSimplify.cpp
+1-2clang/lib/CIR/Dialect/IR/CIRDialect.cpp
+1-1clang/lib/CIR/Dialect/Transforms/TargetLowering/CIRABIRewriteContext.cpp
+19-105 files

LLVM/project 0ca7ba1 — clang/include/clang/CIR/Dialect/IR CIROps.td, clang/lib/CIR/Dialect/IR CIRDialect.cpp

[CIR] Report side effects of volatile loads and memory asm operands (#242691)

Dead code elimination erased some unused CIR ops that have side effects,
because their declared memory effects were too weak:

- `cir.load`, `cir.get_bitfield` and `cir.matrix.column_major_load`
declared only a read of their address, so an unused volatile or atomic
load was erased. A volatile or atomic load now also reads and writes
unknown memory, as `llvm.load` does.
- `cir.asm` reported nothing for a memory operand such as `"=*m"`, so an
asm whose only output is in memory was erased. It now reads and writes
each memory operand. The new `InlineAsmOp::isMemoryOperand` identifies
those operands, and the LLVM lowering uses it too.
- `cir.asm` now has a verifier: `operand_attrs` needs one entry per
operand, either a unit attribute on a pointer operand (a memory operand)
or an empty dictionary.

Assisted-by: Claude Code (claude-opus-5-5).
DeltaFile
+62-13clang/lib/CIR/Dialect/IR/CIRDialect.cpp
+48-0clang/test/CIR/Transforms/side-effects-dce.cir
+35-10clang/include/clang/CIR/Dialect/IR/CIROps.td
+36-0clang/test/CIR/IR/invalid-inline-asm.cir
+4-13clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+185-365 files

LLVM/project 580b424 — llvm/include/llvm/ADT ImmutableSet.h, llvm/include/llvm/Analysis ScalarEvolution.h

[llvm] Remove unused private type aliases (NFC) (#242787)

ImutAVLTree::CanonLinks: This type alias was added on July 14, 2026 in
commit 3d7535a03c1a036204a5347a79e9f66eb96ce4bc without any uses.

SCEVUnionPredicate::PredicateMap: The last use was removed on February
11, 2022 in commit c02deae18cb26bb6d2d8c8a2fa1dd8b7e0dfda44.

MIR2VecVocabLegacyAnalysis::VocabVector: The last use was removed on
October 22, 2025 in commit c70d0812ba17953b3e405eb2b01dd892b94585f1.

xray::Trace::citerator: The last uses were removed on September 20, 2018
in commit 1f6020798493b536304dd36b393682b062ef1fbd.

ConstantUniqueMap::MapInfo::ConstantClassInfo: The last use was removed
on June 6, 2026 in commit 3232b4d0e07802a1852874910815489dc3e4774a.

Assisted-by: Antigravity
DeltaFile
+0-3llvm/lib/IR/ConstantsContext.h
+0-3llvm/include/llvm/Analysis/ScalarEvolution.h
+0-3llvm/include/llvm/ADT/ImmutableSet.h
+0-2llvm/include/llvm/XRay/Trace.h
+0-1llvm/include/llvm/CodeGen/MIR2Vec.h
+0-125 files

LLVM/project baaed9c — llvm/lib/Analysis ScalarEvolution.cpp

[Analysis] Avoid repeated hash lookups (NFC) (#242786)

Assisted-by: Antigravity
DeltaFile
+15-13llvm/lib/Analysis/ScalarEvolution.cpp
+15-131 files

LLVM/project be27f78 — clang/lib/CIR/Dialect/Transforms FlattenCFG.cpp, clang/test/CIR/Transforms flatten-cleanup-scope-multi-exit.cir

[CIR] Keep volatile and atomic return loads before cleanups

When FlattenCFG routes a cir.return through a cleanup, it sinks a load
of an entry-block alloca that feeds the return into the block after the
cleanup. For a volatile or atomic load this moved the access past the
cleanup code. Such a load is now spilled to a temporary before the
cleanup, like any other return operand.

Assisted-by: Claude Code (claude-opus-5-5).
DeltaFile
+27-0clang/test/CIR/Transforms/flatten-cleanup-scope-multi-exit.cir
+4-0clang/lib/CIR/Dialect/Transforms/FlattenCFG.cpp
+31-02 files

LLVM/project f425850 — clang/include/clang/CIR/Dialect/IR CIROps.td, clang/lib/CIR/Dialect/IR CIRDialect.cpp CIRMemorySlot.cpp

[CIR][NFC] Add isVolatileOrAtomic() to cir.load and cir.store

Several places spelled out getIsVolatile() || getMemOrder() to decide
whether a load or store must stay as written. Name that check once on
both ops and use it in the load effects, mem2reg, CIRSimplify and the
ABI rewriter.

Assisted-by: Claude Code (claude-opus-5-5).
DeltaFile
+13-0clang/include/clang/CIR/Dialect/IR/CIROps.td
+2-4clang/lib/CIR/Dialect/IR/CIRMemorySlot.cpp
+2-3clang/lib/CIR/Dialect/Transforms/CIRSimplify.cpp
+1-2clang/lib/CIR/Dialect/IR/CIRDialect.cpp
+1-1clang/lib/CIR/Dialect/Transforms/TargetLowering/CIRABIRewriteContext.cpp
+19-105 files

LLVM/project db5b43f — llvm/lib/Analysis BasicAliasAnalysis.cpp, llvm/test/Analysis/BasicAA separate_storage.ll

[BasicAA] Restrict cross-iteration separate_storage hints (#241381)

A `separate_storage` assumption applies to its operand values when it
executes. If the operands change across loop iterations, it does not
imply that an operand from one iteration is separate from the other
operand in another iteration. BasicAA can nevertheless use it to return
`NoAlias` in cross-iteration queries, causing GVN and loop-vectorization
miscompiles.

After finding a matching assumption that is valid in the query context,
require both underlying objects to be invariant according to
`isValueEqualInPotentialCycles()` before using it. Queries without a
usable assumption skip these checks. Same-iteration queries and
hints about loop-invariant objects remain supported.

Fixes #241378.

Assisted-by: Claude Code
Assisted-by: OpenAI Codex
DeltaFile
+99-0llvm/test/Analysis/BasicAA/separate_storage.ll
+79-0llvm/test/Analysis/LoopAccessAnalysis/separate-storage-cross-iteration.ll
+5-0llvm/lib/Analysis/BasicAliasAnalysis.cpp
+183-03 files

LLVM/project c09479a — llvm/lib/Target/LoongArch LoongArchMergeBaseOffset.cpp

[LoongArch] Cast to unsigned before LSHing in LoongArchMergeBaseOffsetOpt::detectAndFoldOffset() (#242656)

Make one step ahead of #242761 to fix a latent, similar problem in
`LoongArchMergeBaseOffsetOpt::detectAndFoldOffset`, as suggested by
@heiher.
DeltaFile
+1-1llvm/lib/Target/LoongArch/LoongArchMergeBaseOffset.cpp
+1-11 files

LLVM/project 914d0bb — llvm/lib/Target/RISCV RISCVISelLowering.cpp, llvm/test/CodeGen/RISCV rvp-scalar.ll

[RISCV][P-ext] Restrict P widening shift legalization to left shifts (#242773)

The RV32 P-extension custom legalization for i64 shifts shares a path
for `SHL`, `SRL`, and `SRA`. Its known-bits checks select `WSLL` or
`WSLA` when the input fits in an unsigned or signed 32-bit value, but
both instructions perform a left shift.

This commit restricts this selection to `SHL` so right shifts use the
existing legalization paths.

Closes https://github.com/llvm/llvm-project/issues/242771
DeltaFile
+96-0llvm/test/CodeGen/RISCV/rvp-scalar.ll
+7-5llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+103-52 files

LLVM/project 5856115 — lld/ELF Driver.cpp, lld/MachO Driver.cpp

[LLD] Disable bitcode verification in release builds (#242663)

Similar to the plugin for other linkers, disable running the IR verifier
on bitcode input files. This improves ThinLTO link times by 1.5-1.8% and
stage2-clang build times by 0.57%.
DeltaFile
+4-0lld/wasm/Driver.cpp
+4-0lld/MachO/Driver.cpp
+4-0lld/ELF/Driver.cpp
+12-03 files

LLVM/project 2bf7876 — llvm/lib/Target/Hexagon HexagonTargetMachine.h HexagonTargetMachine.cpp

Hexagon: Use LastSubtargetCache in getSubtargetImpl

Migrate to the new common target pattern

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+14-5llvm/lib/Target/Hexagon/HexagonTargetMachine.cpp
+13-0llvm/lib/Target/Hexagon/HexagonTargetMachine.h
+27-52 files

LLVM/project a071fd2 — mlir/docs/Dialects SPIR-V.md, mlir/lib/Target/SPIRV/Deserialization Deserializer.cpp

[mlir][SPIR-V] Deserialize null array and struct constants (#231626)

Deserialize OpConstantNull for arrays and literal structs by recursively
building the ArrayAttr representation used by spirv.Constant. Preserve
rejection of unsupported constituent types and report the nested type
when a null value cannot be represented.

Allow OpConstantComposite with no constituents for empty structs so that
imported null empty structs can round-trip. Diagnose OpUndef
constituents explicitly instead of reporting them as missing normal
constants.

Document the supported representations and add binary deserialization,
round-trip, and negative tests for aggregate constants.

---------

Co-authored-by: Claude Fable 5.2 <noreply at anthropic.com>
DeltaFile
+91-3mlir/unittests/Dialect/SPIRV/DeserializationTest.cpp
+35-0mlir/test/Target/SPIRV/constant.mlir
+35-0mlir/test/Target/SPIRV/constant-null.mlir
+20-9mlir/lib/Target/SPIRV/Deserialization/Deserializer.cpp
+5-0mlir/docs/Dialects/SPIR-V.md
+186-125 files

LLVM/project bdc06cd — llvm/lib/Target/AMDGPU SIOptimizeExecMaskingPreRA.cpp, llvm/test/CodeGen/AMDGPU optimize-exec-masking-pre-ra.mir

AMDGPU: Fix double interval removal in SIOptimizeExecMaskingPreRA

An exec copy folded after its use was erased from an s_endpgm block
had its interval removed twice. Fixes an assert after 6a483810f0da.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+47-0llvm/test/CodeGen/AMDGPU/optimize-exec-masking-pre-ra.mir
+1-0llvm/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp
+48-02 files

LLVM/project 7e5ae23 — llvm/lib/Target/RISCV RISCVISelLowering.cpp, llvm/test/CodeGen/RISCV rvp-widening-sub-acc.ll rvp-widening-add-acc.ll

[RISCV][P-ext] Use EVT in `combinePExtWidening*Acc` (#242687)

Fixes https://github.com/llvm/llvm-project/issues/242679.
The previous implementation assumes a simple value type, which is wrong
for weird-sized integers.
Assisted-by: Codex
DeltaFile
+14-0llvm/test/CodeGen/RISCV/rvp-widening-sub-acc.ll
+14-0llvm/test/CodeGen/RISCV/rvp-widening-add-acc.ll
+2-2llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+30-23 files

LLVM/project ef6087d — llvm/lib/Target/AArch64/GISel AArch64PostLegalizerCombiner.cpp AArch64InstructionSelector.cpp, llvm/test/CodeGen/AArch64/GlobalISel direct-hasoneuse-select-debug.mir direct-hasoneuse-postlegalizer-debug.mir

[AArch64][GlobalISel] Ignore debug uses in direct single-use combines (#237644)
DeltaFile
+61-0llvm/test/CodeGen/AArch64/GlobalISel/direct-hasoneuse-postlegalizer-debug.mir
+50-0llvm/test/CodeGen/AArch64/GlobalISel/direct-hasoneuse-select-debug.mir
+2-2llvm/lib/Target/AArch64/GISel/AArch64PostLegalizerCombiner.cpp
+2-2llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
+115-44 files

LLVM/project 89b9876 — llvm/lib/CodeGen/SelectionDAG DAGCombiner.cpp, llvm/test/CodeGen/AMDGPU int_to_fp_narrow_i64.ll

DAG: Allow narrowing sint_to_fp source to the sext source type

Same as 241c94e3919e for uint_to_fp. The narrowing fold skipped
sint_to_fp (sext x) when the narrow type matched x, so sitofp (sext i32
to i64) was expanded as a 64-bit conversion on AMDGPU.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+10-257llvm/test/CodeGen/AMDGPU/int_to_fp_narrow_i64.ll
+0-5llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+10-2622 files

LLVM/project cf1893e — llvm/test/CodeGen/AMDGPU int_to_fp_narrow_i64.ll

AMDGPU: Add more sitofp of sext from i32 tests

These currently get the full i64 conversion expansion.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+543-0llvm/test/CodeGen/AMDGPU/int_to_fp_narrow_i64.ll
+543-01 files

LLVM/project 90a9cc6 — llvm/lib/Target/M68k M68kTargetMachine.h M68kTargetMachine.cpp

M68k: Use LastSubtargetCache in getSubtargetImpl

Migrate to the new common target pattern.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+15-4llvm/lib/Target/M68k/M68kTargetMachine.cpp
+13-0llvm/lib/Target/M68k/M68kTargetMachine.h
+28-42 files

LLVM/project d8cd686 — llvm/lib/Target/CSKY CSKYTargetMachine.h CSKYTargetMachine.cpp

CSKY: Use LastSubtargetCache in getSubtargetImpl

Migrate to the new common pattern for targets to cache the last
result.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+20-10llvm/lib/Target/CSKY/CSKYTargetMachine.cpp
+15-0llvm/lib/Target/CSKY/CSKYTargetMachine.h
+35-102 files

LLVM/project 4b6e6e9 — llvm/lib/Target/SystemZ SystemZTargetMachine.h SystemZTargetMachine.cpp

SystemZ: Use LastSubtargetCache in getSubtargetImpl

Migrate to the new common pattern and infrastructure.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+20-8llvm/lib/Target/SystemZ/SystemZTargetMachine.cpp
+14-0llvm/lib/Target/SystemZ/SystemZTargetMachine.h
+34-82 files

LLVM/project 457d241 — llvm/lib/Target/WebAssembly WebAssemblyTargetMachine.h WebAssemblyTargetMachine.cpp

WebAssembly: Use LastSubtargetCache in getSubtargetImpl

Cache the last subtarget and use the new common pattern for targets.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+18-5llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
+15-0llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.h
+33-52 files

LLVM/project 98657a6 — llvm/lib/Target/Mips MipsTargetMachine.h MipsTargetMachine.cpp

Mips: Use LastSubtargetCache in getSubtargetImpl

Migrate to use the new common infrastructure and pattern which caches
based on the last used subtarget.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+27-13llvm/lib/Target/Mips/MipsTargetMachine.cpp
+17-0llvm/lib/Target/Mips/MipsTargetMachine.h
+44-132 files

LLVM/project 6dd4c2c — libc/src/__support/OSUtil/linux/syscall_wrappers personality.h pkey_mprotect.h

[libc] Simplify open/personality/pkey_mprotect/sched_getaffinity error handling
DeltaFile
+3-6libc/src/__support/OSUtil/linux/syscall_wrappers/sched_getaffinity.h
+3-6libc/src/__support/OSUtil/linux/syscall_wrappers/open.h
+2-6libc/src/__support/OSUtil/linux/syscall_wrappers/pkey_mprotect.h
+2-5libc/src/__support/OSUtil/linux/syscall_wrappers/personality.h
+10-234 files

LLVM/project 2f5b0b8 — llvm/include/llvm/Bitstream BitstreamReader.h, llvm/lib/Bitstream/Reader BitstreamReader.cpp

Bitstream: Move the slow path of Read out of line

SimpleBitstreamCursor::Read was too large to inline into its
callers. Separate out the slow error path.

CTMark instructions:u: ThinLTO -0.23% (kimwitu++ -0.72%)

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+29-0llvm/lib/Bitstream/Reader/BitstreamReader.cpp
+4-22llvm/include/llvm/Bitstream/BitstreamReader.h
+33-222 files

LLVM/project f92acef — llvm/include/llvm/Analysis AliasAnalysis.h

AliasAnalysis: Use SmallVectors in AAResults

AAResults is rebuilt for each function whenever AAManager is invalidated,
and the default pipeline adds 3 or 4 AA results to it. With std::vector
each one regrows its storage on the second and third addition.

callgrind instructions, opt -O3: kimwitu++ k.bc -0.45%, SPASS cnf.bc
-0.12%, sqlite3 -0.03%. CTMark instructions:u: O3 -0.02%, ThinLTO -0.01%.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+2-2llvm/include/llvm/Analysis/AliasAnalysis.h
+2-21 files

LLVM/project 3ad0e40 — llvm/lib/Target/ARM ARMFrameLowering.cpp, llvm/test/CodeGen/ARM execute-only-frame-index-debug.ll

[ARM] Prevent debug values from causing extra Thumb1 spills (#237017)

Under Thumb1 execute-only code with an AAPCS frame chain, a debug value
for a stack-passed argument is represented with a fixed frame index.
canSpillOnFrameIndexAccess treats that debug-only operand as a real
access, so enabling debug info spills two additional callee-saved
registers.

Skip debug instructions in the scan. Keep a real stack-argument use
covered to ensure that frame-index elimination still reserves enough
registers.

Assisted-by: OpenAI Codex, co-reviewed by Claude and Yongqiang Tian.
DeltaFile
+48-0llvm/test/CodeGen/ARM/execute-only-frame-index-debug.ll
+4-1llvm/lib/Target/ARM/ARMFrameLowering.cpp
+52-12 files