LLVM/project 7817197compiler-rt/lib/asan asan_allocator.cpp asan_malloc_win.cpp, compiler-rt/test/asan/TestCases/Windows rtlsizeheap_zero.cpp heaprealloc_alloc_zero.cpp

[ASan][Windows] Fix false positive for zero sized rtl allocations (#181015)

This is a follow up to #155943

On Windows, ASan's allocator internally upgrades zero-size allocation
requests to size 1 (since malloc(0) must return a unique non-NULL
pointer). However, when the user queries the allocation size through
Windows heap APIs (RtlSizeHeap, HeapSize, \_msize, GlobalSize,
LocalSize), ASan reports the internal size (1) instead of the originally
requested size (0).

This causes false positive heap-buffer-overflow errors in a common
pattern:

```c++
void *buf = HeapAlloc(GetProcessHeap(), 0, 0);
SIZE_T size = HeapSize(GetProcessHeap(), 0, buf);  // Returns 1, should be 0
if(size > 0) // could remove this and still be correct
    memset(buf, 0, size);  // ASan reports heap-buffer-overflow

    [8 lines not shown]
DeltaFile
+107-0compiler-rt/test/asan/TestCases/Windows/rtlsizeheap_zero.cpp
+53-2compiler-rt/lib/asan/asan_allocator.cpp
+12-1compiler-rt/lib/asan/asan_malloc_win.cpp
+3-2compiler-rt/test/asan/TestCases/Windows/heaprealloc_alloc_zero.cpp
+175-54 files

LLVM/project 43fcc26clang/lib/Driver/ToolChains Darwin.cpp, lld/MachO Driver.cpp

[Support] Support 5-component VersionTuples (#181275)

LLDB parses compiler versions out of DW_AT_producer DWARF attributes
into a VersionTuple. The Swift compiler recently switched to 5-component
version numbers. In order to support this version scheme without growing
the size of VersionTuple, this patch dedicates the last 10 bits of the
build version to a 5th "sub-build" component. The Swift compiler
currently uses 1 digit for this and promises to never use more than 3
digits for the last 3 components.

This patch still leaves 6 decimal digits for the build component for
other version schemes.

rdar://170181060
DeltaFile
+46-21llvm/include/llvm/Support/VersionTuple.h
+25-6llvm/lib/Support/VersionTuple.cpp
+23-1llvm/unittests/Support/VersionTupleTest.cpp
+5-6lld/MachO/Driver.cpp
+7-3clang/lib/Driver/ToolChains/Darwin.cpp
+3-3lld/test/MachO/platform-version.s
+109-406 files

LLVM/project 6bdabc4clang/docs AMDGPUBuiltins.rst

- further refine
- cross reference from AMD's official GPUOpen Machine-Readable ISA
- Improve readability for broader target audience
DeltaFile
+534-356clang/docs/AMDGPUBuiltins.rst
+534-3561 files

LLVM/project ecee70elibc/src/string/memory_utils/generic inline_strlen.h, libc/src/string/memory_utils/x86_64 inline_strlen.h

Implement vector version of memchr, and dispatch to same (#177711)

As in the description. 

This implementation shares quite a bit of code with the wide-read
versions of string_length.
DeltaFile
+94-17libc/src/string/memory_utils/x86_64/inline_strlen.h
+46-5libc/src/string/memory_utils/generic/inline_strlen.h
+21-0libc/test/src/strings/wide_read_memory_test.cpp
+161-223 files

LLVM/project 3136188clang/docs AMDGPUBuiltins.rst

add a warning
DeltaFile
+5-0clang/docs/AMDGPUBuiltins.rst
+5-01 files

LLVM/project 8eda605clang/docs AMDGPUBuiltins.rst index.rst

[RFC][Docs][Clang][AMDGPU] Add AMDGPU builtins documentation

Add comprehensive documentation for AMDGPU target-specific builtins
(`AMDGPUBuiltins.rst`) covering argument semantics, restrictions, and
lowering notes for all builtin families.

This documentation was generated by AI (Claude) by cross-referencing:
- `clang/include/clang/Basic/BuiltinsAMDGPU.td` (builtin definitions)
- `llvm/include/llvm/IR/IntrinsicsAMDGPU.td` (intrinsic definitions)
- `clang/lib/Sema/SemaAMDGPU.cpp` (argument validation/constraints)
- `clang/lib/CodeGen/TargetBuiltins/AMDGPU.cpp` (lowering logic)

I did my best to proofread the parts I'm familiar with, but it would be greatly
appreciated if more people could help review it as well.
DeltaFile
+1,807-0clang/docs/AMDGPUBuiltins.rst
+1-0clang/docs/index.rst
+1,808-02 files

LLVM/project 5e36908clang/docs AMDGPUBuiltins.rst

fix doc build error
DeltaFile
+3-3clang/docs/AMDGPUBuiltins.rst
+3-31 files

LLVM/project 9d07a3fcompiler-rt/lib/asan asan_allocator.cpp asan_malloc_win.cpp, compiler-rt/test/asan/TestCases/Windows heaprealloc_alloc_zero.cpp

PR feedback - DCHECK and comments
DeltaFile
+10-5compiler-rt/lib/asan/asan_allocator.cpp
+0-2compiler-rt/lib/asan/asan_malloc_win.cpp
+1-0compiler-rt/test/asan/TestCases/Windows/heaprealloc_alloc_zero.cpp
+11-73 files

LLVM/project 742af32clang/docs ReleaseNotes.rst, clang/lib/Sema SemaInit.cpp

Reapply "[clang] Fix sema on ObjCLifetime conversion (#178524)" (#180817)

Clang can't handle objc lifetime correctly when casting We reuse the
approach similar to lifetime: First remove it before the conversion,
then add it back.

Add a test

Fixes https://github.com/llvm/llvm-project/issues/177478
DeltaFile
+69-0clang/test/CodeGenObjCXX/arc-lifetime-rvalue-ref-binding.mm
+39-0clang/test/SemaObjCXX/arc-lifetime-rvalue-ref-binding.mm
+10-1clang/lib/Sema/SemaInit.cpp
+1-0clang/docs/ReleaseNotes.rst
+119-14 files

LLVM/project 8cd31aalldb/include/lldb/Breakpoint StopCondition.h, lldb/test/API/functionalities/breakpoint/update_condition TestUpdateBreakpointCondition.py main.c

[lldb/Breakpoint] Fix condition hash after updating condition text (#181409)

StopCondition::SetText was computing the hash from the moved-from text
parameter instead of the stored m_text member. After std::move(text),
the source parameter becomes empty, causing the hash to always be
computed from an empty string.

This caused breakpoint condition updates to fail silently. When a user
modified a condition (e.g., from "x == y" to "x > y"), the hash remained
unchanged. Breakpoint locations use this hash to detect when conditions
need re-evaluation, so with a stale hash they would continue using
cached state for the old condition, triggering at incorrect locations.

The patch fixes this issue by computing the hash from m_text after the
move operation, ensuring it reflects the actual stored condition text.

It also adds API test that updates a breakpoint condition and verifies
the new condition is properly evaluated.


    [2 lines not shown]
DeltaFile
+126-0lldb/test/API/functionalities/breakpoint/update_condition/TestUpdateBreakpointCondition.py
+16-0lldb/test/API/functionalities/breakpoint/update_condition/main.c
+3-0lldb/test/API/functionalities/breakpoint/update_condition/Makefile
+1-1lldb/include/lldb/Breakpoint/StopCondition.h
+146-14 files

LLVM/project 343103allvm/test/CodeGen/PowerPC ppc_test_data_class.ll

[NFC] Pre-Commit test case for __builtin_ppc_test_data_class (#181181)

add a pre-commit test case for __builtin_ppc_test_data_class
DeltaFile
+46-0llvm/test/CodeGen/PowerPC/ppc_test_data_class.ll
+46-01 files

LLVM/project af1a5c5llvm/lib/CodeGen/GlobalISel LegalizerHelper.cpp, llvm/test/CodeGen/RISCV/GlobalISel/legalizer legalize-ctls-rv32.mir

[GISel][RISCV] Simplify the generated code for narrowScalarCTLS. (#180827)

Instead of trying to make CTLS work for the Lo part, conditionally
invert Lo using the Hi sign bit, then do a CTLZ. If the CTLZ is
zero, then the Lo sign bit differs from the Hi sign bit. Otherwise,
each leading zero represents an additional sign bit.

This generates better code when CTLS and CTLZ are both supported.
I've added Zbb to the P extension command line for RISC-V since
P is likely to imply Zbb when it is ratified, but that isn't written
in the spec yet. If that doesn't happen, I expect CLZ would get
added back to the P extension.
DeltaFile
+33-47llvm/test/CodeGen/RISCV/GlobalISel/legalizer/legalize-ctls-rv32.mir
+11-15llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
+44-622 files

LLVM/project 5f8053bllvm/lib/Target/RISCV RISCVISelDAGToDAG.cpp, llvm/test/CodeGen/RISCV rv32p.ll

[RISCV] In tryWideningMulAcc, check multiple users before checking operand 1. (#181321)

If both operands are WMUL, we should still consider the second one if
the first one has multiple users.
DeltaFile
+14-16llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
+26-0llvm/test/CodeGen/RISCV/rv32p.ll
+40-162 files

LLVM/project 6b5c440mlir/lib/Dialect/XeGPU/Transforms XeGPUSgToWiDistributeExperimental.cpp XeGPUSubgroupDistribute.cpp, mlir/lib/Dialect/XeGPU/Utils XeGPUUtils.cpp

[mlir][xegpu] Add support for `vector.reduction` and `vector.multi_reduction` subgroup to work-item distribution. (#180308)

This PR adds support for lowering of `vector.reduction` and
`vector.multi_reduction` ops in subgroup to work-item distribution.

Following cases are considered currently (more support will be added
later):

* `vector.reduction` : This assumes the source vector is distributed to
all lanes and lanes must shuffle data to do a collaborative reduction.
result is shared among all lanes. This is done by emitting
`gpu::ShuffleOp` s and doing a butterfly reduction. Refer
`VectorDistribution` for more details.
* `vector.multi_reduction`: 2 cases are considered,

1. **Reduction is lane-local**: simply lower to a lane local multi
reduction op. each lane does its own reduction. result is distributed.
2. **Reduction is not lane-local:** This one is handled indirectly. In
this case, we rewrite the reduction in terms of `vector.reduction` ops

    [2 lines not shown]
DeltaFile
+197-1mlir/lib/Dialect/XeGPU/Transforms/XeGPUSgToWiDistributeExperimental.cpp
+168-0mlir/test/Dialect/XeGPU/sg-to-wi-experimental-unit.mlir
+3-81mlir/lib/Dialect/XeGPU/Transforms/XeGPUSubgroupDistribute.cpp
+76-0mlir/lib/Dialect/XeGPU/Utils/XeGPUUtils.cpp
+22-19mlir/test/Dialect/XeGPU/subgroup-distribute-unit.mlir
+21-1mlir/test/lib/Dialect/XeGPU/TestXeGPUTransforms.cpp
+487-1022 files not shown
+514-1038 files

LLVM/project 37aaff3clang/lib/Analysis ThreadSafety.cpp, clang/test/SemaCXX warn-thread-safety-analysis.cpp

[Thread Analysis] Fix a bug in context update in alias-analysis (#178952)

[Thread Analysis] Fix a bug in context update in alias-analysis
    
Previously, in 'updateLocalVarMapCtx', context was updated to the one
immediately after the provided statement 'S'.  It is incorrect,
because 'S' hasn't been processed at that point.  This issue could
result in false positives.  For example,
    
```
    void f(Lock_t* F)
    {
        Lock_t* L = F; // 'L' aliases with 'F'
        L->Lock();     // 'L' holds the lock
        // Before the fix, the analyzer saw the definition of 'L' being cleared before 'L' was unlocked.
        unlock(&L);    // unlock (*L)
    }
```
This commit fixes the issue.
    
rdar://169236809
DeltaFile
+26-1clang/test/SemaCXX/warn-thread-safety-analysis.cpp
+10-10clang/lib/Analysis/ThreadSafety.cpp
+36-112 files

LLVM/project 648bd56llvm/test/CodeGen/SystemZ zos-prologue-epilog.ll zos-ppa1.ll

[SystemZ][z/OS] Migrate most test case to use HLASM syntax (#181222)

This PR migrates all but two test cases to use HLASM syntax. It also
flips the default for the command line option, making HLASM output the
default.
The missing test cases requires some more support in the HLASM streamer,
which I will add separately.
DeltaFile
+60-57llvm/test/CodeGen/SystemZ/zos-prologue-epilog.ll
+42-22llvm/test/CodeGen/SystemZ/zos-ppa1.ll
+34-25llvm/test/CodeGen/SystemZ/zos-ppa2.ll
+20-20llvm/test/CodeGen/SystemZ/call-zos-01.ll
+19-20llvm/test/CodeGen/SystemZ/call-zos-vararg.ll
+18-13llvm/test/CodeGen/SystemZ/llvm.sincos.ll
+193-15725 files not shown
+276-23531 files

LLVM/project 375f199mlir/lib/Analysis/Presburger IntegerRelation.cpp, mlir/unittests/Analysis/Presburger IntegerRelationTest.cpp

[MLIR][Presburger] Fix full dimension check (#175422)

Currently, the code mistakenly thinks `(x): (1 >= 0)` as
non-full-dimensional.

The code determines full-dimensionality by testing whether an inequality
is flat, i.e. takes the same value regardless of variable assignments.
However, `1 >= 0` is obviously flat, and this case should be ignored
since it didn't involve any variables.

To remove these inequalities, we can call `removeTrivialRedundancy`.
DeltaFile
+6-2mlir/lib/Analysis/Presburger/IntegerRelation.cpp
+8-0mlir/unittests/Analysis/Presburger/IntegerRelationTest.cpp
+14-22 files

LLVM/project de1b63eclang/test/CIR/CodeGen try-catch-tmp.cpp

[CIR][NFC] Fix try-catch-tmp.cpp test (#181402)

This test was failing due to its CI having been run before another
change was committed that added attributes to return values. This
removes unnecessary checks to make the test pass again.
DeltaFile
+5-5clang/test/CIR/CodeGen/try-catch-tmp.cpp
+5-51 files

LLVM/project fbf5bac.github/workflows commit-access-review.yml

workflows/commit-access-review: Use a GitHub App access token instead of llvmbot (#179364)

This replaces the use of an access token associated with the llvmbot
account with one that is generated by a GitHub App. This is slightly
better, because it eliminates the need to periodically rotate the
llvmbot tokens, which is difficult to do, since it requires sharing a
password and 2fa code among all the admins.

The tokens generated by the app automatically expire after an hour, and
the private key that is used to request it can be easily rotated by an
LLVM Organization owner. Also, since a single private key can be used to
generate many tokens, there is only one secret to rotate instead of
many.
DeltaFile
+11-1.github/workflows/commit-access-review.yml
+11-11 files

LLVM/project 620f162.github/workflows pr-subscriber.yml new-prs.yml

Revert "workflows: Use main-branch-only environment when using ISSUE_SUBSCRIBER_TOKEN (#179990)" (#181352)

This reverts commit 31f31dd9d0460834f2ae67247d3886fec4931d6d.

This commit was causing PRs to be spammed with messages like:

"llvmbot temporarily deployed to main-branch-only — with GitHub Actions
Inactive"

This was causing confusion, and is not worth the marginal security
benefit. I also think this can be avoided by using called workflows, but
I still need to investigate this.
DeltaFile
+0-2.github/workflows/pr-subscriber.yml
+0-2.github/workflows/new-prs.yml
+0-1.github/workflows/release-asset-audit.yml
+0-1.github/workflows/issue-subscriber.yml
+0-1.github/workflows/new-issues.yml
+0-75 files

LLVM/project f290379llvm/lib/Transforms/Vectorize SLPVectorizer.cpp

[SLP][NFC] Use static_assert to confirm SupportedOps is sorted (#181397)

Can be checked at compile time.
DeltaFile
+3-3llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+3-31 files

LLVM/project e79276alldb/cmake/modules FindTreeSitter.cmake, lldb/include/lldb/Host Config.h.cmake

Require tree-sitter cli binary
DeltaFile
+5-1lldb/cmake/modules/FindTreeSitter.cmake
+2-0lldb/include/lldb/Host/Config.h.cmake
+7-12 files

LLVM/project 1d588c5llvm/lib/Target/RISCV RISCVInstrInfoV.td

[RISCV] Rename tablegen class VALU_MV_VS2->VEXT_MV_VS2. NFC

This better matches the scheduler model in the class.
DeltaFile
+7-7llvm/lib/Target/RISCV/RISCVInstrInfoV.td
+7-71 files

LLVM/project 19de5ddflang-rt/lib/cuda allocator.cpp, flang-rt/unittests/Runtime/CUDA Allocatable.cpp

[flang][cuda] Add CUFSetAssociatedStream entry point (#181313)

DeltaFile
+37-0flang-rt/unittests/Runtime/CUDA/Allocatable.cpp
+15-0flang-rt/lib/cuda/allocator.cpp
+3-0flang/include/flang/Runtime/CUDA/allocator.h
+55-03 files

LLVM/project 7a2a377libcxx/test/benchmarks adjacent_view_begin.bench.cpp

[libc++] Remove hardcoded -O3 from adjacent_view benchmark (#181376)

We don't hardcode optimization flags in the benchmarks, because we want
to be able to run the benchmarks with any optimization level. Instead,
we set the optimization level when running Lit via the --param
optimization=<speed|size|...> flag.
DeltaFile
+1-1libcxx/test/benchmarks/adjacent_view_begin.bench.cpp
+1-11 files

LLVM/project 3819666lldb/source/Plugins/Highlighter/TreeSitter TreeSitterHighlighter.cpp

Prefer shorter matches as suggested by Charles
DeltaFile
+4-2lldb/source/Plugins/Highlighter/TreeSitter/TreeSitterHighlighter.cpp
+4-21 files

LLVM/project 8de1a07libcxx/src atomic.cpp, libcxx/test/std/thread/thread.semaphore timed.hang.pass.cpp

[libc++] Fix semaphore timed wait hanging on Windows (#180398)

Fixes #180334

# Problem

The semaphore timed wait test is flaky on Windows. It hangs from time to
time.

Some examples:

[windows (clang-cl-no-vcruntime, false, clang-cl,
clang-cl)](https://github.com/llvm/llvm-project/actions/runs/21737380876/job/62707542836#logs)
[windows (mingw-static, true, cc,
c++)](https://github.com/llvm/llvm-project/actions/runs/21636063482/job/62367831823?pr=179483#logs)
[windows (clang-cl-static, false, clang-cl,
clang-cl)](https://github.com/llvm/llvm-project/actions/runs/21453876753/job/61794464147#logs)
[windows (clang-cl-dll, false, clang-cl,
clang-cl)](https://github.com/llvm/llvm-project/actions/runs/21382902941/job/61556154029#logs)

    [127 lines not shown]
DeltaFile
+60-30libcxx/src/atomic.cpp
+45-0libcxx/test/std/thread/thread.semaphore/timed.hang.pass.cpp
+105-302 files

LLVM/project b6cd213clang/lib/CIR/CodeGen CIRGenException.cpp CIRGenCleanup.h

[CIR] Simplify try-catch handling (#180857)

With the new exception handling device, we no longer need to track the
location of potential catch blocks, and so we no longer need to
represent catch handlers on the EH stack. This allows us to
significantly simplify the generation of try-catch blocks.

This change emits catch blocks directly when visiting the try operation
and removes unnecessary EH management code.

This is not an exhaustive cleanup of the EH management code. Some things
that may appear to be obvious simplifications (such as removing the
union of bitfields in EHScope, and possibly making EHScopeStack just a
stack of EHCleanups) are deferred until we have a better idea of how
things like EH filters will be implemented.

This change breaks lowering of cir.try operations to LLVM IR in a
somewhat trivial way. Even before this PR, lowering of `cir.try` ops
with catch handlers was not implemented. However, we had one test case

    [6 lines not shown]
DeltaFile
+72-400clang/lib/CIR/CodeGen/CIRGenException.cpp
+2-102clang/lib/CIR/CodeGen/CIRGenCleanup.h
+0-36clang/lib/CIR/CodeGen/CIRGenCall.cpp
+2-13clang/lib/CIR/CodeGen/CIRGenFunction.h
+0-8clang/lib/CIR/CodeGen/CIRGenCleanup.cpp
+0-8clang/lib/CIR/CodeGen/EHScopeStack.h
+76-5671 files not shown
+78-5697 files

LLVM/project c776a52libc/cmake/modules LLVMLibCTestRules.cmake, libc/test lit.site.cfg.py.in CMakeLists.txt

[libc] Implement lit-based test execution for Libc (#178746)

This provides optional lit-based test execution for the LLVM Libc tests,
alongside the existing CMake-based test execution.

Usage:
  ninja -C build check-libc-lit
  cd build && bin/llvm-lit libc/test/src/

Partially addresses
[#118694](https://github.com/llvm/llvm-project/issues/118694). A future
PR once this lands will flip the default (per suggestion in the RFC)
DeltaFile
+106-0libc/utils/libctest/format.py
+37-0libc/test/lit.site.cfg.py.in
+25-0libc/test/CMakeLists.txt
+21-0libc/utils/libctest/__init__.py
+17-0libc/test/lit.cfg.py
+8-0libc/cmake/modules/LLVMLibCTestRules.cmake
+214-06 files

LLVM/project 4d518e6flang/include/flang/Optimizer/Analysis AliasAnalysis.h, flang/lib/Optimizer/Analysis AliasAnalysis.cpp

[flang] Let FIR AA:getModRef recognize Fortran user procedures late. (#181295)

In order to use FIR AA::getModRef() after `ExternalNameConversion`
pass we have to teach it to recognize Fortran user procedures
that have already been renamed.
DeltaFile
+27-5flang/lib/Optimizer/Analysis/AliasAnalysis.cpp
+16-0flang/test/Analysis/AliasAnalysis/modref-call-after-external-name-conversion.fir
+9-0flang/include/flang/Optimizer/Analysis/AliasAnalysis.h
+52-53 files