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

LLVM/project 41c566eclang/docs ReleaseNotes.rst, clang/lib/Analysis CFG.cpp

[Clang] eliminate -Winvalid-noreturn false positive after throw + unreachable try/catch blocks (#175443)

Fixes #174822

---

This PR fixes a false `-Winvalid-noreturn` positive when an
unconditional `throw` is followed by an unreachable `try`/`catch` block.

The false positive occurred because reachability analysis marked
`try`/`catch` regions as live even when unreachable via normal control
flow. The following logic


https://github.com/llvm/llvm-project/blob/1c0c9aeae681dbed90fcb19edd8a41e10a17f867/clang/lib/Sema/AnalysisBasedWarnings.cpp#L573-L589

that adjusted for missing `EH` call edges, treated disconnected `try` as
reachable.


    [11 lines not shown]
DeltaFile
+1-20clang/lib/Sema/AnalysisBasedWarnings.cpp
+14-6clang/test/Analysis/auto-obj-dtors-cfg-output.cpp
+10-2clang/lib/Analysis/CFG.cpp
+7-0clang/test/SemaCXX/return-noreturn.cpp
+2-4clang/test/Analysis/misc-ps-region-store.cpp
+1-2clang/docs/ReleaseNotes.rst
+35-346 files

LLVM/project e4c30c1llvm/lib/Target/SPIRV SPIRVTargetMachine.cpp, llvm/lib/Transforms/IPO ExpandVariadics.cpp

[SPIRV] Extend lowering of variadic functions (#178980)

Variadic function lowering for SPIR-V was initially added in
https://github.com/llvm/llvm-project/pull/175076.

However, I tried a full OpenMP offloading example that includes a vararg
call and hit a few issues:

1) The OpenMP Deivce library function `ompx::printf` was incorrectly
being considered a builtin `printf` function that would be handled
specifically by the SPIR-V backend.

The fix here is to remove the `printf` special handling.

2) We were getting an assert in ModuleVerifier saying the LLVM lifetime
intrinsics were being called with an argument that was neither an
`alloca` ptr or `poison`. The problem is the `alloca` was replaced with
a SPIR-V intrinsic `alloca` in `SPIRVPrepareFunctions`, but the lifetime
intrinsic added in `ExpandVariadics` was not lowered to the SPIR-V

    [14 lines not shown]
DeltaFile
+41-0llvm/test/CodeGen/SPIRV/function/variadics-lowering-namespace-printf.ll
+19-17llvm/test/CodeGen/SPIRV/printf.ll
+20-14llvm/lib/Transforms/IPO/ExpandVariadics.cpp
+6-4llvm/lib/Target/SPIRV/SPIRVTargetMachine.cpp
+4-2llvm/test/CodeGen/SPIRV/llc-pipeline.ll
+90-375 files

LLVM/project da5e298clang/include/clang/Sema Sema.h, clang/lib/Sema SemaDecl.cpp

[Sema][NFC] simplify deduceOpenCLAddressSpace (#181253)

All callers of deduceOpenCLAddressSpace passed some sort of VarDecl
(such as a ParmVarDecl), so the dynamic cast and indentation was
unnecessary.
DeltaFile
+33-35clang/lib/Sema/SemaDecl.cpp
+1-1clang/include/clang/Sema/Sema.h
+34-362 files

LLVM/project a1d12e9llvm/test/Transforms/IndVarSimplify unreachable-exit.ll

[NFC] [IndVars] test for multiple bounds for predicate-loop-traps

This can come from loops like

```
for (int i = 0; i < X; ++i) {
  if (i < N)
    __builtin_trap();
  if (i < M)
    __builtin_trap();
  x[i] = y[i];
}
```

Reviewers: nikic

Reviewed By: nikic

Pull Request: https://github.com/llvm/llvm-project/pull/181264
DeltaFile
+92-0llvm/test/Transforms/IndVarSimplify/unreachable-exit.ll
+92-01 files

LLVM/project 211314dllvm/include/llvm/ADT STLForwardCompat.h STLExtras.h, llvm/unittests/ADT STLForwardCompatTest.cpp STLExtrasTest.cpp

[ADT] Add is_sorted_constexpr, equivalent to C++20 std::is_sorted  (#180867)

`std::is_sorted` is not `constexpr` until Cpp20, so need custom `is_sorted_constexpr` function.
DeltaFile
+36-0llvm/unittests/ADT/STLForwardCompatTest.cpp
+18-0llvm/include/llvm/ADT/STLForwardCompat.h
+10-0llvm/unittests/ADT/STLExtrasTest.cpp
+8-0llvm/include/llvm/ADT/STLExtras.h
+72-04 files

LLVM/project b39ab2ellvm/lib/Target/RISCV RISCVInstrInfo.cpp, llvm/test/CodeGen/RISCV make-compressible-zilsd.mir

[RISCV] Use PADD_DW instead of ADDD for GPRPair copy on RV32 with P extension (#181316)

DeltaFile
+2-2llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
+2-2llvm/test/CodeGen/RISCV/make-compressible-zilsd.mir
+4-42 files

LLVM/project 2b5eb2dclang/docs ClangIRCleanupAndEHDesign.md, clang/include/clang/CIR/Dialect/IR CIROps.td

[CIR][docs] Add cir.catch_param to ClangIR cleanup and EH design doc (#181284)

This updates the ClangIR cleanup and exception handling design document
to describe the requirement to use cir.catch_param operations to begin
the catch regions of a cir.try operation in the structured form of CIR.

This also includes minor changes to the descriptions in the CIROps.td
definitions of cir.try and cir.catch_param
DeltaFile
+32-1clang/docs/ClangIRCleanupAndEHDesign.md
+2-1clang/include/clang/CIR/Dialect/IR/CIROps.td
+34-22 files