LLVM/project a2c6b34llvm/lib/Target/WebAssembly WebAssemblyFastISel.cpp, llvm/test/CodeGen/WebAssembly load-ext.ll

[WebAssembly][FastISel] Fold i64 extension chains into widened loads (#187934)

FastISel can already fold some sign- and zero-extending loads, but a
number of i64 extension patterns still leave redundant instructions
behind.

This patch series extends load folding to recognize several such cases,
including:
- promoted sign-extension chains
- copy + i64.extend_i32_{u,s} chains
- AND-based zero-extension chains
- shift-based sign-extension chains

When these patterns originate from narrow integer loads, fold them
directly into widened i64 loads instead of materializing intermediate
i32 loads followed by redundant i64 extends.

Fixes #179672
DeltaFile
+217-78llvm/lib/Target/WebAssembly/WebAssemblyFastISel.cpp
+54-92llvm/test/CodeGen/WebAssembly/load-ext.ll
+271-1702 files

LLVM/project caf6196clang/lib/DependencyScanning DependencyScannerImpl.cpp, clang/test/ClangScanDeps p1689-suppress-warnings.cppm

[ClangScanDeps] Do not emit warning for P1689 format (#186966)

Close https://github.com/llvm/llvm-project/issues/185394

This is only for P1689 format as ClangScanDeps/optimize-vfs-pch.m will
check for warning message. I'll leave this to people who want to change
that.
DeltaFile
+23-0clang/test/ClangScanDeps/p1689-suppress-warnings.cppm
+2-0clang/lib/DependencyScanning/DependencyScannerImpl.cpp
+25-02 files

LLVM/project 6c6b4c1clang/lib/CodeGen/Targets RISCV.cpp, clang/test/CodeGen/RISCV riscv64-abi.c riscv32-abi.c

[RISCV] Disable rounding of aggregate return/arguments to iXLen. (#184736)

If the type is rounded to iXLen, an additional zext instruction is
generated. For example, https://godbolt.org/z/bG7vG4dvM
DeltaFile
+82-45clang/test/CodeGen/RISCV/riscv64-abi.c
+48-8clang/test/CodeGen/RISCV/riscv32-abi.c
+25-31clang/test/CodeGen/RISCV/abi-empty-structs.c
+13-19clang/test/CodeGen/RISCV/bfloat-abi.c
+8-8clang/lib/CodeGen/Targets/RISCV.cpp
+176-1115 files

LLVM/project 211b9cellvm/lib/Support CMakeLists.txt

fix support on windows
DeltaFile
+9-0llvm/lib/Support/CMakeLists.txt
+9-01 files

LLVM/project 7dcfba7.ci monolithic-linux.sh monolithic-windows.sh

revert monolithic
DeltaFile
+45-46.ci/monolithic-linux.sh
+12-14.ci/monolithic-windows.sh
+57-602 files

LLVM/project 44bddecclang/lib/ScalableStaticAnalysisFramework/Core CMakeLists.txt

fix AnalysisRegistry
DeltaFile
+5-0clang/lib/ScalableStaticAnalysisFramework/Core/CMakeLists.txt
+5-01 files

LLVM/project d46c19f. benchmark_build.sh

normalize script
DeltaFile
+10-81benchmark_build.sh
+10-811 files

LLVM/project cf643a1flang/lib/Optimizer/HLFIR/Transforms CMakeLists.txt, flang/lib/Optimizer/Transforms CMakeLists.txt

fix build errors
DeltaFile
+11-0flang/lib/Optimizer/Transforms/CMakeLists.txt
+10-0flang/lib/Optimizer/HLFIR/Transforms/CMakeLists.txt
+21-02 files

LLVM/project 0cd7789. benchmark_build.sh

measure memory too
DeltaFile
+13-39benchmark_build.sh
+13-391 files

LLVM/project ed4f58cmlir/include/mlir/Dialect/XeGPU/Transforms Transforms.h, mlir/lib/Dialect/XeGPU/Transforms XeGPUSubgroupDistribute.cpp XeGPUSgToWiDistributeExperimental.cpp

fix xegpu
DeltaFile
+2-17mlir/lib/Dialect/XeGPU/Transforms/XeGPUSubgroupDistribute.cpp
+2-16mlir/lib/Dialect/XeGPU/Transforms/XeGPUSgToWiDistributeExperimental.cpp
+15-0mlir/include/mlir/Dialect/XeGPU/Transforms/Transforms.h
+19-333 files

LLVM/project 0dfdd5aclang/lib/CIR/CodeGen CMakeLists.txt, flang/lib/Evaluate CMakeLists.txt

fix debug for all targets
DeltaFile
+19-0clang/lib/CIR/CodeGen/CMakeLists.txt
+1-15mlir/lib/Dialect/Affine/Transforms/DecomposeAffineOps.cpp
+14-0flang/lib/Evaluate/CMakeLists.txt
+8-0mlir/lib/Dialect/XeGPU/IR/CMakeLists.txt
+7-0flang/lib/Optimizer/CodeGen/CMakeLists.txt
+6-0mlir/examples/toy/Ch3/CMakeLists.txt
+55-1511 files not shown
+100-1517 files

LLVM/project b94bf5aclang-tools-extra/clangd/fuzzer CMakeLists.txt

LLVMFuzzerTestOneInput
DeltaFile
+3-0clang-tools-extra/clangd/fuzzer/CMakeLists.txt
+3-01 files

LLVM/project 71e6db9.ci monolithic-linux.sh monolithic-windows.sh

patch monolithic
DeltaFile
+46-44.ci/monolithic-linux.sh
+14-12.ci/monolithic-windows.sh
+60-562 files

LLVM/project 04f4908. benchmark_build.sh

Change iteration count from 10 to 2
DeltaFile
+1-1benchmark_build.sh
+1-11 files

LLVM/project 71285c7. benchmark_build.sh

measure memory too
DeltaFile
+44-20benchmark_build.sh
+44-201 files

LLVM/project 9778ac4. benchmark_build.sh

add benchmark script
DeltaFile
+99-0benchmark_build.sh
+99-01 files

LLVM/project 07be475. benchmark_build.sh

use time
DeltaFile
+29-10benchmark_build.sh
+29-101 files

LLVM/project ed7efd4clang/lib/StaticAnalyzer/Checkers NullabilityChecker.cpp MallocChecker.cpp, llvm/lib/LTO CMakeLists.txt

fix macros in release mode
DeltaFile
+3-1llvm/lib/LTO/CMakeLists.txt
+1-0llvm/lib/Target/X86/X86SpeculativeLoadHardening.cpp
+1-0clang/lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp
+1-0llvm/tools/llvm-rc/ResourceScriptParser.cpp
+1-0clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
+1-0llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
+8-16 files

LLVM/project af58268llvm/lib/CodeGen CMakeLists.txt, llvm/lib/CodeGen/SelectionDAG CMakeLists.txt

add comments
DeltaFile
+6-20llvm/lib/Transforms/Vectorize/CMakeLists.txt
+6-0llvm/lib/CodeGen/CMakeLists.txt
+3-0mlir/test/lib/Dialect/Affine/CMakeLists.txt
+3-0llvm/lib/CodeGen/SelectionDAG/CMakeLists.txt
+3-0llvm/lib/Target/RISCV/CMakeLists.txt
+3-0llvm/lib/Target/WebAssembly/CMakeLists.txt
+24-2050 files not shown
+82-2056 files

LLVM/project 3db55dbclang/lib/APINotes CMakeLists.txt, clang/lib/AST CMakeLists.txt

handle more projects
DeltaFile
+38-0clang/lib/CodeGen/CMakeLists.txt
+22-0clang/lib/Basic/CMakeLists.txt
+20-0polly/lib/CMakeLists.txt
+11-0clang/lib/AST/CMakeLists.txt
+11-0clang/lib/APINotes/CMakeLists.txt
+10-0llvm/tools/llvm-c-test/CMakeLists.txt
+112-036 files not shown
+346-042 files

LLVM/project 3a26be0llvm/lib/CodeGen CMakeLists.txt, llvm/lib/Target/AArch64 CMakeLists.txt

UNITY_BUILD
DeltaFile
+33-0llvm/utils/TableGen/CMakeLists.txt
+29-0llvm/lib/Transforms/Vectorize/CMakeLists.txt
+23-0mlir/tools/mlir-tblgen/CMakeLists.txt
+21-0llvm/lib/Target/AArch64/CMakeLists.txt
+21-0mlir/test/lib/IR/CMakeLists.txt
+20-0llvm/lib/CodeGen/CMakeLists.txt
+147-0448 files not shown
+984-0454 files

LLVM/project 11ece73llvm/lib/Transforms/Coroutines CoroElide.cpp CoroFrame.cpp, llvm/lib/Transforms/IPO Annotation2Metadata.cpp ArgumentPromotion.cpp

undo #undef
DeltaFile
+0-1llvm/lib/Transforms/Coroutines/CoroElide.cpp
+0-1llvm/lib/Transforms/Coroutines/CoroFrame.cpp
+0-1llvm/lib/Transforms/Coroutines/CoroSplit.cpp
+0-1llvm/lib/Transforms/Coroutines/SuspendCrossingInfo.cpp
+0-1llvm/lib/Transforms/IPO/Annotation2Metadata.cpp
+0-1llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
+0-6375 files not shown
+0-381381 files

LLVM/project 16083aellvm CMakeLists.txt, mlir/lib/Dialect/SparseTensor/IR/Detail LvlTypeParser.cpp DimLvlMapParser.cpp

use `after`
DeltaFile
+23-0llvm/CMakeLists.txt
+2-0mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorIterator.cpp
+2-0mlir/lib/Dialect/SparseTensor/IR/Detail/LvlTypeParser.cpp
+1-0mlir/lib/Dialect/SparseTensor/IR/Detail/DimLvlMapParser.cpp
+28-04 files

LLVM/project 494b982llvm/lib/CodeGen/SelectionDAG TargetLowering.cpp, llvm/test/CodeGen/RISCV/rvv vector-extract-last-active.ll

[TargetLowering][RISCV] Using index type for step vector in expandVectorFindLastActive (#187984)

This patch change the type of the step vector lowered from
`expandVectorFindLastActive` from `e8` to the index type of the target
machine.

This can help the index out of bound issue when the VLEN is large.

Note that after this patch, there are still some issue in
expandVectorFindLastActive.
DeltaFile
+218-89llvm/test/CodeGen/RISCV/rvv/vector-extract-last-active.ll
+2-1llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+220-902 files

LLVM/project 74ca057clang/lib/Analysis/FlowSensitive/Models UncheckedOptionalAccessModel.cpp, clang/unittests/Analysis/FlowSensitive UncheckedOptionalAccessModelTest.cpp MockHeaders.cpp

[clang][dataflow] Fix bugprone-unchecked-optional-access for recent changes to libcxx (#188044)

Fix for https://github.com/llvm/llvm-project/issues/187788

- When checking the receiver with an UncheckedDerivedToBase cast, just
check each component of the chain if we've hit the public optional
class, rather than rely on public vs private/protected inheritance. This
covers the case when the class derives from optional.
- or check if the SubExpr of the cast is already the public optional
type (when not deriving from optional -- since you won't see this first
layer in the cast chain).

See comment about why there is public inheritance to a private base
class at the moment:

https://github.com/llvm/llvm-project/issues/187788#issuecomment-4106543794

The performance doesn't seem much different in several benchmarks.
Perhaps because we first see if the method name matches, which filters a

    [7 lines not shown]
DeltaFile
+50-49clang/lib/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.cpp
+32-0clang/unittests/Analysis/FlowSensitive/UncheckedOptionalAccessModelTest.cpp
+16-14clang/unittests/Analysis/FlowSensitive/MockHeaders.cpp
+98-633 files

LLVM/project d734eadclang-tools-extra/clang-tidy/bugprone PointerArithmeticOnPolymorphicObjectCheck.cpp, clang-tools-extra/docs ReleaseNotes.rst

[clang-tidy] Fix false positive in cert-ctr56-cpp (PointerArithmeticOnPolymorphicObjectCheck) (#187452)

## Summary
This change adds `unless(isInstantiationDependent())` to the
`ArraySubscript` matcher.

## Motivation
In template code, some array subscript expressions are not fully
resolved yet.
Because of this, the matcher may treat them incorrectly and produce
false positives.

## Change
This patch skips instantiation-dependent expressions in templates. 
It helps the matcher work only on resolved expressions.

Closes https://github.com/llvm/llvm-project/issues/187009.
DeltaFile
+12-0clang-tools-extra/test/clang-tidy/checkers/bugprone/pointer-arithmetic-on-polymorphic-object-all.cpp
+3-1clang-tools-extra/clang-tidy/bugprone/PointerArithmeticOnPolymorphicObjectCheck.cpp
+4-0clang-tools-extra/docs/ReleaseNotes.rst
+19-13 files

LLVM/project 79ae4c7llvm/lib/Object ELF.cpp

[Object] Normalize BBAddrMap decode address types in ELF (#187962)

This is part of patches to port BBAddrMap to COFF.

DataExtractor::getAddress reads 4 or 8 bytes according to AddressSize and
returns a uint64_t container value. This code path already sets AddressSize
from ELFT::Is64Bits and stores range/function addresses as uint64_t.

Replace temporary uintX_t/unsigned values in this decoder path with uint64_t
and remove the redundant cast from getAddress(). This preserves behavior for
ELF32/ELF64 inputs.

This is a preparatory step for extracting a format-agnostic BBAddrMap decoder.
DeltaFile
+8-8llvm/lib/Object/ELF.cpp
+8-81 files

LLVM/project 7fc3d6ellvm/include/llvm/ADT PointerUnion.h

[llvm][ADT] Refactor PointerUnion to use PunnedPointer. NFC. (#187950)

Replace `PointerIntPair`-based storage with raw `PunnedPointer<void*>`
and explicit tag encoding. The bit layout stay identical. Use constexpr
functions (`minBits`, `tagBits`, `tagShift`) whose bodies are only
instantiated when called, for incomplete-type compatibility

The goal is to prepare `PointerUnion` for future extension to support
variable-length encoding and allow for more variants than with simple
tags, which will require direct bit manipulation not possible with
`PointerIntPair`.

I benchmarked this with https://github.com/llvm/llvm-project/pull/187874
and the performance is identical on my system.

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply at anthropic.com>
DeltaFile
+144-123llvm/include/llvm/ADT/PointerUnion.h
+144-1231 files

LLVM/project 6a8a100compiler-rt/cmake base-config-ix.cmake

[compiler-rt] Error only if sanitizer builds are enabled (#187944)

This fix is to error out only if sanitizer builds are enabled as opposed
to forcing flang to use an option or install the development package.
DeltaFile
+6-5compiler-rt/cmake/base-config-ix.cmake
+6-51 files

LLVM/project 0e5e434mlir/lib/Dialect/Affine/IR AffineOps.cpp, mlir/test/Dialect/Affine ops.mlir

[affine] Support xori/maxnumf/minnumf reduction types. (#184450)

This is a follow-up on #163310, which supported the above reduction
kinds, but did not update affine.parallel verification code.
DeltaFile
+40-0mlir/test/Dialect/Affine/ops.mlir
+4-4mlir/lib/Dialect/Affine/IR/AffineOps.cpp
+44-42 files