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

LLVM/project 3cf43f6llvm/lib/Target/RISCV RISCVISelLowering.cpp, llvm/test/CodeGen/RISCV rvp-simd-64.ll

[RISCV][P-ext] Split v4i16/v8i8 AND/OR/XOR on RV32. (#198449)

v2i32 is already scalarized by LegalizeVectorOps.
DeltaFile
+162-690llvm/test/CodeGen/RISCV/rvp-simd-64.ll
+31-3llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+193-6932 files

LLVM/project 2306a98llvm/lib/Target/RISCV RISCVISelLowering.cpp

[RISCV] Inline multiple small lambdas. NFC (#198878)

None of these lambdas are reused and they all seemed pretty simple to
inline.
DeltaFile
+19-30llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+19-301 files

LLVM/project cc382a6llvm/lib/Target/RISCV RISCVISelLowering.cpp, llvm/test/CodeGen/RISCV rvp-simd-64.ll

[RISCV][P-ext] Custom-lower SELECT for v4i16/v8i8 on RV32 (#198723)

SELECT was Expand for RV32 64-bit packed types, producing 40-80 lines of
stack-based per-element scalarization. Make it Custom for v4i16/v8i8 and
extend the existing isPExtPackedType branch in lowerSELECT to bitcast to
an integer of matching width: single-GPR types select on XLenVT
directly, while RV32 double-wide types select on i64 which
type-legalizes to two scalar selects on the i32 halves.

v2i32 is left to natural type-legalization since it splits cleanly into
two scalar i32 selects without a Custom hook.
DeltaFile
+14-114llvm/test/CodeGen/RISCV/rvp-simd-64.ll
+11-7llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+25-1212 files

LLVM/project b3c0661llvm/lib/Transforms/Instrumentation AddressSanitizer.cpp

[NFC][ASan] Factor out ASan call insertion behind a single call (#198650)

The ASan pass directly injects function calls into the IR using
getOrInsertFunction() on every call site. Refactor the disparate call
sites behind an AsanFunctionInserter class. This allows us to add pre-
and post-processing logic for all inserted functions at once.

Signed-off-by: Emil Tsalapatis <emil at etsalapatis.com>
DeltaFile
+68-46llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
+68-461 files

LLVM/project 577c2b6clang/include/clang/Basic BuiltinsMips.def, clang/test/CodeGen/Mips msa-const-ld.c

[Mips] Allow const pointers for the MSA load intrinsics (#193508)

This matches the prototypes of the GCC builtins.
DeltaFile
+24-0clang/test/CodeGen/Mips/msa-const-ld.c
+4-4clang/include/clang/Basic/BuiltinsMips.def
+28-42 files

LLVM/project 35aeb28flang-rt/lib/runtime exceptions.cpp, flang-rt/unittests/Runtime Exceptions.cpp CMakeLists.txt

[flang-rt] Silence -Wfenv-access in the runtime fenv wrappers (part 1) (#198692)

Upstream clang's commit 5f2bedca, PR #187860, enabled a warning that
fires whenever code calls a `<fenv.h>` / `<cfenv>` primitive without
enabling proper FP exception behavior. This caused warnings in compiling
flang-rt, which in turn caused certain buildsbots to fail with
`-Werror`.

This change enables FP trap behavior for parts of flang-rt that are
known to require it. The other parts will be addressed by a future
change.

Assisted-by: AI
DeltaFile
+144-0flang-rt/unittests/Runtime/Exceptions.cpp
+34-0flang/include/flang/Common/fp-control.h
+4-0flang-rt/lib/runtime/exceptions.cpp
+1-0flang-rt/unittests/Runtime/CMakeLists.txt
+183-04 files

LLVM/project 239fe44utils/bazel/llvm-project-overlay/mlir BUILD.bazel

[Bazel] Fixes 0107b92 (#198939)

This fixes 0107b929b2dad594a9868250878e1d891791dd62.

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

LLVM/project d2d8c53clang/lib/Driver/ToolChains AMDGPU.cpp AMDGPUOpenMP.cpp, clang/lib/Driver/ToolChains/Arch AMDGPU.cpp

[AMDGPU] Rewrite `-march` to `-mcpu` in the AMDGPU Toolchain (#198877)

Summary:
Pretty much every target uses either `-mcpu` or `-march` consistently.
AMDGPU has been accidentally using both for a while, mostly from some
fallout with the OpenMP Toolchain. This is too deep to pull out without
potentially disrupting users, but I want to at least contain it by
canonicalizing `-march` to `-mcpu` in the driver. This means we don't
need to bother checking both like every other target does.
DeltaFile
+8-5clang/lib/Driver/ToolChains/AMDGPU.cpp
+3-4clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp
+1-5clang/lib/Driver/ToolChains/CommonArgs.cpp
+1-3clang/lib/Driver/ToolChains/Arch/AMDGPU.cpp
+13-174 files

LLVM/project a3da590flang-rt/test/Driver compare_iso_fortran_env_symbols.f90, llvm/runtimes CMakeLists.txt

[flang-rt] Fix ISO test not respecting real kind flags (#198922)

Summary:
The test previously did not account for CMake overrides, so we just grab
the file that's actually generated. `sort -u` should handle the case
where there's both a .so and .a.
DeltaFile
+6-6flang-rt/test/Driver/compare_iso_fortran_env_symbols.f90
+3-0llvm/runtimes/CMakeLists.txt
+9-62 files

LLVM/project 17e4140lldb/include/lldb/Symbol TypeSystem.h

[lldb] Make TypeSystem::m_sym_file atomic to fix data race (#198923)

SymbolFileCommon::GetTypeSystemForLanguage unconditionally writes this
pointer with `ts->SetSymbolFile(this)` on every lookup, which races with
concurrent reads from other threads.

The race is benign in practice: there is exactly one SymbolFile per
Module, so every writer stores the same pointer, but it is still
undefined behavior under the C++ memory model.

Make the field std::atomic<SymbolFile *> and turn SetSymbolFile into a
compare-exchange that asserts a TypeSystem is never rebound to a
different SymbolFile, documenting the invariant that lets us get away
with this.

The alternative is to have the SymbolFile pointer passed in through the
constructor, but that would require updating a bunch of call sites,
including various plugin interfaces.

Found by ThreadSanitizer as part of #197792.
DeltaFile
+27-5lldb/include/lldb/Symbol/TypeSystem.h
+27-51 files

LLVM/project 3a25cb1llvm/lib/CodeGen InlineSpiller.cpp

More and more refactoring.
DeltaFile
+12-4llvm/lib/CodeGen/InlineSpiller.cpp
+12-41 files