LLVM/project 496ef0bmlir/include/mlir/Interfaces MemorySlotInterfaces.h, mlir/lib/Interfaces MemorySlotInterfaces.cpp

update getOpAliasSlot and buildAliasChain and add test
DeltaFile
+23-31mlir/lib/Interfaces/MemorySlotInterfaces.cpp
+22-0mlir/test/Transforms/mem2reg.mlir
+7-14mlir/include/mlir/Interfaces/MemorySlotInterfaces.h
+7-7mlir/lib/Transforms/Mem2Reg.cpp
+59-524 files

LLVM/project c7b5028llvm/lib/Transforms/Vectorize VPlanTransforms.cpp VPlan.h, llvm/test/Transforms/LoopVectorize/RISCV reg-usage-prune-vf.ll tail-folding-interleave.ll

[LV] Convert gather loads with constant stride into strided loads (#147297)

This patch detects non-consecutive load accesses (i.e. gather) with a
constant stride, such as:
```
  void stride(int* a, int *b, int n) {
    for (int i = 0; i < n; i++)
      a[i * 5] = b[i * 5] + i;
  }
```
and converts them into strided loads when legal and profitable, using
experimental_vp_strided_load.
The new VPlan transformation, convertToStridedAccesses, hoists the
functionality of RISCVGatherScatterLowering into the vectorizer,
enabling a more precise cost estimation during vectorization.
Additionally, by leveraging SCEV for stride analysis, the vectorizer can
potentially detect more opportunities to optimize gathers into strided
loads.

This enables more efficient code generation for targets like RISC-V that
support strided loads natively.
DeltaFile
+124-3llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+103-23llvm/lib/Transforms/Vectorize/VPlan.h
+34-70llvm/test/Transforms/LoopVectorize/RISCV/reg-usage-prune-vf.ll
+50-47llvm/test/Transforms/LoopVectorize/RISCV/tail-folding-interleave.ll
+78-3llvm/test/Transforms/LoopVectorize/RISCV/truncate-to-minimal-bitwidth-cost.ll
+56-18llvm/test/Transforms/LoopVectorize/RISCV/tail-folding-gather-scatter.ll
+445-16419 files not shown
+655-26725 files

LLVM/project 7050858llvm/lib/Target/X86 X86ISelLowering.cpp, llvm/test/CodeGen/X86 vector-reduce-smax.ll

[X86] LowerVECREDUCE - don't attempt to handle vectors with non-pow2 element counts (#198989)

32-bit targets will attempt to lower vXi64 reductions prior to argtype legalization

Crash fix - we can improve the handling in a future commit
DeltaFile
+343-0llvm/test/CodeGen/X86/vector-reduce-smax.ll
+6-3llvm/lib/Target/X86/X86ISelLowering.cpp
+349-32 files

LLVM/project 955b34dllvm/lib/Transforms/Scalar LoopInterchange.cpp, llvm/test/Transforms/LoopInterchange profitability-instorder.ll interchangeable-outerloop-multiple-indvars.ll

[LoopInterchange] Make the instorder profitability check GEP-independent (#181991)

The heuristic function `instorder` assumes that the structure of GEPs
reflect the original memory access patterns, which is not always true.
Moreover, recent trends in LLVM are moving in a direction where such
patterns are no longer preserved. If the migration from GEP to ptrtoadd
is completed, this heuristic will no longer make sense.

To achieve what this heuristic is trying to do, we should examine the
SCEV of the pointer operands of loads/stores, rather than relying on
GEPs. This patch replaces the GEP‑dependent logic with an SCEV‑based
analysis. Instead of relying on the operand order in GEPs, the
SCEV‑based approach walks through the SCEV expression, identifies the
step recurrences of the relevant loops, and compares them. This allows
us to perform what `instorder` intends to do without relying on how
memory access patterns are represented in the IR.
DeltaFile
+69-41llvm/lib/Transforms/Scalar/LoopInterchange.cpp
+46-45llvm/test/Transforms/LoopInterchange/profitability-instorder.ll
+1-1llvm/test/Transforms/LoopInterchange/interchangeable-outerloop-multiple-indvars.ll
+116-873 files

LLVM/project 2282265llvm/lib/Transforms/Scalar LoopInterchange.cpp, llvm/test/Transforms/LoopInterchange pr57148.ll reduction-not-involve-innermost.ll

[LoopInterchange] Always create a new latch when interchanging (#194574)

In the transformation phase of loop-interchange, when the inner loop to
be interchanged is the innermost one, a new latch BB is created and
several instructions are moved from the original BB to the new one to
generate valid IR. I'm not sure why this process was performed only when
the target loop is the innermost loop, but as demonstrated in #163954,
this process is also necessary when interchanging non‑innermost loops,
e.g., when a reduction exists and the reduction operation is located in
the latch BB of the inner loop.
This patch removes the conditional branch and always creates a new latch
during the transformation.

Fix #163954
DeltaFile
+65-68llvm/lib/Transforms/Scalar/LoopInterchange.cpp
+60-62llvm/test/Transforms/LoopInterchange/pr57148.ll
+81-0llvm/test/Transforms/LoopInterchange/reduction-not-involve-innermost.ll
+10-6llvm/test/Transforms/LoopInterchange/interchanged-loop-nest-3.ll
+216-1364 files

LLVM/project 7d97d03llvm/lib/Transforms/Vectorize VPlanRecipes.cpp

[VPlan] Use inferred type for VPReplicateRecipe void check (NFC) (#198560)
DeltaFile
+4-3llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
+4-31 files

LLVM/project 4d27aeflldb/tools/lldb-dap/extension package-lock.json, llvm/test/CodeGen/NVPTX machine-cse-predicate-inversion.ll

Merge branch 'main' into users/kasuga-fj/loop-interchange-fix-costmodel
DeltaFile
+3,903-0llvm/test/CodeGen/NVPTX/machine-cse-predicate-inversion.ll
+2,504-1,285lldb/tools/lldb-dap/extension/package-lock.json
+0-2,353llvm/test/CodeGen/X86/horizontal-reduce-umax.ll
+0-2,223llvm/test/CodeGen/X86/horizontal-reduce-smin.ll
+0-2,220llvm/test/CodeGen/X86/horizontal-reduce-smax.ll
+0-2,099llvm/test/CodeGen/X86/horizontal-reduce-umin.ll
+6,407-10,1801,214 files not shown
+49,946-25,6711,220 files

LLVM/project a13ad21llvm/lib/Target/X86 X86ISelLowering.cpp, llvm/test/CodeGen/X86 horizontal-reduce-umax.ll horizontal-reduce-smin.ll

[X86] Replace custom minmax reduction pattern matching with ISD::VEC_REDUCE_*MIN/MAX support (#194473)

Support middle-end reduction integer min/max patterns instead of relying
on the ExpandReductions pass and then matching the expanded pattern in
DAG.

Middle-end reduction pattern recognition now matches
SelectionDAG::matchBinOpReduction (inc partial reduction), and its
better to improve future handling in InstCombine/VectorCombine wherever
possible.

Fixes #194624
DeltaFile
+0-2,353llvm/test/CodeGen/X86/horizontal-reduce-umax.ll
+0-2,223llvm/test/CodeGen/X86/horizontal-reduce-smin.ll
+0-2,220llvm/test/CodeGen/X86/horizontal-reduce-smax.ll
+0-2,099llvm/test/CodeGen/X86/horizontal-reduce-umin.ll
+0-37llvm/lib/Target/X86/X86ISelLowering.cpp
+4-12llvm/test/Transforms/PhaseOrdering/X86/vector-reductions-expanded.ll
+4-8,9443 files not shown
+20-8,9589 files

LLVM/project 2a17897libcxx/include/__cxx03/__functional hash.h, libcxx/test/std/utilities/function.objects/unord.hash pointer.pass.cpp

[libc++][C++03] Cherry-pick #166690 (#198977)
DeltaFile
+5-0libcxx/include/__cxx03/__functional/hash.h
+0-2libcxx/test/std/utilities/function.objects/unord.hash/pointer.pass.cpp
+5-22 files

LLVM/project 9c826felibcxx/include/__cxx03 limits, libcxx/test/std/language.support/support.limits/limits/numeric.limits.members traps.pass.cpp

[libc++][C++03] Cherry-pick #166724 (#198839)
DeltaFile
+2-1libcxx/include/__cxx03/limits
+0-2libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/traps.pass.cpp
+2-32 files

LLVM/project 868aefdllvm/lib/Target/AArch64 AArch64ISelLowering.cpp, llvm/test/CodeGen/AArch64 alias_mask.ll sve-fixed-length-masked-expandloads.ll

Revert "[AArch64] Use ADDP tree for v16i8 to i16 bitmask extraction (#192974)" (#198985)

This reverts commit 42cc9b53bf83ebb778755fd51a9b277cb71740d5 as it is
tripping up on type legalization.
DeltaFile
+57-58llvm/test/CodeGen/AArch64/alias_mask.ll
+49-49llvm/test/CodeGen/AArch64/sve-fixed-length-masked-expandloads.ll
+16-16llvm/test/CodeGen/AArch64/dag-combine-setcc.ll
+12-12llvm/test/CodeGen/AArch64/fixed_masked_deinterleaved_loads.ll
+12-12llvm/test/CodeGen/AArch64/fixed_masked_interleaved_stores.ll
+10-13llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+156-1603 files not shown
+176-1809 files

LLVM/project 835e014mlir/lib/Dialect/Transform/IR Utils.cpp

[mlir] only verify moved symbols in transform (#197882)

When merging named sequences from an external module in the transform
interpreter, only run the inliner verification for operations that were
actually moved rather than all pre-existing operations. This avoids
verifying inlining conditions for operations that wouldn't be inlined by
this logic, and is also more parsimonious.

Reverts #195770 but keeps the test. This is a more generic fix.
DeltaFile
+58-80mlir/lib/Dialect/Transform/IR/Utils.cpp
+58-801 files

LLVM/project 4eeee28llvm/lib/Target/AArch64/GISel AArch64LegalizerInfo.cpp

[AArch64][GlobalISel] Do not clamp s16 G_FCONSTANT. (#198983)

This should be an NFC as s16 FCONSTANT is already legal and handled
later
whether fp16 is available or not.
DeltaFile
+1-2llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
+1-21 files

LLVM/project bd67a6ellvm/include/llvm/Transforms/Scalar Reassociate.h, llvm/lib/Transforms/Scalar Reassociate.cpp

[Reassociate] Use UniformityInfo to group uniform operands together
DeltaFile
+43-2llvm/lib/Transforms/Scalar/Reassociate.cpp
+9-9llvm/test/CodeGen/AMDGPU/reassoc-uniform-e2e.ll
+5-1llvm/include/llvm/Transforms/Scalar/Reassociate.h
+57-123 files

LLVM/project 8f2f016libc/src/__support freelist_heap.h

[libc] Make FreeListHeap::free ignore null pointers. (#198834)

Update `FreeListHeap::free` to return immediately when passed `nullptr`.

This matches the expected `free(nullptr)` behaviour as per the C
standard and avoids running pointer validation on a null pointer
allowing the hermetic malloc test libc/test/src/stdlib/malloc_test.cpp
to pass.

As per standard:
The free function, paragraph:
```
  The free function causes the space pointed to by
  ptr to be deallocated, that is, made available for
  further allocation. If ptr is a null pointer,
  no action occurs.
```
DeltaFile
+3-0libc/src/__support/freelist_heap.h
+3-01 files

LLVM/project 0173d9cflang/test/Integration/OpenMP atomic-compare.f90, llvm/lib/Frontend/OpenMP OMPIRBuilder.cpp

Revert "Revert "[Flang] [OpenMP] atomic compare (#184761)" (#198848)"

This reverts commit 28d6673e21f72d5b4b8238c220afa9abaa6b91c6.
DeltaFile
+517-0mlir/test/Dialect/OpenMP/invalid.mlir
+359-0mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
+233-62llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+250-0flang/test/Integration/OpenMP/atomic-compare.f90
+209-0mlir/test/Target/LLVMIR/openmp-llvm.mlir
+171-0mlir/include/mlir/Dialect/OpenACCMPCommon/Interfaces/AtomicInterfaces.td
+1,739-6213 files not shown
+2,286-13119 files

LLVM/project e1cb899llvm/lib/Target/AArch64 MachineSMEABIPass.cpp, llvm/test/CodeGen/AArch64 machine-sme-abi-skip-debug-inst.mir

[AArch64][SME] Don't pass debug instructions to LiveUnits.stepBackward() (#198010)

See https://github.com/llvm/llvm-project/pull/193104 (follow up to
#197989).
DeltaFile
+74-0llvm/test/CodeGen/AArch64/machine-sme-abi-skip-debug-inst.mir
+3-0llvm/lib/Target/AArch64/MachineSMEABIPass.cpp
+77-02 files

LLVM/project a21e1ccllvm/lib/Target/WebAssembly WebAssemblyTargetTransformInfo.cpp, llvm/test/CodeGen/WebAssembly memory-interleave.ll

[WebAssembly] Cost model for F32 memory interleave (#198531)

Set them the same as their i32 counterparts, but don't cost 4x v4f32.
wasm-perf doesn't show any particular uplift and the tests show that,
when we're mixing integers and floats, we often interleaving anyway. But
this change should be good for arithmetic on structures of 2xf32.
DeltaFile
+207-124llvm/test/Transforms/LoopVectorize/WebAssembly/memory-interleave.ll
+74-4llvm/test/CodeGen/WebAssembly/memory-interleave.ll
+4-1llvm/lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.cpp
+285-1293 files

LLVM/project 55c514cllvm/lib/Target/AArch64 AArch64ISelLowering.cpp, llvm/test/CodeGen/AArch64 swap-compare-operands.ll combine-comparisons-by-cse.ll

[AArch64] Select `CMP WZR, reg, shift #amount` (#197424)
DeltaFile
+289-120llvm/test/CodeGen/AArch64/swap-compare-operands.ll
+22-20llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+2-3llvm/test/CodeGen/AArch64/combine-comparisons-by-cse.ll
+313-1433 files

LLVM/project ac09b41clang/lib/Interpreter Interpreter.cpp, clang/lib/StaticAnalyzer/Checkers DynamicTypePropagation.cpp

remove redundant uses of `isa` caught by clang-tidy (NFC) (#192813)

These calls to `isa` are always true. Also includes a drive-by cleanup
of a use of `isa_and_nonnull` where the value was already null-checked.

Caught by applying https://github.com/llvm/llvm-project/pull/191081
DeltaFile
+33-35clang/lib/StaticAnalyzer/Checkers/WebKit/PtrTypesSemantics.cpp
+3-8clang/lib/StaticAnalyzer/Checkers/WebKit/ForwardDeclChecker.cpp
+4-5clang/lib/StaticAnalyzer/Checkers/DynamicTypePropagation.cpp
+1-5llvm/lib/IR/IntrinsicInst.cpp
+2-2clang/lib/Interpreter/Interpreter.cpp
+0-2llvm/lib/Transforms/Scalar/LoopInterchange.cpp
+43-576 files

LLVM/project 5a51136clang-tools-extra/clang-tidy/llvm RedundantCastingCheck.cpp, clang-tools-extra/docs ReleaseNotes.rst

[clang-tidy] detect uses of llvm::isa that are always true (#191081)

Warns when performing a dynamic type check that is always true, either
because the dynamic type is the same as the static type, or because the
static type derives the dynamic type.
Supported functions:
 - isa
 - isa_and_present
 - isa_and_nonnull

Related PR: https://github.com/llvm/llvm-project/pull/189274
DeltaFile
+126-82clang-tools-extra/clang-tidy/llvm/RedundantCastingCheck.cpp
+178-0clang-tools-extra/test/clang-tidy/checkers/llvm/redundant-isa.cpp
+13-3clang-tools-extra/docs/clang-tidy/checks/llvm/redundant-casting.rst
+12-1clang-tools-extra/test/clang-tidy/checkers/llvm/redundant-casting.cpp
+2-1clang-tools-extra/docs/ReleaseNotes.rst
+331-875 files

LLVM/project 10c0b42mlir/lib/Dialect/Linalg/IR LinalgOps.cpp, mlir/test/Dialect/Linalg canonicalize.mlir

[mlir][linalg] Add splat broadcast canonicalization pattern (#195980)

Add `linalg.broadcast` splat constant to `linalg.fill` canonicalization.

Assisted-by: Cursor (GPT-5.5)
DeltaFile
+45-0mlir/test/Dialect/Linalg/canonicalize.mlir
+31-1mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
+76-12 files

LLVM/project 8ac51bclibc/include stdio.yaml sched.yaml, libc/include/sys mman.yaml socket.yaml

[libc][NFC] Lowercase standard identifiers in YAML files (#198854)

Update YAML files to use lowercase identifiers for standards.

In header.py, canonical identifiers for standards are explicitly defined
in lowercase and mapped to their pretty names for display. This change
ensures that all YAML files use the lowercase identifiers (posix, linux,
bsd, gnu) expected by the header generation tool.

Assisted-by: Automated tooling, human reviewed.
DeltaFile
+21-21libc/include/sys/mman.yaml
+17-17libc/include/sys/socket.yaml
+17-17libc/include/stdio.yaml
+12-12libc/include/sched.yaml
+11-11libc/include/termios.yaml
+8-8libc/include/string.yaml
+86-8614 files not shown
+132-13220 files

LLVM/project 1df5015llvm/lib/Target/ARM ARMLoadStoreOptimizer.cpp, llvm/test/CodeGen/ARM pr196779.ll

[ARM] Copy all flags when creating LDM (#197898)

This just adds the Operand instead of trying to handle flags
individually, similar to the AArch64LoadStoreOptimizer.

Fixes #196779
DeltaFile
+96-0llvm/test/CodeGen/ARM/pr196779.ll
+14-12llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
+110-122 files

LLVM/project 348bde9clang/include/clang/Parse Parser.h, clang/lib/Parse ParseExprCXX.cpp ParseOpenACC.cpp

fix name diverge from main
DeltaFile
+5-5clang/lib/Parse/ParseExprCXX.cpp
+4-6clang/include/clang/Parse/Parser.h
+3-3clang/lib/Parse/ParseOpenACC.cpp
+12-143 files

LLVM/project 1229385compiler-rt/lib/builtins/cpu_model cpu_model.h AArch64CPUFeatures.inc, llvm/include/llvm/TargetParser AArch64CPUFeatures.inc

[compiler-rt][builtins] A few fixes cpu_model files (#198957)

- Fix typo in include guard with the word features
- Correct header in cpu_model.h header file and include guard after
  the file has been renamed
DeltaFile
+3-3compiler-rt/lib/builtins/cpu_model/cpu_model.h
+2-2llvm/include/llvm/TargetParser/AArch64CPUFeatures.inc
+2-2compiler-rt/lib/builtins/cpu_model/AArch64CPUFeatures.inc
+7-73 files

LLVM/project 15f3cf2llvm/lib/Support UnicodeNameToCodepointGenerated.cpp, llvm/test/CodeGen/AMDGPU llvm.amdgcn.av.load.b128.ll

Merge branch 'main' into users/bassiounix/clang/c2y/if-decl
DeltaFile
+23,873-20,923llvm/lib/Support/UnicodeNameToCodepointGenerated.cpp
+8,633-8,584llvm/test/CodeGen/Thumb2/mve-clmul.ll
+12,365-0llvm/test/CodeGen/AMDGPU/llvm.amdgcn.av.load.b128.ll
+1,243-8,768llvm/test/CodeGen/X86/vector-replicaton-i1-mask.ll
+3,436-2,769llvm/test/CodeGen/AMDGPU/GlobalISel/sdivrem.ll
+2,801-2,109llvm/test/CodeGen/AMDGPU/GlobalISel/udivrem.ll
+52,351-43,1534,181 files not shown
+282,730-143,1564,187 files

LLVM/project b59adaaclang/test/C/C2y n3267.c

add more positive tests
DeltaFile
+7-0clang/test/C/C2y/n3267.c
+7-01 files

LLVM/project 0be65ballvm/lib/Target/LoongArch LoongArchISelLowering.cpp LoongArchMachineFunctionInfo.h, llvm/test/CodeGen/LoongArch musttail-indirect-args.ll musttail-call.ll

[LoongArch] Fix musttail with indirect arguments by forwarding incoming pointers

When a `musttail` call passes arguments indirectly (fp128 on LA32, i128
on LA32), the backend allocates a stack temporary and hands the callee a
pointer. The tail call deallocates the caller's frame, and the pointer
dangles.

Fix by forwarding the incoming indirect pointers instead. They point to
the caller's caller's frame, which stays valid after the tail call.
Forwarded formal parameters reuse the pointer directly; computed values
get stored into the incoming buffer first.

The pointers are saved in virtual registers (`CopyToReg`/`CopyFromReg`)
rather than SDValues. The SelectionDAG is cleared between basic blocks
and musttail calls can appear in non-entry blocks, so storing raw
SDValues across BBs is unsound (this was the bug that led to the revert
in 501417baa60f). The vreg save only fires when the function has
musttail calls; other functions see no codegen change.


    [3 lines not shown]
DeltaFile
+907-0llvm/test/CodeGen/LoongArch/musttail-indirect-args.ll
+183-44llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
+20-0llvm/test/CodeGen/LoongArch/musttail-call.ll
+17-0llvm/lib/Target/LoongArch/LoongArchMachineFunctionInfo.h
+1,127-444 files

LLVM/project 74e6127llvm/lib/Target/RISCV RISCVSubtarget.h RISCVProcessors.td, llvm/test/CodeGen/RISCV jump-is-expensive.ll

[RISCV] Add TuneJumpIsExpensive (#191374)

We had `setJumpIsExpensive(true)` before 18.x but it was removed
in #74647. This feature allows users to tune the ISel behavior.

We have #80124 and #178394 landed, so it should be more flexible
to tune branches and selects now.

This is an alternative of #191158.
DeltaFile
+91-0llvm/test/CodeGen/RISCV/jump-is-expensive.ll
+4-0llvm/lib/Target/RISCV/RISCVSubtarget.h
+3-1llvm/lib/Target/RISCV/RISCVProcessors.td
+2-0llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+100-14 files