LLVM/project 903cf72clang/docs ReleaseNotes.md, clang/include/clang/Basic DiagnosticSemaKinds.td

[Clang][Sema] Improve diagnostic when using imag with non complex as lvalue (#223510)

Improve the Clang diagnostic when the unary `__imag` operator with a
non-complex type operand is used as an lvalue

Issue #222383
DeltaFile
+14-4clang/test/SemaCXX/imag-lvalue-with-non-complex-operand.cpp
+12-1clang/lib/Sema/SemaExpr.cpp
+2-0clang/include/clang/Basic/DiagnosticSemaKinds.td
+2-0clang/docs/ReleaseNotes.md
+30-54 files

LLVM/project 67e0140libc/test/src/mathvec CMakeLists.txt sinf_test.cpp

[libc][mathvec] Fix sinf unit test failures (#224339)

Since mathvec compares directly to the scalar math result, and scalar
sinf has a specific LIBC_MATH_HAS_INTERMEDIATE_COMP_IN_FLOAT
implementation. Mathvec unit tests fail when that flag is set, as there
is currently no mathvec equivalent.

This patch disables the sinf unit tests when the
LIBC_MATH_HAS_INTERMEDIATE_COMP_IN_FLOAT flag is set until such
implementation is created.
DeltaFile
+5-0libc/test/src/mathvec/sinf_test.cpp
+1-0libc/test/src/mathvec/CMakeLists.txt
+6-02 files

LLVM/project a1eae51lldb/source/Target AssertFrameRecognizer.cpp, lldb/test/Shell/Recognizer assert.test

[lldb][windows] add assert frame recognizer Windows (#224269)

This patch implements `AssertFrameRecognizer` on Windows.

Since the Windows C Runtime can be either statically or dynamically
linked, lldb can't match the module name to be able to support both.
Therefore, the matches on `abort` and `_wassert` do not check the name
of the module.

The `assert.test` test was also relaxed to check the Windows error
format (`Exception 0xc0000409`), since Windows surfaces `__fastfail` as
a `STATUS_STACK_BUFFER_OVERRUN` exception rather than a POSIX signal.

rdar://175328961

---

This relands https://github.com/llvm/llvm-project/pull/197282, reverted
in https://github.com/llvm/llvm-project/pull/198263 for two buildbot

    [13 lines not shown]
DeltaFile
+40-13lldb/source/Target/AssertFrameRecognizer.cpp
+4-3lldb/test/Shell/Recognizer/assert.test
+44-162 files

LLVM/project 2300b04llvm/lib/CodeGen RegisterPressure.cpp, llvm/test/CodeGen/AMDGPU schedule-pressure-dead-superreg-live-subreg.mir

Partially revert "RegisterPressure: Remove dead defs correctly"

This partially reverts the lane-mask collector change from #222627
(bde5e74309f6). That flipped the dead-def reconciliation in both
RegisterOperandsCollector::collectInstr (register units) and
collectInstrLanes (lane masks). Instead of removing units covered by a
live def from the dead def set, it removed units covered by a dead def
from the live def set.

The flip regressed targets that track subregister liveness, which use the
lane-mask collector path. When a live sub-register def overlaps a dead
super-register def, the shared register unit is flagged live on one
operand and dead on another. Removing the live def then drops the
genuinely-live unit, so the cached PressureDiff under-counts it and trips
the EXPENSIVE_CHECKS pressure cross-check in GCNSchedStrategy.

Restore the original lane-mask path while keeping the new behavior on the
register-unit path, which is enough to preserve the X86 fixes from #222627.
This is a targeted workaround. Deadness here is still taken from the operand

    [7 lines not shown]
DeltaFile
+34-0llvm/test/CodeGen/AMDGPU/schedule-pressure-dead-superreg-live-subreg.mir
+3-5llvm/lib/CodeGen/RegisterPressure.cpp
+37-52 files

LLVM/project e172357lldb/test/API/lang/objc/ivar-IMP TestObjCiVarIMP.py, lldb/test/API/lang/objc/ptr_refs TestPtrRefsObjC.py

[LLDB] Simplify LLDB test launches with lldbutil (NFC) (#224175)
DeltaFile
+1-21lldb/test/API/lang/objc/ptr_refs/TestPtrRefsObjC.py
+3-14lldb/test/API/lang/objc/ivar-IMP/TestObjCiVarIMP.py
+4-352 files

LLVM/project 5678ca9flang/lib/Evaluate fold-integer.cpp, flang/lib/Semantics expression.cpp

[flang][semantics] Diagnose numeric storage size on use (#220779)

Only give a warning about NUMERIC_STORAGE_UNIT when it is actually used.
Prevents warnings about it's not well defined status from popping up
when it has been excluded from or is just imported by happenstance.
DeltaFile
+121-0flang/test/Semantics/numeric_storage_size_only.f90
+74-0flang/lib/Semantics/expression.cpp
+0-7flang/lib/Evaluate/fold-integer.cpp
+4-2flang/test/Semantics/numeric_storage_size.f90
+199-94 files

LLVM/project ba1eae7libc/hdr/types struct_group.h, libc/src/grp CMakeLists.txt grp_utils.h

[libc] Add struct group header and group line parser (#224208)

Introduce the POSIX struct group header and grp_utils parser module for
colon-delimited group records.

Unlike struct passwd, struct group carries a null-terminated char**
member pointer array (gr_mem). parse_line<struct group> handles placing
the gr_mem pointer array into the aligned scratch span directly:
* Fixed-buffer callers (such as reentrant lookups) report ERANGE if the
provided scratch span cannot hold the member pointers.
* Growable DynamicBuffer callers grow the buffer when parse_line returns
ERANGE and retry before parsing in place.

* Add struct_group header in hdr/types/struct_group.h
* Expose libc.include.grp in Linux arm and i386 headers.txt
* Add grp_utils parser and database helpers in src/grp/
* Add unit tests in test/src/grp/grp_utils_test.cpp

Assisted-by: Automated tooling, human reviewed.
DeltaFile
+202-0libc/src/grp/grp_utils.cpp
+191-0libc/test/src/grp/grp_utils_test.cpp
+50-0libc/src/grp/grp_utils.h
+29-0libc/src/grp/CMakeLists.txt
+27-0libc/hdr/types/struct_group.h
+21-0libc/test/src/grp/CMakeLists.txt
+520-05 files not shown
+533-111 files

LLVM/project 6396f14llvm/lib/CodeGen TargetRegisterInfo.cpp, llvm/lib/Target/AArch64 AArch64RegisterInfo.cpp

[CodeGen][AArch64] Avoid duplicate hints in register allocation (#219007)

Duplicate register allocation hints cause AllocationOrder to yield
duplicate physical register candidates. For fixed-capacity eviction
advisors like MLEvictAdvisor (MaxInterferences = 32), this leads to
out-of-bounds array indexing and assertion failures.
    
In commit 0756e5985f0c, TargetRegisterInfo::getRegAllocationHints was
hoisted to the top of AArch64RegisterInfo::getRegAllocationHints, but
fallthrough paths invoked it a second time on an already-populated Hints
vector, duplicating copy hints for standard GPRs.
    
This patch:
1. Returns ConsiderOnlyHints on fallthrough in
  AArch64RegisterInfo::getRegAllocationHints instead of calling
  TargetRegisterInfo::getRegAllocationHints a second time.
2. In TargetRegisterInfo::getRegAllocationHints, deduplicates directly
    against Hints instead of using a transient local set.
3. Adds regression test coverage for AArch64 MLRegAlloc eviction

    [9 lines not shown]
DeltaFile
+54-0llvm/test/CodeGen/MLRegAlloc/aarch64-evict-advisor-duplicate-hints.ll
+46-0llvm/unittests/Target/AArch64/AArch64RegisterInfoTest.cpp
+6-6llvm/lib/CodeGen/TargetRegisterInfo.cpp
+3-6llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp
+109-124 files

LLVM/project c84a548.ci all_requirements.txt, mlir/python requirements.txt

[CI] Bump python dependencies (#224349)

Otherwise when we try the upgrade to ubuntu 24.04 we end up rebuilding
some packages that have native artifacts that don't have prebuilt
packages on pypi for Python 3.14. This is slow and also causes issues as
some necessary features are not enabled like the CLoader submodule of
PyYAML.
DeltaFile
+602-459.ci/all_requirements.txt
+1-1mlir/python/requirements.txt
+603-4602 files

LLVM/project 9bc655dclang/include/clang/Basic SourceLocation.h

Mix bits in FileID::getHashValue() (#223794)

FileID's identity hash was fine under DenseMap's old quadratic probing,
but #200595 switched DenseMap to linear probing with backward-shift
deletion. FileID's bucket index under an identity hash is just its low
bits, so two runs of file IDs can map to the same buckets, which can
turn into a long clustered probe chain under linear probing.

Multiply by 37 to spread the low bits, which matches
SourceLocation::getHashValue(). This fixes a 2.6x compile-time
regression observed with -Wdocumentation on an ObjC++ file.

rdar://187026883

Co-authored-by: Fred Riss <friss at apple.com>
DeltaFile
+4-1clang/include/clang/Basic/SourceLocation.h
+4-11 files

LLVM/project a968e44llvm/include/llvm/Support LLVMDriver.h Driver.h, llvm/lib/Support Driver.cpp

Revert "[Support] Add ToolSession for in-process tool invocation (#221996)"

This reverts commit c5c167c7436f035152289cb9489548ccf5328bb3.
DeltaFile
+0-131llvm/lib/Support/Driver.cpp
+0-127llvm/unittests/Support/LLVMToolSession/LLVMToolSessionTest.cpp
+0-96llvm/include/llvm/Support/Driver.h
+50-22llvm/tools/llvm-driver/llvm-driver.cpp
+27-0llvm/include/llvm/Support/LLVMDriver.h
+0-20llvm/unittests/Support/LLVMToolSession/CMakeLists.txt
+77-39631 files not shown
+105-43537 files

LLVM/project 606f039libc/src/pwd CMakeLists.txt pwd_utils.cpp, libc/test/src/pwd CMakeLists.txt getpwuid_test.cpp

[libc] Read passwd records into a growable buffer (#224149)

Switch getpwent, getpwnam, and getpwuid to use DynamicBuffer so that
passwd records of arbitrary length are supported without fixed size
limits.

A single static DynamicBuffer and struct passwd are reused across
getpwent, getpwnam, and getpwuid per POSIX, and endpwent closes the file
stream without freeing the buffer so pointers returned prior to endpwent
remain valid.

The reentrant lookups (getpwnam_r and getpwuid_r) remain non-allocating
and return ERANGE when the caller's buffer is too small.

* Switch non-reentrant pwd lookups and iteration to DynamicBuffer
* Remove fixed 1024-byte buffer limit from pwd_utils
* Keep getpwnam_r and getpwuid_r non-allocating
* Update hermetic unit tests for long passwd records

Assisted-by: Automated tooling, human reviewed.
DeltaFile
+88-19libc/test/src/pwd/getpwent_test.cpp
+62-12libc/test/src/pwd/getpwnam_test.cpp
+44-16libc/src/pwd/pwd_utils.cpp
+21-12libc/test/src/pwd/getpwuid_test.cpp
+8-0libc/test/src/pwd/CMakeLists.txt
+1-0libc/src/pwd/CMakeLists.txt
+224-596 files

LLVM/project edbba99llvm/utils/gn/secondary/llvm/lib/ExecutionEngine/Orc BUILD.gn

[gn build] Port 3f9ca800da7b (#224363)
DeltaFile
+0-1llvm/utils/gn/secondary/llvm/lib/ExecutionEngine/Orc/BUILD.gn
+0-11 files

LLVM/project 7dc56a7llvm/utils/gn/secondary/libcxx/include BUILD.gn

[gn build] Port 9e0686cca516 (#224364)
DeltaFile
+1-1llvm/utils/gn/secondary/libcxx/include/BUILD.gn
+1-11 files

LLVM/project 22be12fllvm/utils/gn/secondary/llvm/lib/Support BUILD.gn

[gn build] Port c5c167c7436f (#224365)
DeltaFile
+1-0llvm/utils/gn/secondary/llvm/lib/Support/BUILD.gn
+1-01 files

LLVM/project 63225d3libcxx/cmake/caches Generic-llvm-libc.cmake

[libcxx][libc] Update LLVM-libc/compiler-rt config (#224160)

The config libc++ uses to build with LLVM-libc uses compiler-rt, but
previously wasn't building the compiler-rt atomic library. This PR
updates the config to tell compiler-rt to build its atomic library.
DeltaFile
+1-0libcxx/cmake/caches/Generic-llvm-libc.cmake
+1-01 files

LLVM/project f080b55llvm/lib/Analysis ConstantFolding.cpp, llvm/test/Transforms/InstSimplify/ConstProp vecreduce.ll

[ConstantFolding] Fold vector.partial.reduce.add constants (#212112)

This patch adds constant folding support for `llvm.vector.partial.reduce.add`.

The intrinsic leaves the grouping of input elements into result lanes
unspecified. This implementation uses the deterministic grouping
selected by
the generic lowering in `TargetLowering::expandPartialReduceMLA`: input
element `I` is accumulated into result lane `I % NumAccElts`.

Tests cover:
* Constant accumulator and input vectors
* Non-constant accumulator and input operands
* Poison and undef elements
* Different reduction ratios
* Negative values
* Integer wraparound

Fixes #211558
DeltaFile
+101-0llvm/test/Transforms/InstSimplify/ConstProp/vecreduce.ll
+45-0llvm/lib/Analysis/ConstantFolding.cpp
+146-02 files

LLVM/project f873bf3clang/include/clang/AST ASTContext.h TypeBase.h, clang/lib/AST Type.cpp ASTContext.cpp

[BoundsSafety][NFC] Allow CountAttributedType's count to be filled in later (#223267)

Prepare CountAttributedType so its count expression can be supplied
after the node is created, which the new late-parsed counted_by
mechanism needs: the type is built when the attribute is seen, but its
argument isn't parsed until the enclosing record is complete.

- Drop the TrailingObjects coupled-decl storage in favour of an
ASTContext-allocated array held by the ArrayRef the base class already
has, so the decls can be attached after construction.
  - Add CountAttributedType::setCountExpr for in-place completion.
- Add ASTContext::getIncompleteCountAttributedType (count-less, not
uniqued) and completeCountAttributedType. Incomplete nodes are not
registered in ASTContext.Types until completed, so a node abandoned with
a null count is never reachable.

No functional change: getCountAttributedType still builds a
fully-formed, count-carrying type as before.


    [9 lines not shown]
DeltaFile
+47-5clang/lib/AST/ASTContext.cpp
+28-15clang/include/clang/AST/TypeBase.h
+39-3clang/lib/AST/Type.cpp
+16-0clang/include/clang/AST/ASTContext.h
+2-2clang/lib/Sema/SemaBoundsSafety.cpp
+132-255 files

LLVM/project 7e57486llvm/docs LangRef.md, llvm/lib/IR Verifier.cpp

[IR] Provide intrinsics for speculative loads (#179642)

Introduce two new intrinsics to enable vectorization of loops with early
exits that have potentially faulting loads.

1. `@llvm.speculative.load` - perform a load that may access memory
beyond the allocated object. It must be used in combination with 
`@llvm.can.load.speculatively` to ensure the load is guaranteed to not
trap. The number of accessible bytes must be provided, either as IR value
or via an oracle function.

2. `@llvm.can.load.speculatively` - Returns true if it's safe to
speculatively load a given number of bytes from a pointer. The semantics
are target-dependent. On some targets, this may check that the access
does not cross page boundaries, or stricter checks for example on
AArch64 with MTE, which limits the access size to 16 bytes.

`@llvm.speculative.load` is lowered to a regular load in SelectionDAG
without MODereferenceable.

    [15 lines not shown]
DeltaFile
+185-0llvm/test/Verifier/speculative-load.ll
+183-0llvm/test/CodeGen/AArch64/can-load-speculatively.ll
+162-0llvm/test/CodeGen/X86/speculative-load-intrinsic.ll
+157-0llvm/test/CodeGen/AArch64/speculative-load-intrinsic.ll
+132-0llvm/docs/LangRef.md
+66-0llvm/lib/IR/Verifier.cpp
+885-013 files not shown
+1,222-019 files

LLVM/project b0874d1llvm/include/llvm/CodeGen MachineInstr.h, llvm/include/llvm/CodeGen/GlobalISel GenericMachineInstrs.h GIMatchTableExecutorImpl.h

[GlobalISel] Drop poison flags by default in combiners (#218306)

GlobalISel TableGen combiners were implicitly copying poison-generating
flags from the root instruction to newly-created instructions. This is
unsafe because the replacement instruction may not preserve the same
`nuw`/`nsw` guarantees.

Drop those flags by default for combiners, while keeping explicit
`MIFlags` preservation intact.

Fixes #210470
DeltaFile
+29-4llvm/include/llvm/CodeGen/GlobalISel/GIMatchTableExecutorImpl.h
+23-0llvm/test/CodeGen/AArch64/GlobalISel/combine-integer.mir
+4-6llvm/include/llvm/CodeGen/GlobalISel/GenericMachineInstrs.h
+7-1llvm/utils/TableGen/GlobalISelCombinerEmitter.cpp
+5-0llvm/include/llvm/CodeGen/MachineInstr.h
+2-2llvm/test/TableGen/GlobalISelCombinerEmitter/pattern-parsing.td
+70-133 files not shown
+81-139 files

LLVM/project 45473e8clang/lib/Headers riscv_packed_simd.h, clang/test/CodeGen/RISCV rvp-intrinsics.c

[RISCV][P-ext] Support Packed Subvector Join (#224233)

This PR adds support for the Packed Subvector Join intrinsics:

- `__riscv_pjoin2_i8x8`
- `__riscv_pjoin2_u8x8`
- `__riscv_pjoin2_i16x4`
- `__riscv_pjoin2_u16x4`
DeltaFile
+90-0clang/test/CodeGen/RISCV/rvp-intrinsics.c
+28-0cross-project-tests/intrinsic-header-tests/riscv_packed_simd.c
+17-0clang/lib/Headers/riscv_packed_simd.h
+135-03 files

LLVM/project ed30183llvm/lib/Transforms/Vectorize LoopVectorizationPlanner.h LoopVectorize.cpp

[VPlan] Drop unused arg from addReductionResultComputation (NFC). (#224320)

The RecipeBuilder parameter is not used, remove it.
DeltaFile
+1-3llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h
+2-2llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+3-52 files

LLVM/project 3bb1615clang/lib/CIR/CodeGen CIRGenTypes.cpp, clang/test/CIR/CodeGen atomic-fn-nyi.c

[CIR] Report errorNYI for function signatures involving atomic types (#221371)

CIR currently has no way to represent atomic types. In most cases this
has no meaningful effect, but it can lead to incorrect argument and
return type classification during calling convention lowering. This
change adds a diagnostic when we are processing function signatures with
atomic types.

Assisted-by: Cursor / Grok 4.6
DeltaFile
+74-0clang/test/CIR/CodeGen/atomic-fn-nyi.c
+31-0clang/lib/CIR/CodeGen/CIRGenTypes.cpp
+105-02 files

LLVM/project 930aba6flang/lib/Lower Bridge.cpp, flang/test/Lower/OpenACC acc-loop-collapse-directive-between-loops.f90

[flang][OpenACC] Attach a source location to the skipped-directive warning (#224348)

Follow-up to #223579.

Fix the source location of "compiler directive ignored: it appears
between loop levels of a collapsed or tiled loop nest" warning. Harden
`flang/test/Lower/OpenACC/acc-loop-collapse-directive-between-loops.f90`
test.

Assisted-by: AI
DeltaFile
+41-4flang/test/Lower/OpenACC/acc-loop-collapse-directive-between-loops.f90
+9-3flang/lib/Lower/Bridge.cpp
+50-72 files

LLVM/project c5dbb77llvm/lib/Target/AArch64 AArch64.td AArch64ValidateRetiredNames.td, llvm/test/MC/AArch64 retired-names.s

fixup! Address CR comments; make this simpler
DeltaFile
+0-43llvm/test/TableGen/aarch64-retired-names.td
+0-37llvm/lib/Target/AArch64/AArch64ValidateRetiredNames.td
+18-0llvm/test/MC/AArch64/retired-names.s
+0-12llvm/lib/Target/AArch64/AArch64.td
+18-924 files

LLVM/project f545ee7clang/lib/CIR/CodeGen CIRGenCall.cpp, clang/lib/CIR/Dialect/IR CIRDialect.cpp

[CIR] Implement musttail cleanup handling (#224169)

A musttail call can occur within a cleanup scope if (and only if) the
cleanup is a lifetime end marker or a stack restore. These can be safely
omitted by a direct return such as is needed for a tail call.

This change adds error checking to verify that only these cleanups are
on the EH stack when a musttail call is encountered and updates the CFG
flattening pass to add special handling that avoids routing musttail
call returns through the cleanup handler.

Assisted-by: Cursor / claude-opus-5
DeltaFile
+219-0clang/test/CIR/Transforms/flatten-cleanup-scope-musttail.cir
+80-0clang/test/CIR/IR/invalid-cleanup-scope-musttail.cir
+52-5clang/test/CIR/CodeGen/attr-musttail.cpp
+46-9clang/lib/CIR/Dialect/Transforms/FlattenCFG.cpp
+40-0clang/lib/CIR/Dialect/IR/CIRDialect.cpp
+15-8clang/lib/CIR/CodeGen/CIRGenCall.cpp
+452-224 files not shown
+459-2210 files

LLVM/project 173a122llvm/lib/Target/WebAssembly WebAssemblySubtarget.h WebAssemblyTargetMachine.h

WebAssembly: Partially clean up subtarget construction (#224307)

There should be just one getSubtargetImpl(Function&) override like every
other target, but this is relying on the global subtarget. Remove the
argumentless form since it's unnecessary.
WebAssemblyCoalesceFeaturesAndStripAtomics doesn't really need to
construct a full new subtarget for its purpose and can directly take the global
subtarget feature bits. This pass is also doing quite a lot of other bad things,
like mutating the TargetMachine.

Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
DeltaFile
+12-15llvm/lib/Target/WebAssembly/WebAssemblyCoalesceFeaturesAndStripAtomics.cpp
+4-12llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
+3-3llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
+2-3llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.h
+2-3llvm/lib/Target/WebAssembly/WebAssemblySubtarget.cpp
+2-2llvm/lib/Target/WebAssembly/WebAssemblySubtarget.h
+25-386 files

LLVM/project 45a0b9aclang/lib/CodeGen SwiftCallingConv.cpp, clang/test/CodeGen swiftcall-single-element-vector.c

[clang] Handle single-element vectors in the Swift calling convention (#223961)

Single-element vectors hit an assertion before reaching the
target-specific Swift ABI checks, even though some targets support them.

Relax the element-count assertion and scalarize single-element vectors
when they are not legal for the target ABI.

Fixes #223871.

Assisted-by: OpenAI GPT-6
DeltaFile
+65-0clang/test/CodeGen/swiftcall-single-element-vector.c
+6-3clang/lib/CodeGen/SwiftCallingConv.cpp
+71-32 files

LLVM/project 2488b7allvm/lib/Target/X86 X86TargetTransformInfo.cpp, llvm/test/Analysis/CostModel/X86 arith-mulh.ll

[CostModel][X86] Add vXi16/vXi32 costs for smulh/umulh intrinsics (#224342)

pmulhw/pmulhuw can be used directly for vXi16 types and pmuldq/pmuludq almost directly for vXi32 types
DeltaFile
+177-99llvm/test/Analysis/CostModel/X86/arith-mulh.ll
+30-0llvm/lib/Target/X86/X86TargetTransformInfo.cpp
+207-992 files

LLVM/project fc95055clang/lib/AST ASTContext.cpp, clang/test/CodeGen builtin-clear-padding-codegen.c

[Clang] Fix padding clearing logic for packed boolean vectors in big endian

The memory layout of packed boolean vectors in big endian mode is quite
involved. This patch adds support for determining the occupied bits of
this type in big endian mode, so that the correct bits are cleared as
padding.
DeltaFile
+208-0clang/test/CodeGenCXX/builtin-clear-padding-codegen.cpp
+208-0clang/test/CodeGen/builtin-clear-padding-codegen.c
+59-6clang/lib/AST/ASTContext.cpp
+475-63 files