LLVM/project 6c03d98llvm/lib/Target/PowerPC PPCInstrInfo.cpp, llvm/test/CodeGen/PowerPC fold-rlwinm.mir

PowerPC: Fix combineRLWINM crash on an undef folding operand

Found by AI while working on something else.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+12-0llvm/test/CodeGen/PowerPC/fold-rlwinm.mir
+2-0llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
+14-02 files

LLVM/project 54414f0llvm/include/llvm/CodeGen/GlobalISel MIPatternMatch.h, llvm/lib/CodeGen/GlobalISel CombinerHelperCasts.cpp CombinerHelperVectorOps.cpp

GlobalISel: Migrate misc. CombinerHelper def checks to MIPatternMatch (#216671)

Replace getVRegDef + cast/opcode-check idioms across CombinerHelper
with mi_match, adding named instruction binders and operand-form
matchers as needed.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+208-157llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
+47-7llvm/include/llvm/CodeGen/GlobalISel/MIPatternMatch.h
+25-19llvm/lib/CodeGen/GlobalISel/CombinerHelperVectorOps.cpp
+6-4llvm/lib/CodeGen/GlobalISel/CombinerHelperCasts.cpp
+286-1874 files

LLVM/project e67fa5aclang/lib/StaticAnalyzer/Core ExprEngine.cpp

[analyzer] Remove irrelevant transitions in processCFGBlockEntrance (#216008)

My recent commit c76a617524fa62f85c1ff825b5d47885599c6482 cleaned up the
logic of `ExprEngine::processCFGBlockEntrance`, highlighting the fact
that it sometimes creates an extra transition that has no relevant
purpose. This commit removes this extra transition to simplify the code.

I'm confident that there was no logic that concretely looked for these
particular nodes; and this commit is a no-op if loop unrolling is
disabled (the default). Unless loop widening is also enabled, it can
only remove a node that is directly followed by a sink as its only
child.

However, this is not a NFC change, because changing the number of
exploded nodes can perturb the graph creation and traversal. I analyzed
a dozen open source projects with loop unrolling and widening both
enabled, and among almost 20.000 bug reports these perturbations caused
one new report and three lost reports, which is negligible (0.02%) and
acceptable.
DeltaFile
+0-17clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
+0-171 files

LLVM/project 4593317llvm/lib/Transforms/Vectorize VPlan.h VPlanRecipes.cpp, llvm/test/Transforms/LoopVectorize compress-idioms-negative-tests.ll compress-idioms.ll

Fixups
DeltaFile
+106-2llvm/test/Transforms/LoopVectorize/compress-idioms.ll
+3-32llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
+0-32llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+0-9llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
+2-2llvm/test/Transforms/LoopVectorize/compress-idioms-negative-tests.ll
+0-3llvm/lib/Transforms/Vectorize/VPlan.h
+111-806 files

LLVM/project 955345ellvm/include/llvm/Analysis VectorUtils.h, llvm/lib/Transforms/Vectorize LoopVectorizationLegality.cpp

Fixups
DeltaFile
+1-2llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
+1-1llvm/include/llvm/Analysis/VectorUtils.h
+2-32 files

LLVM/project 3e6f152llvm/include/llvm/Transforms/Vectorize LoopVectorizationLegality.h, llvm/lib/Transforms/Vectorize VPlanTransforms.cpp VPRecipeBuilder.h

Fixups
DeltaFile
+112-118llvm/test/Transforms/LoopVectorize/compress-idioms.ll
+47-32llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+18-8llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
+13-3llvm/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h
+5-0llvm/lib/Transforms/Vectorize/VPRecipeBuilder.h
+4-0llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+199-1616 files

LLVM/project 42dbdc5llvm/lib/Transforms/Vectorize LoopVectorize.cpp VPlan.h, llvm/test/Transforms/LoopVectorize compress-store-vec-epilogue.ll

Fix epilogue resume handling
DeltaFile
+98-0llvm/test/Transforms/LoopVectorize/compress-store-vec-epilogue.ll
+5-5llvm/lib/Transforms/Vectorize/VPlan.h
+2-1llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+105-63 files

LLVM/project 39b9088llvm/test/Transforms/LoopVectorize compress-idioms.ll

Test uncond increment
DeltaFile
+96-2llvm/test/Transforms/LoopVectorize/compress-idioms.ll
+96-21 files

LLVM/project 7afad7dllvm/test/Transforms/LoopVectorize compress-store-vec-epilogue.ll compress-idioms.ll

Rebase fixups
DeltaFile
+8-8llvm/test/Transforms/LoopVectorize/compress-idioms.ll
+3-3llvm/test/Transforms/LoopVectorize/compress-store-vec-epilogue.ll
+11-112 files

LLVM/project cb38b87llvm/lib/Transforms/Vectorize VPlanConstruction.cpp VPlan.h

Don't allow null phi
DeltaFile
+4-6llvm/lib/Transforms/Vectorize/VPlan.h
+1-1llvm/lib/Transforms/Vectorize/VPlanConstruction.cpp
+5-72 files

LLVM/project 8df1e71llvm/lib/Transforms/Vectorize VPlanRecipes.cpp, llvm/test/Transforms/LoopVectorize compress-idioms-negative-tests.ll compress-idioms.ll

Move negative tests to new file
DeltaFile
+0-105llvm/test/Transforms/LoopVectorize/compress-idioms.ll
+94-0llvm/test/Transforms/LoopVectorize/compress-idioms-negative-tests.ll
+0-1llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
+94-1063 files

LLVM/project f4304f8llvm/include/llvm/Analysis IVDescriptors.h, llvm/lib/Analysis IVDescriptors.cpp

Rework desc to check users
DeltaFile
+126-43llvm/lib/Analysis/IVDescriptors.cpp
+35-20llvm/include/llvm/Analysis/IVDescriptors.h
+6-11llvm/unittests/Analysis/IVDescriptorsTest.cpp
+167-743 files

LLVM/project 6d6e112llvm/lib/Transforms/Vectorize VPlanTransforms.cpp VPlan.h, llvm/test/Transforms/LoopVectorize compress-idioms.ll

[LoopVectorize] Support vectorization of compressing patterns in VPlan

RFC link: https://discourse.llvm.org/t/rfc-loop-vectorization-of-compress-store-expand-load-patterns/86442

This adds loop vectorizer support for "compressing" patterns,
for example:

```
int dst_idx = 0;
for (int i = 0; i < n; i++) {
  if (cond[i])
    dst[dst_idx++] = src[i];
}
```

Can be vectorized with a `llvm.masked.compressstore` as:

```
int dst_idx = 0;

    [52 lines not shown]
DeltaFile
+424-0llvm/test/Transforms/LoopVectorize/compress-idioms.ll
+157-0llvm/test/Transforms/LoopVectorize/VPlan/compress-idioms.ll
+132-0llvm/test/Transforms/LoopVectorize/AArch64/compress-idioms.ll
+111-14llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+60-4llvm/lib/Transforms/Vectorize/VPlan.h
+49-0llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+933-1815 files not shown
+1,116-2621 files

LLVM/project 8c29292llvm/include/llvm/Analysis IVDescriptors.h, llvm/lib/Analysis IVDescriptors.cpp

Fixups
DeltaFile
+29-16llvm/lib/Analysis/IVDescriptors.cpp
+6-0llvm/include/llvm/Analysis/IVDescriptors.h
+35-162 files

LLVM/project 3f82514llvm/lib/Analysis IVDescriptors.cpp

Fixups
DeltaFile
+2-1llvm/lib/Analysis/IVDescriptors.cpp
+2-11 files

LLVM/project 5169bcallvm/include/llvm/Analysis IVDescriptors.h, llvm/lib/Analysis IVDescriptors.cpp

Fixups
DeltaFile
+2-2llvm/include/llvm/Analysis/IVDescriptors.h
+1-1llvm/lib/Analysis/IVDescriptors.cpp
+3-32 files

LLVM/project 2bf89fallvm/include/llvm/Analysis IVDescriptors.h, llvm/lib/Analysis IVDescriptors.cpp

Fixups
DeltaFile
+5-4llvm/include/llvm/Analysis/IVDescriptors.h
+2-1llvm/lib/Analysis/IVDescriptors.cpp
+7-52 files

LLVM/project e0f8958llvm/include/llvm/Analysis IVDescriptors.h

Add docs
DeltaFile
+27-4llvm/include/llvm/Analysis/IVDescriptors.h
+27-41 files

LLVM/project 3d70d76llvm/lib/Analysis IVDescriptors.cpp

remove ;
DeltaFile
+1-1llvm/lib/Analysis/IVDescriptors.cpp
+1-11 files

LLVM/project 5a893c8llvm/include/llvm/Analysis IVDescriptors.h, llvm/lib/Analysis IVDescriptors.cpp

[IVDescriptors] Implement MonotonicDescriptor

RFC link: https://discourse.llvm.org/t/rfc-loop-vectorization-of-compress-store-expand-load-patterns/86442

"Monotonic" variable is similar to induction variable, but its value is updated under some condition, e.g.:
```
int idx = 0;
for(int i = 0; i < n; ++i) {
  // some uses of idx
  if (cond)
    ++idx;
}
```
In this example, `i` is induction variable and `idx` is monotonic variable: it's updated only when cond == true. In LLVM IR, this looks like:
```
loop_header:
  %monotonic_phi = [%start, %prehader], [ %chain_phi0, %latch]

step_bb:

    [26 lines not shown]
DeltaFile
+153-0llvm/unittests/Analysis/IVDescriptorsTest.cpp
+121-0llvm/lib/Analysis/IVDescriptors.cpp
+39-0llvm/include/llvm/Analysis/IVDescriptors.h
+313-03 files

FreeNAS/freenas 3835cd7tests/api2 test_account_privilege_role.py test_account_2fa.py, tests/directory_services test_activedirectory_2fa.py test_activedirectory_privilege.py

More account tests
DeltaFile
+291-4tests/api2/test_account_privilege.py
+254-0tests/api2/test_account_sync_builtin.py
+173-0tests/directory_services/test_activedirectory_privilege.py
+144-0tests/api2/test_account_2fa.py
+121-0tests/directory_services/test_activedirectory_2fa.py
+17-1tests/api2/test_account_privilege_role.py
+1,000-55 files not shown
+1,039-711 files

LLVM/project e7d66edflang/lib/Lower/OpenMP OpenMP.cpp, flang/test/Lower/OpenMP omp-declarative-allocate-module.f90

[Flang][OpenMP] PoC module support for allocate directives

This patch implements partial support for `allocate` on Fortran
module variables, based on adding global constructor functions for each
impacted variable.

Shared as a proof of concept, because I have a few concerns about it:
  1. It appears that Clang ignores `allocate` directives on global
     variables instead. Is that the expected behavior?
  2. The existing implementation for `allocate` in Flang doesn't
     actually impact where the memory used for a variable resides. It
     allocates/deallocates extra memory for it using OpenMP internal
     compiler calls but then that storage is never used. The original
     alloca is still used. This addition suffers from the same issue:
     global constructors allocate extra memory that is never used to
     update in any way the associated global variable or its users.
  3. No `omp.allocate_free` (should be `omp.allocate.free`) can be added
     by this approach.
  4. The representation of `omp.allocate_dir` (should be `omp.allocate`)

    [10 lines not shown]
DeltaFile
+110-30flang/lib/Lower/OpenMP/OpenMP.cpp
+42-0flang/test/Lower/OpenMP/omp-declarative-allocate-module.f90
+0-9flang/test/Lower/OpenMP/Todo/allocate-module.f90
+152-393 files

FreeNAS/freenas e9567bdtests/api2 test_account_privilege_role.py test_account_2fa.py, tests/directory_services test_activedirectory_2fa.py test_activedirectory_privilege.py

More account tests
DeltaFile
+291-4tests/api2/test_account_privilege.py
+205-0tests/api2/test_account_sync_builtin.py
+147-0tests/directory_services/test_activedirectory_privilege.py
+125-0tests/api2/test_account_2fa.py
+116-0tests/directory_services/test_activedirectory_2fa.py
+17-1tests/api2/test_account_privilege_role.py
+901-55 files not shown
+940-711 files

LLVM/project bd3d244clang/docs/analyzer checkers.rst, clang/include/clang/StaticAnalyzer/Checkers Checkers.td

[analyzer][docs] Add documentation for the DanglingPtrDeref checker
DeltaFile
+55-0clang/docs/analyzer/checkers.rst
+10-10clang/include/clang/StaticAnalyzer/Checkers/Checkers.td
+1-1clang/test/Analysis/dangling-ptr-deref.cpp
+66-113 files

LLVM/project 98ae570llvm/lib/Transforms/Vectorize VPlan.h VPlanRecipes.cpp

[VPlan] Remove the unused CalculateTripCountMinusVF opcode (NFC) (#216675)

bcc272b3220f ("[LV] Remove DataAndControlFlowWithoutRuntimeCheck. NFC",
#183762) removed the only createNaryOp building this opcode, leaving
behind the enum entry and its cases for type inference, operand count,
scalar generation, lowering and printing. Nothing constructs it, so no
plan can contain it and no test prints it.
DeltaFile
+0-17llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
+0-1llvm/lib/Transforms/Vectorize/VPlan.h
+0-182 files

FreeBSD/ports 9477c9djava/openjdk11 Makefile, java/openjdk8 Makefile

java/openjdk{8,11}: Remove USE_LDCONFIG from ports

OpenJDK loads the JVM and other JDK libraries explicitly from the
correct directories, so there's no need for adding them to ldconfig.

PR:             297282
Reviewed by:    jrm
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D58841
DeltaFile
+1-1java/openjdk8/Makefile
+1-1java/openjdk11/Makefile
+2-22 files

LLVM/project 31a1886llvm/lib/Target/PowerPC PPCInstrInfo.cpp, llvm/test/CodeGen/PowerPC mi-peephole-forwarding-undef.mir

PowerPC: Fix MI peephole crash on an undef forwarding operand

Found by AI while working on something else.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+25-0llvm/test/CodeGen/PowerPC/mi-peephole-forwarding-undef.mir
+2-0llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
+27-02 files

LLVM/project a14f953clang/lib/Analysis/LifetimeSafety FactsGenerator.cpp Origins.cpp, clang/test/Sema/LifetimeSafety safety.cpp capture-by.cpp

Support [[clang::lifetime_capture_by(X)]] in Plain Containers  (#204361)

This PR implements support for `[[clang::lifetime_capture_by(X)]]` to
enable tracking lifetimes for plain structs and containers like
`std::vector` without requiring manual `[[gsl::Pointer]]` or
`[[gsl::Owner]]` annotations. The implementation extends the
`LifetimeAnnotatedOriginTypeCollector` to register types in capture_by
contracts for origin tracking.

This PR also enables the intra-procedural analysis in existing tests
using -Wlifetime-safety and updated expectations to handle the more
detailed flow-sensitive diagnostics.

```cpp
struct MyContainer {
  const char* stored_ptr;
};

void captureInto(std::string_view v [[clang::lifetime_capture_by(c)]], MyContainer& c);

    [22 lines not shown]
DeltaFile
+295-83clang/test/Sema/LifetimeSafety/capture-by.cpp
+32-1clang/lib/Analysis/LifetimeSafety/Origins.cpp
+15-7clang/lib/Analysis/LifetimeSafety/FactsGenerator.cpp
+3-4clang/test/Sema/LifetimeSafety/safety.cpp
+345-954 files

LLVM/project 35aea1dllvm/lib/CodeGen/GlobalISel GIMatchTableExecutor.cpp

GlobalISel: Use MIPatternMatch in GIMatchTableExecutor (#216601)

Replace the getVRegDef + opcode-check idiom in isBaseWithConstantOffset
with mi_match using m_GPtrAdd and m_GConstant.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+4-10llvm/lib/CodeGen/GlobalISel/GIMatchTableExecutor.cpp
+4-101 files

FreeNAS/freenas 401d1a2tests/api2 test_account_privilege_role.py test_account_2fa.py, tests/directory_services test_activedirectory_2fa.py test_activedirectory_privilege.py

More account tests
DeltaFile
+291-4tests/api2/test_account_privilege.py
+205-0tests/api2/test_account_sync_builtin.py
+147-0tests/directory_services/test_activedirectory_privilege.py
+116-0tests/directory_services/test_activedirectory_2fa.py
+105-0tests/api2/test_account_2fa.py
+17-1tests/api2/test_account_privilege_role.py
+881-55 files not shown
+923-711 files