LLVM/project acbf3f3mlir/lib/Conversion/SCFToControlFlow SCFToControlFlow.cpp, mlir/test/Conversion/SCFToControlFlow convert-to-cfg.mlir

[MLIR][SCF] Fix scf.index_switch lowering to preserve large case values (#189230)

`IndexSwitchLowering` stored case values as `SmallVector<int32_t>`,
which silently truncated any `int64_t` case value larger than INT32_MAX
(e.g. `4294967296` became `0`). The `cf.switch` flag was also created
via `arith.index_cast index -> i32`, losing the upper 32 bits on 64-bit
platforms.

Fix: store case values as `SmallVector<APInt>` with 64-bit width, cast
the index argument to `i64`, and use the `ArrayRef<APInt>` overload of
`cf::SwitchOp::create` so the resulting switch correctly uses `i64` case
values and flag type.

Fixes #111589

Assisted-by: Claude Code
DeltaFile
+28-2mlir/test/Conversion/SCFToControlFlow/convert-to-cfg.mlir
+5-6mlir/lib/Conversion/SCFToControlFlow/SCFToControlFlow.cpp
+33-82 files

LLVM/project c69319bllvm/lib/Target/AArch64 AArch64SystemOperands.td, llvm/lib/Target/AArch64/Utils AArch64BaseInfo.h

fixup! Fix commits after rebase to main
DeltaFile
+19-29llvm/lib/Target/AArch64/AArch64SystemOperands.td
+2-3llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h
+2-0llvm/test/MC/AArch64/armv9a-tlbip.s
+23-323 files

LLVM/project c64505fllvm/lib/Target/AArch64 AArch64SystemOperands.td, llvm/lib/Target/AArch64/Utils AArch64BaseInfo.h

fixup! Fix commits after rebase to main
DeltaFile
+20-30llvm/lib/Target/AArch64/AArch64SystemOperands.td
+2-2llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h
+2-0llvm/test/MC/AArch64/armv9a-tlbip.s
+24-323 files

LLVM/project 5da2546mlir/lib/Dialect/SCF/IR SCF.cpp, mlir/test/Dialect/SCF canonicalize.mlir

[mlir][scf] Fix FoldTensorCastOfOutputIntoForallOp write order bug (#189162)

`FoldTensorCastOfOutputIntoForallOp` incorrectly updated the
destinations of `tensor.parallel_insert_slice` ops in the `in_parallel`
block by zipping `getYieldingOps()` with `getRegionIterArgs()`
positionally. This assumed that the i-th yielding op writes to the i-th
shared output, which is not required by the IR semantics. When slices
are written to shared outputs in non-positional order, the
canonicalization would silently reverse the write targets, producing
incorrect output.

Fix by replacing the positional zip with a per-destination check: for
each yielding op's destination operand, if it is a `tensor.cast` result
whose source is one of the new `scf.forall` region iter args (i.e., a
cast we introduced to bridge the type change), replace the destination
with the cast's source directly. This correctly handles all orderings.

Add a regression test that exercises the multi-result case where
`parallel_insert_slice` ops write to shared outputs in non-sequential

    [4 lines not shown]
DeltaFile
+38-0mlir/test/Dialect/SCF/canonicalize.mlir
+20-8mlir/lib/Dialect/SCF/IR/SCF.cpp
+58-82 files

LLVM/project e097875mlir/lib/Dialect/SparseTensor/Transforms SparseAssembler.cpp

[MLIR][SparseTensor] Fix fingerprint changes in SparseFuncAssembler (#188958)

SparseFuncAssembler::matchAndRewrite was calling funcOp.setName(),
funcOp.setPrivate(), and funcOp->removeAttr() directly without notifying
the rewriter, causing "operation fingerprint changed" errors under
MLIR_ENABLE_EXPENSIVE_PATTERN_API_CHECKS.

Wrap all in-place funcOp mutations with rewriter.modifyOpInPlace.

Assisted-by: Claude Code

Fix a failure present with MLIR_ENABLE_EXPENSIVE_PATTERN_API_CHECKS=ON.

Co-authored-by: Claude Sonnet 4.6 <noreply at anthropic.com>
DeltaFile
+7-3mlir/lib/Dialect/SparseTensor/Transforms/SparseAssembler.cpp
+7-31 files

LLVM/project 27b9ea5mlir/lib/Dialect/SparseTensor/Transforms/Utils LoopEmitter.cpp

[MLIR][SparseTensor] Fix domination violation in co-iteration for dense iterators (#188959)

In exitWhileLoop, random-accessible (dense) iterators were being located
using whileOp.getResults().back() while the insertion point was still
inside the while loop's after block. This caused a domination violation:
the ADDI created by locate() was inside the after block, but it was
later used (via derefImpl's SUBI) after the while loop exits.

Move the locate() calls for random-accessible iterators to after
builder.setInsertionPointAfter(whileOp), where the while results are
properly in scope.

Fixes 10 failing tests under MLIR_ENABLE_EXPENSIVE_PATTERN_API_CHECKS.

Assisted-by: Claude Code

Co-authored-by: Claude Sonnet 4.6 <noreply at anthropic.com>
DeltaFile
+14-5mlir/lib/Dialect/SparseTensor/Transforms/Utils/LoopEmitter.cpp
+14-51 files

LLVM/project 19c8201clang/test/CodeGenObjC expose-direct-method-opt-class-realization.m expose-direct-method.m

adjust tests in favor of the new mangling
DeltaFile
+26-26clang/test/CodeGenObjC/expose-direct-method-opt-class-realization.m
+6-6clang/test/CodeGenObjC/expose-direct-method.m
+2-2clang/test/CodeGenObjC/expose-direct-method-visibility-linkage.m
+34-343 files

LLVM/project 9c37e34llvm/lib/Target/AArch64 AArch64FastISel.cpp AArch64InstrInfo.cpp

[AArch64][NFC] Move `isZExtLoad/isSExtLoad` from `AArch64FastISel` to `AArch64InstrInfo` (#189486)

Move the static function `isZExtLoad` and `isSExtLoad` helper functions
from `AArch64FastISel` into `AArch64InstrInfo` to be reused by other
passes.
DeltaFile
+2-49llvm/lib/Target/AArch64/AArch64FastISel.cpp
+48-0llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
+6-0llvm/lib/Target/AArch64/AArch64InstrInfo.h
+56-493 files

LLVM/project 7ec77f8utils/bazel/llvm-project-overlay/mlir BUILD.bazel

[Bazel] Fixes 54b7230 (#189487)

This fixes 54b723097b39b536eb7d1d6947b65d53a096ed47.

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

LLVM/project c93049ellvm/include/llvm/Transforms/Vectorize/SandboxVectorizer VecUtils.h, llvm/lib/Transforms/Vectorize/SandboxVectorizer/Passes BottomUpVec.cpp

Revert "[SandboxVec][VecUtils] Lane Enumerator (#188355)"

This reverts commit 02402beefec61c5947c9d3bec60626a4afd860a8.
DeltaFile
+0-60llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/VecUtils.h
+0-31llvm/unittests/Transforms/Vectorize/SandboxVectorizer/VecUtilsTest.cpp
+11-2llvm/lib/Transforms/Vectorize/SandboxVectorizer/Passes/BottomUpVec.cpp
+11-933 files

LLVM/project 02402bellvm/include/llvm/Transforms/Vectorize/SandboxVectorizer VecUtils.h, llvm/lib/Transforms/Vectorize/SandboxVectorizer/Passes BottomUpVec.cpp

[SandboxVec][VecUtils] Lane Enumerator (#188355)

This patch introduces an iterator that helps us iterate over lane-value
pairs in a range. For example, given a container `(i32 %v0, <2 x i32>
%v1, i32 %v2)` we get:
```
Lane Value
  0   %v0
  1   %v1
  3   %v2
```

We use this iterator to replace the lane counting logic in
BottomUpVec.cpp.
DeltaFile
+60-0llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/VecUtils.h
+31-0llvm/unittests/Transforms/Vectorize/SandboxVectorizer/VecUtilsTest.cpp
+2-11llvm/lib/Transforms/Vectorize/SandboxVectorizer/Passes/BottomUpVec.cpp
+93-113 files

LLVM/project 5be202aclang/lib/CodeGen CGObjCRuntime.cpp CGObjCRuntime.h

address reviewer
DeltaFile
+56-53clang/lib/CodeGen/CGObjCRuntime.cpp
+5-17clang/lib/CodeGen/CGObjCRuntime.h
+2-5clang/lib/CodeGen/CodeGenFunction.h
+2-1clang/lib/CodeGen/CGObjCMac.cpp
+65-764 files

LLVM/project b6d4fbbclang/lib/CodeGen CGObjCRuntime.cpp CGObjCMac.cpp, clang/test/CodeGenObjC expose-direct-method.m expose-direct-method-opt-class-realization.m

Add a cache to remember previously realized classes
DeltaFile
+4-39clang/test/CodeGenObjC/expose-direct-method.m
+37-0clang/test/CodeGenObjC/expose-direct-method-opt-class-realization.m
+23-9clang/lib/CodeGen/CGObjCRuntime.cpp
+14-0clang/lib/CodeGen/CGObjCMac.cpp
+9-0clang/lib/CodeGen/CodeGenFunction.h
+87-485 files

LLVM/project 45254e1clang/test/CodeGenObjC expose-direct-method-opt-class-realization.m

change test flag name
DeltaFile
+1-1clang/test/CodeGenObjC/expose-direct-method-opt-class-realization.m
+1-11 files

LLVM/project b58cec9clang/lib/CodeGen CGObjCRuntime.cpp CGObjCRuntime.h

Add a cache to remember all classes that should've been realized by load
DeltaFile
+37-14clang/lib/CodeGen/CGObjCRuntime.cpp
+10-0clang/lib/CodeGen/CGObjCRuntime.h
+47-142 files

LLVM/project 92b6402clang/lib/CodeGen CGObjCRuntime.cpp

format
DeltaFile
+4-2clang/lib/CodeGen/CGObjCRuntime.cpp
+4-21 files

LLVM/project 8cde4c2clang/lib/CodeGen CGObjCRuntime.cpp

evict weak class
DeltaFile
+1-1clang/lib/CodeGen/CGObjCRuntime.cpp
+1-11 files

LLVM/project bbc345aclang/lib/CodeGen CGObjCRuntime.cpp, clang/test/CodeGenObjC expose-direct-method-opt-class-realization.m expose-direct-method.m

update test and fix incorrect heuristic
DeltaFile
+148-0clang/test/CodeGenObjC/expose-direct-method-opt-class-realization.m
+10-37clang/lib/CodeGen/CGObjCRuntime.cpp
+4-2clang/test/CodeGenObjC/expose-direct-method.m
+162-393 files

LLVM/project 403cad8clang/test/CodeGenObjC expose-direct-method-opt-class-realization.m

simplify tests
DeltaFile
+33-51clang/test/CodeGenObjC/expose-direct-method-opt-class-realization.m
+33-511 files

LLVM/project 4937020clang/lib/CodeGen CGObjCRuntime.cpp

fix some lint warnings
DeltaFile
+3-3clang/lib/CodeGen/CGObjCRuntime.cpp
+3-31 files

LLVM/project d0e1506clang/lib/CodeGen CGObjCRuntime.cpp

fix mac tests
DeltaFile
+8-5clang/lib/CodeGen/CGObjCRuntime.cpp
+8-51 files

LLVM/project b46479aclang/lib/CodeGen CGObjCRuntime.cpp CGObjCRuntime.h

[ExposeObjCDirect] Optimizations

In many cases we can infer that class object has been realized
DeltaFile
+64-1clang/lib/CodeGen/CGObjCRuntime.cpp
+17-4clang/lib/CodeGen/CGObjCRuntime.h
+81-52 files

LLVM/project 18e6958clang/lib/Sema SemaAMDGPU.cpp, clang/test/CodeGenCUDA builtins-spirv-amdgcn.cu

[SPIRV][AMDGPU][clang][CodeGen][opt] Add late-resolved feature identifying predicates (#134016)

This change adds two builtins for AMDGPU:

- `__builtin_amdgcn_processor_is`, which is similar in observable
behaviour with `__builtin_cpu_is`, except that it is never "evaluated"
at run time;
- `__builtin_amdgcn_is_invocable`, which is behaviourally similar with
`__has_builtin`, except that it is not a macro (i.e. not evaluated at
preprocessing time).

Neither of these are `constexpr`, even though when compiling for
concrete (i.e. `gfxXXX` / `gfxXXX-generic`) targets they get evaluated
in Clang, so they shouldn't tear the AST too badly / at all for
multi-pass compilation cases like HIP. They can only be used in specific
contexts (as args to control structures).

The motivation for adding these is two-fold:


    [18 lines not shown]
DeltaFile
+304-0clang/lib/Sema/SemaAMDGPU.cpp
+281-0llvm/test/CodeGen/SPIRV/SpecConstants/amdgcnspirv-feature-predicate-specconstant.ll
+222-10clang/test/CodeGenCUDA/builtins-spirv-amdgcn.cu
+111-79clang/test/CodeGenOpenCL/builtins-amdgcn-vi.cl
+153-0llvm/test/CodeGen/SPIRV/passes/SPIRVPrepareGlobals-predicate-id-string.ll
+115-0clang/test/SemaHIP/amdgpu-feature-predicates-guard-use.hip
+1,186-8941 files not shown
+2,099-16147 files

LLVM/project 5b00cdflldb/source/Plugins/Platform/MacOSX PlatformDarwinDevice.cpp PlatformDarwin.cpp, lldb/unittests/Platform PlatformMacOSXTest.cpp

[lldb][macOS] Recognize new layouts for DeviceSupport directories (#188646)

When debugging a remote Darwin device (iOS, macOS, etc), lldb needs to
find a local copy of all the system libraries (the system's shared
cache) so we don't need to read them over gdb-remote serial protocol at
the start of every debug session.

Xcode etc normally creates these expanded shared caches in
~/Library/Developer/Xcode/<OS> DeviceSupport/<OS VER> (<OS
BUILD>)/Symbols

So when lldb sees a file like /usr/lib/libSystem.B.dylib, it may find a
copy at in
~/L/D/Xcode/iOS DeviceSupport/26.2
(23B87)/Symbols/usr/lib/libSystem.B.dylib

There may be multiple expanded shared caches in these DeviceSupport
directories, so we try to parse the "os version" and "os build" out of
the filepath name, and look in a directory that matches the target

    [23 lines not shown]
DeltaFile
+65-76lldb/source/Plugins/Platform/MacOSX/PlatformDarwinDevice.cpp
+29-0lldb/unittests/Platform/PlatformMacOSXTest.cpp
+20-8lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
+16-5lldb/source/Plugins/Platform/MacOSX/PlatformDarwinDevice.h
+5-3lldb/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.cpp
+135-925 files

LLVM/project 59beb8bllvm/lib/Target/AArch64/AsmParser AArch64AsmParser.cpp, llvm/lib/Target/AArch64/Utils AArch64BaseInfo.h

fixup! More simplification
DeltaFile
+413-443llvm/test/MC/AArch64/armv9a-tlbip.s
+1-15llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
+7-9llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h
+421-4673 files

LLVM/project 48ae810llvm/lib/Target/AArch64 AArch64SystemOperands.td, llvm/lib/Target/AArch64/AsmParser AArch64AsmParser.cpp

fixup! More optimisations
DeltaFile
+10-11llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
+7-6llvm/lib/Target/AArch64/AArch64SystemOperands.td
+1-8llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h
+18-253 files

LLVM/project 6110770llvm/test/MC/AArch64 tlbip-tlbid-or-d128.s armv9a-tlbip.s

fixup! Fix using Marian's suggestion
DeltaFile
+0-259llvm/test/MC/AArch64/tlbip-tlbid-or-d128.s
+160-0llvm/test/MC/AArch64/armv9a-tlbip.s
+160-2592 files

LLVM/project f4b3457llvm/lib/Target/AArch64 AArch64SystemOperands.td, llvm/lib/Target/AArch64/AsmParser AArch64AsmParser.cpp

fixup! Don't use ExtraRequires. Instead, set a boolean in TLBITableBase
DeltaFile
+27-22llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h
+17-1llvm/lib/Target/AArch64/AArch64SystemOperands.td
+7-7llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
+51-303 files

LLVM/project 5bc1f3ellvm/lib/Target/AArch64/AsmParser AArch64AsmParser.cpp

fixup! Simplify logic after suggestions from Marian
DeltaFile
+13-10llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
+13-101 files

LLVM/project 2cd66d8llvm/lib/Target/AArch64/AsmParser AArch64AsmParser.cpp, llvm/lib/Target/AArch64/Utils AArch64BaseInfo.h

[AArch64][llvm] Gate some `tlbip` insns with +tlbid or +d128

Change the gating of `tlbip` instructions containing `*E1IS*`, `*E1OS*`,
`*E2IS*` or `*E2OS*` to be used with `+tlbid` or `+d128`. This is because
the 2025 Armv9.7-A MemSys specification says:

```
  All TLBIP *E1IS*, TLBIP*E1OS*, TLBIP*E2IS* and TLBIP*E2OS* instructions
  that are currently dependent on FEAT_D128 are updated to be dependent
  on FEAT_D128 or FEAT_TLBID
```
DeltaFile
+259-0llvm/test/MC/AArch64/tlbip-tlbid-or-d128.s
+66-66llvm/test/MC/AArch64/armv9a-tlbip.s
+20-0llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h
+15-5llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
+360-714 files