LLVM/project d8331ballvm/lib/Transforms/Vectorize LoopVectorize.cpp, llvm/test/Transforms/LoopVectorize/VPlan conditional-scalar-assignment-vplan.ll icmp-uniforms.ll

[LV][VPlan] Print VPlan after construction and initial optimizations. NFC (#187443)

This patch add a helper pass `printOptimizedVPlan` to print the plan at
the end of the VPlan construction and optimize pipeline.

This patch enables the opportunity that we can further clamp and attach
VF range after `VPlanTransforms::optimize` and not changing the test
printing (#172799).
DeltaFile
+5-0llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+2-2llvm/test/Transforms/LoopVectorize/VPlan/X86/vplan-vp-intrinsics.ll
+2-2llvm/test/Transforms/LoopVectorize/VPlan/conditional-scalar-assignment-vplan.ll
+1-1llvm/test/Transforms/LoopVectorize/VPlan/icmp-uniforms.ll
+1-1llvm/test/Transforms/LoopVectorize/VPlan/interleave-and-scalarize-only.ll
+1-1llvm/test/Transforms/LoopVectorize/VPlan/phi-with-fastflags-vplan.ll
+12-714 files not shown
+26-2020 files

LLVM/project c9fd0dbllvm/cmake/modules LLVMExternalProjectUtils.cmake, llvm/utils/release build_llvm_release.bat

[CMake] Pass ZLIB_LIBRARY_* to runtimes bootstrap (#191555)

Runtimes external project (compiler-rt / combined runtimes) reconfigures
with an initial cache that did not propagate `ZLIB_LIBRARY_RELEASE`.
CMake 4.x `FindZLIB` may leave `ZLIB_LIBRARY` unset while finding
headers, leading to:
```
   -- Could NOT find ZLIB (missing: ZLIB_LIBRARY) (found version "...")
```
and later when loading LLVM exports from the main build:
```
   The link interface of target "LLVMSupport" contains: ZLIB::ZLIB
   but the target was not found.
```
This was found by building the Windows installer with:
```
llvm\utils\release\build_llvm_release.bat --x64 --version 23.0.0 --skip-checkout --local-python
```
DeltaFile
+2-0llvm/cmake/modules/LLVMExternalProjectUtils.cmake
+2-0llvm/utils/release/build_llvm_release.bat
+4-02 files

LLVM/project f09850aflang/lib/Optimizer/CodeGen CodeGen.cpp, flang/test/Fir/CUDA cuda-code-gen.mlir

[flang][CodeGen] Fix address space mismatch for CUF globals in AddrOfOpConversion (#190408)

AddrOfOpConversion in CodeGen.cpp only handled `LLVM::GlobalOp` when
determining the address space for `llvm.mlir.addressof`. When the global
was still a `fir::GlobalOp` (not yet converted), it fell back to address
space 0, breaking CUF constant globals (addr_space 4) and AMDGPU targets
(global addr_space 1).

This extends the upstream fix (#192111, which only covered Constant) to
also handle Shared and Managed CUF data attributes, and returns
`std::nullopt` instead of 0 for non-CUF globals so the target's default
address space is preserved.
DeltaFile
+34-20flang/lib/Optimizer/CodeGen/CodeGen.cpp
+43-1flang/test/Fir/CUDA/cuda-code-gen.mlir
+77-212 files

LLVM/project 21508ceclang/unittests/Analysis/FlowSensitive UncheckedStatusOrAccessModelTestFixture.cpp

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+15-0clang/unittests/Analysis/FlowSensitive/UncheckedStatusOrAccessModelTestFixture.cpp
+15-01 files

LLVM/project 8d0997flldb/packages/Python/lldbsuite/test lldbutil.py

[lldb][debugserver] Fix lldb testsuite routine parsing logs (#192157)

I changed how lldb and debugserver fetch binaries when attaching to a
process (only fetching the addresses of binaries, not the detailed
information) but a utility function was parsing the log file and
expected the detailed information in the initial response. Updated it to
expect detailed information in the initial response, or in the
subsequent query when the first response is addresses-only.
DeltaFile
+39-5lldb/packages/Python/lldbsuite/test/lldbutil.py
+39-51 files

LLVM/project af9ebd2llvm/lib/Target/BPF BTFDebug.cpp BPFISelLowering.cpp, llvm/test/CodeGen/BPF warn-call.ll

Fixes for compile rust code (#192134)

Signed-off-by: Alexei Starovoitov <ast at kernel.org>
Co-authored-by: Alexei Starovoitov <ast at kernel.org>
DeltaFile
+38-0llvm/test/CodeGen/BPF/BTF/char-utf.ll
+32-0llvm/test/CodeGen/BPF/BTF/array-no-dimension.ll
+8-0llvm/lib/Target/BPF/BTFDebug.cpp
+2-3llvm/test/CodeGen/BPF/warn-call.ll
+2-1llvm/lib/Target/BPF/BPFISelLowering.cpp
+82-45 files

LLVM/project 282b272clang/lib/CIR/CodeGen CIRGenExpr.cpp, clang/test/CIR/CodeGen cast-cxx20.cpp

[CIR] Implement array-to-incomplete-array cast (#192138)

This is a noop cast that is allowed in some situations in C++20, and is
validated with one of the test suites. This patch adds a very defensive
NYI diagnostic to replace the other one, plus implements the array decay
case.
DeltaFile
+55-0clang/test/CIR/CodeGen/cast-cxx20.cpp
+15-3clang/lib/CIR/CodeGen/CIRGenExpr.cpp
+70-32 files

LLVM/project 18519f3lld/COFF DriverUtils.cpp, lld/test/COFF subsystem.test

[lld][llvm-objcopy] Enable Xbox subsystem for PE images. (#191779)

This patch enables selecting the Xbox subsystem (IMAGE_SUBSYSTEM_XBOX)
for PE images. Certain existing tools used in the Xbox homebrew scene
expect images to use the Xbox subsystem, so it's nice to be able to set
this within the LLVM toolchain instead of invoking yet another tool or
manually patching the binaries.
DeltaFile
+13-11lld/COFF/DriverUtils.cpp
+10-0lld/test/COFF/subsystem.test
+5-0llvm/test/tools/llvm-objcopy/COFF/subsystem.test
+1-0llvm/tools/llvm-objcopy/ObjcopyOptions.cpp
+29-114 files

LLVM/project 392f76aflang/include/flang/Optimizer/Support Utils.h, flang/lib/Optimizer/Analysis AliasAnalysis.cpp

[flang] Recognize generic allocations in Flang LICM. (#191923)

Instead of matching particular operations like `fir.alloca`
we can use `MemoryEffectOpInterface` to figure out if a location
is a new allocation.
DeltaFile
+59-0flang/test/Transforms/licm-allocmem-cufaloc.mlir
+15-23flang/lib/Optimizer/Analysis/AliasAnalysis.cpp
+12-9flang/lib/Optimizer/Transforms/LoopInvariantCodeMotion.cpp
+17-0flang/lib/Optimizer/Support/Utils.cpp
+7-0flang/include/flang/Optimizer/Support/Utils.h
+110-325 files

LLVM/project 5d7a143clang/lib/StaticAnalyzer/Core AnalyzerOptions.cpp, clang/unittests/StaticAnalyzer AnalyzerFormattingTest.cpp CMakeLists.txt

[analyzer] Fix alignment of entries in -analyzer-help (#190570)

Fix a formatting bug in `AnalyzerOptions::printFormattedEntry` (used by
`clang -cc1 -print-analyzer-options`), which led to misalignment of a
checker description.

This commit ensures that `printFormattedEntry` inserts a newline in the
corner case when the length of the name of a checker is exactly equal to
`EntryWidth`. (In this situation the old code inserted a space between
the name and the description, so this description was not aligned with
the other descriptions.)

Additionally this commit also fixes the corner case where the pad before
the checker name (specified by `InitialPad`) is 0. Before the fix, due
to `llvm::raw_formatted_ostream::PadToColumn` logic, `InitialPad = 0`
still added one space character as padding before the checker name.
Fortunately `InitialPad = 0` was never used in the program, so this bug
was not visible to the user.

These changes are both tested by the freshly added unit tests.
DeltaFile
+187-0clang/unittests/StaticAnalyzer/AnalyzerFormattingTest.cpp
+8-3clang/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp
+1-0clang/unittests/StaticAnalyzer/CMakeLists.txt
+196-33 files

LLVM/project 18ab520llvm/lib/Target/RISCV/MCTargetDesc RISCVMatInt.cpp, llvm/test/CodeGen/RISCV rv32p.ll rv64p.ll

[RISCV][P-ext] Support plui.h/w in generateInstSeqImpl. (#192137)

There's some overlap in the pli/plui encodings. I've modified the code
to prefer pli.b over pli.h and to prefer pli.h over plui.h. This matches
what we do in the splat_vector path in RISCVISelDAGToDAG.
DeltaFile
+31-19llvm/lib/Target/RISCV/MCTargetDesc/RISCVMatInt.cpp
+14-6llvm/test/CodeGen/RISCV/rv32p.ll
+16-0llvm/test/CodeGen/RISCV/rv64p.ll
+8-0llvm/test/MC/RISCV/rv64p-aliases-valid.s
+4-0llvm/test/MC/RISCV/rv32p-aliases-valid.s
+73-255 files

LLVM/project c24bb1ccompiler-rt/lib/sanitizer_common sanitizer_posix_libcdep.cpp

[sanitizer] Generalize FD closing in StartSubprocess (#192114)

Use internal_close_range with a fallback to the sysconf(_SC_OPEN_MAX)
loop. This removes the platform-specific #if and lets all platforms
benefit from close_range when supported.

Follow-up to #191971.
DeltaFile
+4-5compiler-rt/lib/sanitizer_common/sanitizer_posix_libcdep.cpp
+4-51 files

LLVM/project 3b4731fllvm/include/llvm/Analysis FunctionPropertiesAnalysis.h InstCount.h

Make Passes Required - func-properties-stats and instcount (#192130)

These passes count different types of instructions and we want to see
them even though optnone is enabled
DeltaFile
+2-0llvm/include/llvm/Analysis/FunctionPropertiesAnalysis.h
+2-0llvm/include/llvm/Analysis/InstCount.h
+4-02 files

LLVM/project c891843llvm/lib/Target/AMDGPU SIInstructions.td, llvm/test/CodeGen/AMDGPU sub.v2i16.ll add.v2i16.ll

[AMDGPU] Add true16 patterns for build_vector (vgpr, 0)

It is shorter than VOP3 and instruction and in some cases
can save a second move.
DeltaFile
+8-10llvm/test/CodeGen/AMDGPU/sub.v2i16.ll
+8-10llvm/test/CodeGen/AMDGPU/add.v2i16.ll
+4-8llvm/test/CodeGen/AMDGPU/flat-saddr-load.ll
+7-5llvm/test/CodeGen/AMDGPU/fcanonicalize.f16.ll
+10-0llvm/lib/Target/AMDGPU/SIInstructions.td
+2-8llvm/test/CodeGen/AMDGPU/divergence-driven-buildvector.ll
+39-414 files not shown
+48-5010 files

LLVM/project 8d734fdllvm/lib/CodeGen MachineFunction.cpp

Added better datalayout incompatible error message (#191862)

The existing datalayout incompatible error assert does not help with
debugging, as it does not print the datalayouts in question.

This change makes this failure give more useful information.
DeltaFile
+9-3llvm/lib/CodeGen/MachineFunction.cpp
+9-31 files

LLVM/project 8b054e8flang/lib/Lower ConvertVariable.cpp, flang/test/Lower/OpenACC acc-declare-use-associated.f90

[flang][OpenACC] Propagate acc.declare attribute to fir.global for USEd module variables (#192141)

When a module with `!$acc declare` is compiled separately from the
program that USEs it, `declareGlobal()` creates `fir.global` without the
`acc.declare` attribute. This causes implicit data mappings to override
device data that should already be present via `acc declare`.

The fix reads the symbol's `AccDeclare`/`AccCreate`/`AccCopyIn`/etc.
flags (already set from the `.mod` file by semantics) and attaches the
`acc.declare` attribute to the `fir.global`.
DeltaFile
+38-3flang/lib/Lower/ConvertVariable.cpp
+29-0flang/test/Lower/OpenACC/acc-declare-use-associated.f90
+67-32 files

LLVM/project 104b63bclang/lib/CIR/Lowering/DirectToLLVM LowerToLLVM.cpp

[CIR] Fix heap-use-after-free in IndirectBrOp lowering (#191949)

The previous code called op->getBlock()->eraseArgument(0) to remove a
block argument when the poison attribute was set (unreachable block with
no predecessors). This directly mutated the IR, freeing the
BlockArgument while the MLIR dialect conversion framework still held
references to it. When the framework later replayed changes in
applyRewrites(), it dereferenced the freed BlockArgument, causing a
heap-use-after-free detected by ASAN.

Found by running check-clang-cir under ASAN
(test: clang/test/CIR/CodeGen/label-values.c).

The fix removes the eraseArgument call entirely. The MLIR conversion
framework tracks block arguments and handles their lifecycle. A block
with no predecessors naturally produces no PHI node in LLVM IR, so
manual removal was unnecessary.

Additional cleanup:

    [4 lines not shown]
DeltaFile
+11-21clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+11-211 files

LLVM/project ce170c9llvm/lib/Target/AArch64 AArch64TargetTransformInfo.cpp

[AArch64] Cleanup of fptosi costs. NFC (#192144)

This contains some minor formatting changes, along with moving some code
closer
to where it belongs - keeping fixed length costs together, moving a
WideTy
block before the definition and use of ConversionTbl.
DeltaFile
+33-31llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
+33-311 files

LLVM/project 2fe82e3llvm/test/TableGen/GlobalISelEmitter GlobalISelEmitter.td, llvm/utils/TableGen/Common/GlobalISel GlobalISelMatchTable.cpp

[GlobalISel] use constexpr LLT types when creating ISel data (#191574)

The GlobalISel uses a lookup table to map LLTs which is constructed
prior to initialization of extended LLT functionality, resulting in
ANY_SCALAR entries. During instruction selection, a hash-based
lookup is done on actual INTEGER/FLOAT LLTs. But hash values of
ANY_SCALAR do not match those of INTEGER/FLOAT, causing a failure.

Workaround is the use constexpr LLT, which encodes INTEGER/FLOAT LLT.

Assisted-by: Claude Opus 4.6
DeltaFile
+31-26llvm/utils/TableGen/Common/GlobalISel/GlobalISelMatchTable.cpp
+2-2llvm/test/TableGen/GlobalISelEmitter/GlobalISelEmitter.td
+33-282 files

LLVM/project 977c60fclang/test/Sema/aarch64-sve2p3-intrinsics acle_sve2p3_target_lane.c acle_sve2p3_target.c, llvm/lib/Target/AArch64 AArch64SVEInstrInfo.td AArch64InstrInfo.td

fixup! Move tests
DeltaFile
+0-54clang/test/Sema/aarch64-sve2p3-intrinsics/acle_sve2p3_target_lane.c
+38-3clang/test/Sema/aarch64-sve2p3-intrinsics/acle_sve2p3_target.c
+1-1llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
+1-0llvm/lib/Target/AArch64/AArch64InstrInfo.td
+40-584 files

LLVM/project 08932ddclang-tools-extra/clang-tidy/modernize UseStdBitCheck.cpp UseStdBitCheck.h, clang-tools-extra/docs/clang-tidy/checks/modernize use-std-bit.rst

[clang-tidy] Detect std::rot[lr] pattern within modernize.use-std-bit (#186324)

Basically turning `x << N | x >> (64 - N)` into `std::rotl(x, N)`.
DeltaFile
+108-1clang-tools-extra/test/clang-tidy/checkers/modernize/use-std-bit.cpp
+71-2clang-tools-extra/clang-tidy/modernize/UseStdBitCheck.cpp
+27-0clang-tools-extra/docs/clang-tidy/checks/modernize/use-std-bit.rst
+1-0clang-tools-extra/clang-tidy/modernize/UseStdBitCheck.h
+207-34 files

LLVM/project 4d33826flang/lib/Optimizer/Transforms LoopInvariantCodeMotion.cpp, flang/test/Transforms/CUF cuf-kernel-licm.fir

[flang] Fixed issues in nested LICM. (#192117)

First change is to check the hoisting safety for all nested
operations of the candidate. This prevents hoistings of
region operations as in the added test.

When hoisting operations from nested regions we have to
check every parent region for `canMoveOutOf`, otherwise,
illegal hoisting may happen. This second change is NFC,
because all operations that support `OperationMoveOpInterface`
currently also support `LoopLikeOpInterface` and their regions
are not considered for nested hoisting. Anyway, it is worth
fixing it.
DeltaFile
+36-1flang/lib/Optimizer/Transforms/LoopInvariantCodeMotion.cpp
+34-0flang/test/Transforms/CUF/cuf-kernel-licm.fir
+70-12 files

LLVM/project 1733c13llvm/lib/Transforms/Vectorize VPlanTransforms.cpp LoopVectorize.cpp, llvm/test/Transforms/LoopVectorize/VPlan vplan-print-after-all.ll

[NFC][VPlan] Split `makeMemOpWideningDecisions` into subpasses

The idea is to have handling of strided memory operations (either from
https://github.com/llvm/llvm-project/pull/147297 or for VPlan-based
multiversioning for unit-strided accesses) done after some mandatory
processing has been performed (e.g., some types **must** be scalarized)
but before legacy CM's decision to widen (gather/scatter) or scalarize
has been committed.

And in longer term, we can uplift all other memory widening decision to
be done here directly at VPlan level. I expect this structure would also
be beneficial for that.
DeltaFile
+72-30llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+0-10llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+10-0llvm/lib/Transforms/Vectorize/VPlanTransforms.h
+3-0llvm/test/Transforms/LoopVectorize/VPlan/vplan-print-after-all.ll
+85-404 files

LLVM/project 214f2declang/docs ReleaseNotes.rst, clang/lib/Sema SemaTemplateDeductionGuide.cpp

[clang] Fix assertion crash in CTAD for alias templates with non-dependent type (#191885)

When building deduction guides, clang assumes that the return type of
the deduction guide would always be a dependent type
(`TemplateSpecializationType`), but this is not true for invalid case,
where the alias RHS is a non-dependent class template specialization, it
is represented as a `RecordType` instead.

Fixes #190517.
DeltaFile
+13-2clang/lib/Sema/SemaTemplateDeductionGuide.cpp
+10-0clang/test/SemaCXX/cxx20-ctad-type-alias.cpp
+1-0clang/docs/ReleaseNotes.rst
+24-23 files

LLVM/project 64ad8dbllvm/include/llvm/IR IntrinsicsAArch64.td, llvm/lib/Target/AArch64 AArch64ISelDAGToDAG.cpp

fixup! Fix PR comments
DeltaFile
+24-70llvm/test/CodeGen/AArch64/sme2p3-intrinsics-luti6.ll
+19-55llvm/test/Verifier/AArch64/luti6-intrinsics.ll
+17-36llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
+15-33llvm/test/CodeGen/AArch64/sve2p3-intrinsics-luti6.ll
+0-1llvm/include/llvm/IR/IntrinsicsAArch64.td
+75-1955 files

LLVM/project 2a11612clang/include/clang/Basic arm_sve.td, clang/test/Sema/aarch64-sme2p3-intrinsics acle_sme2p3_target_lane.c acle_sme2p3_target.c

fixup! Address more PR comments
DeltaFile
+15-9clang/test/Sema/aarch64-sve2p3-intrinsics/acle_sve2p3_target_lane.c
+0-16clang/test/Sema/aarch64-sme2p3-intrinsics/acle_sme2p3_target_lane.c
+5-5llvm/test/CodeGen/AArch64/sme2p3-intrinsics-luti6.ll
+3-3clang/test/Sema/aarch64-sme2p3-intrinsics/acle_sme2p3_target.c
+1-4llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
+4-0clang/include/clang/Basic/arm_sve.td
+28-371 files not shown
+28-387 files

LLVM/project 85c4559clang/test/Sema/aarch64-sve2p3-intrinsics acle_sve2p3_target_lane.c acle_sve2p3_imm.cpp, llvm/test/CodeGen/AArch64 sve2p3-intrinsics-luti6.ll

fixup! Add some more _bf16 tests
DeltaFile
+27-0clang/test/Sema/aarch64-sve2p3-intrinsics/acle_sve2p3_target_lane.c
+11-0llvm/test/CodeGen/AArch64/sve2p3-intrinsics-luti6.ll
+3-0clang/test/Sema/aarch64-sve2p3-intrinsics/acle_sve2p3_imm.cpp
+41-03 files

LLVM/project 57623f7clang/include/clang/Basic arm_sme.td arm_sve.td, clang/test/CodeGen/AArch64/sme2p3-intrinsics acle_sme2p3_luti6.c

fixup! Fix more PR comments
DeltaFile
+10-13llvm/include/llvm/IR/IntrinsicsAArch64.td
+4-4clang/test/CodeGen/AArch64/sme2p3-intrinsics/acle_sme2p3_luti6.c
+2-2clang/include/clang/Basic/arm_sme.td
+1-1clang/include/clang/Basic/arm_sve.td
+17-204 files

LLVM/project 60e0cedclang/lib/Sema SemaARM.cpp, clang/test/Sema/aarch64-sve2p3-intrinsics acle_sve2p3_target_lane.c

fixup! More small PR fixes
DeltaFile
+0-44llvm/test/Verifier/AArch64/luti6-intrinsics.ll
+6-9llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
+5-8llvm/test/CodeGen/AArch64/sve2p3-intrinsics-luti6.ll
+8-1clang/test/Sema/aarch64-sve2p3-intrinsics/acle_sve2p3_target_lane.c
+1-4llvm/test/CodeGen/AArch64/sme2p3-intrinsics-luti6.ll
+1-2clang/lib/Sema/SemaARM.cpp
+21-682 files not shown
+23-698 files

LLVM/project 4e5be09clang/include/clang/Basic arm_sve.td arm_sme.td, clang/test/CodeGen/AArch64/sme2p3-intrinsics acle_sme2p3_luti6.c

fixup! Adjust `def`s and split out tests
DeltaFile
+0-158clang/test/CodeGen/AArch64/sve2p3-intrinsics/acle_sve2p3_luti6.c
+138-0clang/test/CodeGen/AArch64/sve2p3-intrinsics/acle_sve2p3_luti6_lane_x2.c
+5-5clang/test/CodeGen/AArch64/sme2p3-intrinsics/acle_sme2p3_luti6.c
+0-4clang/include/clang/Basic/arm_sve.td
+1-0clang/include/clang/Basic/arm_sme.td
+144-1675 files