LLVM/project ea7bcf3llvm/test/Transforms/LoopVectorize smax-idx.ll

[LV] Give each RUN line in smax-idx.ll its own check prefix (NFC). (#220210)

The three RUN lines share the CHECK prefix, which only works while all
three VF/IC configurations produce identical output. This fixes the
dropped checks for smax_idx_max_no_exit_user.

While touching the file, also modernize the naming a bit, to be more
uniform with existing tests.
DeltaFile
+452-217llvm/test/Transforms/LoopVectorize/smax-idx.ll
+452-2171 files

LLVM/project 1cb39aallvm/lib/Transforms/Utils LoopUtils.cpp

Fixups
DeltaFile
+1-1llvm/lib/Transforms/Utils/LoopUtils.cpp
+1-11 files

LLVM/project 1c82e00llvm/lib/Transforms/Utils LoopUtils.cpp, llvm/test/Transforms/LoopVectorize compress-idioms.ll compress-store-vec-epilogue.ll

Fixups
DeltaFile
+37-40llvm/test/Transforms/LoopVectorize/compress-store-vec-epilogue.ll
+3-3llvm/lib/Transforms/Utils/LoopUtils.cpp
+0-2llvm/test/Transforms/LoopVectorize/compress-idioms.ll
+40-453 files

LLVM/project ddfaad0llvm/include/llvm/Transforms/Utils LoopUtils.h, llvm/lib/Transforms/Utils LoopUtils.cpp

Fixups
DeltaFile
+128-181llvm/test/Transforms/LoopVectorize/compress-idioms.ll
+40-9llvm/test/Transforms/LoopVectorize/compress-idioms-negative-tests.ll
+16-20llvm/test/Transforms/LoopVectorize/AArch64/compress-idioms.ll
+12-16llvm/test/Transforms/LoopVectorize/VPlan/compress-idioms.ll
+9-1llvm/lib/Transforms/Utils/LoopUtils.cpp
+4-3llvm/include/llvm/Transforms/Utils/LoopUtils.h
+209-2301 files not shown
+212-2337 files

LLVM/project 0aa68cdllvm/lib/Transforms/Vectorize LoopVectorizationLegality.cpp, llvm/test/Transforms/LoopVectorize compress-idioms-negative-tests.ll

Add out-of-loop use check
DeltaFile
+32-0llvm/test/Transforms/LoopVectorize/compress-idioms-negative-tests.ll
+10-2llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
+42-22 files

LLVM/project 200afebllvm/lib/Transforms/Utils LoopUtils.cpp, llvm/lib/Transforms/Vectorize LoopVectorize.cpp VPlanTransforms.cpp

Tests, fixes, and design rework
DeltaFile
+603-175llvm/test/Transforms/LoopVectorize/compress-idioms.ll
+174-0llvm/test/Transforms/LoopVectorize/compress-idioms-negative-tests.ll
+87-49llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+58-74llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+98-0llvm/test/Transforms/LoopVectorize/compress-store-vec-epilogue.ll
+66-0llvm/lib/Transforms/Utils/LoopUtils.cpp
+1,086-29812 files not shown
+1,212-38518 files

LLVM/project 1e9cbfdllvm/lib/Transforms/Vectorize VPRecipeBuilder.h

Add comment
DeltaFile
+3-0llvm/lib/Transforms/Vectorize/VPRecipeBuilder.h
+3-01 files

LLVM/project b906a06llvm/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
+112-15llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+60-4llvm/lib/Transforms/Vectorize/VPlan.h
+49-0llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+934-1915 files not shown
+1,117-2721 files

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

Fixups
DeltaFile
+59-8llvm/unittests/Analysis/IVDescriptorsTest.cpp
+9-10llvm/lib/Analysis/IVDescriptors.cpp
+1-1llvm/include/llvm/Analysis/IVDescriptors.h
+69-193 files

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

Fixups
DeltaFile
+4-5llvm/lib/Analysis/IVDescriptors.cpp
+3-3llvm/include/llvm/Analysis/IVDescriptors.h
+1-1llvm/unittests/Analysis/IVDescriptorsTest.cpp
+8-93 files

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

Fixups
DeltaFile
+35-28llvm/lib/Analysis/IVDescriptors.cpp
+23-17llvm/unittests/Analysis/IVDescriptorsTest.cpp
+22-9llvm/include/llvm/Analysis/IVDescriptors.h
+80-543 files

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

Rework and simplify
DeltaFile
+47-82llvm/lib/Analysis/IVDescriptors.cpp
+30-20llvm/include/llvm/Analysis/IVDescriptors.h
+3-28llvm/unittests/Analysis/IVDescriptorsTest.cpp
+80-1303 files

LLVM/project d435143llvm/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

FreeBSD/ports 43f38b2databases/sqlitebrowser Makefile, databases/sqlitebrowser/files patch-libs_qhexedit_CMakeLists.txt extra-patch-src_SqlUiLexer.cpp

databases/sqlitebrowser: Switch bundled libraries to ports

Enable unit tests.
Fix build with cmake 4.
Add SQLCIPHER option.

PR:             298007
Approved by:    fluffy (mentor)
DeltaFile
+21-4databases/sqlitebrowser/Makefile
+11-0databases/sqlitebrowser/files/extra-patch-src_SqlUiLexer.cpp
+8-0databases/sqlitebrowser/files/patch-libs_qhexedit_CMakeLists.txt
+40-43 files

LLVM/project 1de09daclang/lib/CIR/Dialect/Transforms CallConvLoweringPass.cpp, clang/lib/CIR/Dialect/Transforms/TargetLowering CIRABIRewriteContext.cpp

[CIR][ABI] Thread indirect-argument address space through call-conv lowering
DeltaFile
+86-0clang/test/CIR/Transforms/abi-lowering/indirect-addrspace-arg-attr-lowering.cir
+54-11clang/lib/CIR/Dialect/Transforms/TargetLowering/CIRABIRewriteContext.cpp
+8-6mlir/include/mlir/ABI/Targets/Test/TestTarget.h
+10-3clang/lib/CIR/Dialect/Transforms/CallConvLoweringPass.cpp
+8-4mlir/lib/ABI/Targets/Test/TestTarget.cpp
+8-2mlir/include/mlir/ABI/ABIRewriteContext.h
+174-266 files

LLVM/project bcf0cd1lldb/include/lldb/Utility Locked.h, lldb/unittests/Utility LockedTest.cpp

[lldb] Add Guarded<T, Mutex> to Locked.h (#219421)

LLDB's code base has many variables that have an associated mutex that
needs to be locked to safely access that variable from multiple threads.
However, this locking scheme is currently not enforced by the compiler
and code sometimes accesses these variables without aquiring the
respective mutex first.

This patch introduces a `Guarded` class that strictly enforces that some
memory is only accessed after the respective mutex has been aquired.
This class hands out `Locked` objects for every access which guarentee
that the mutex is held as long as the variable is in scope.
DeltaFile
+37-0lldb/unittests/Utility/LockedTest.cpp
+28-0lldb/include/lldb/Utility/Locked.h
+65-02 files

LLVM/project b7e9265llvm/lib/IR Verifier.cpp, llvm/test/Verifier DILocalScope-non-local-parent.ll

[Verifier] Diagnose local scope chains that miss their DISubprogram

visitFunction() resolved a DILocation's subprogram via
DILocalScope::getSubprogram(), which recurses through
DILexicalBlockBase::getScope() and casts each parent to DILocalScope.
A DILexicalBlock parented to a non-local scope, such as a DIFile,
therefore aborted the verifier before visitDILexicalBlockBase could
report "invalid local scope".
DeltaFile
+28-0llvm/test/Verifier/DILocalScope-non-local-parent.ll
+3-1llvm/lib/IR/Verifier.cpp
+31-12 files

LLVM/project 0df2580clang/lib/AST StmtProfile.cpp, clang/test/Modules pr220187.cppm

[C++20] [Modules] Profiling the lambda call operator only (#220203)

Close https://github.com/llvm/llvm-project/issues/220187

The root cause of the problem is that during the deserialization process
some of the implicit functions are out of sync. They will be the same in
the end. But at the point of profiling, they are different.

This patch fixes this by profiling the explicit lambda call only, which
should be correct too. This was the intention of
CXXRecordDecl::getLambdaCallOperator(), but we didn't use it due to
deserialization ordering issues.
DeltaFile
+40-0clang/test/Modules/pr220187.cppm
+5-1clang/lib/AST/StmtProfile.cpp
+45-12 files

LLVM/project 7d31659llvm/lib/Analysis IVDescriptors.cpp, llvm/lib/Transforms/Vectorize VPlanConstruction.cpp

[LV] Vectorize fmin/fmax reductions (#198300)

Teach LoopVectorize to recognize fmin/fmax reductions. This patch only
supports reductions of this kind which have the FP `minimum/maximum` and
`minimumnum/maximumnum` semantics.
DeltaFile
+953-178llvm/test/Transforms/LoopVectorize/select-last-index-fp.ll
+30-3llvm/lib/Transforms/Vectorize/VPlanConstruction.cpp
+1-1llvm/lib/Analysis/IVDescriptors.cpp
+984-1823 files

FreeBSD/ports c66b711security/fakeroot/files patch-communicate.h patch-test-t.chown

security/fakeroot: Update to 2.1.4

and switch to meson for building.

Changelog:      https://salsa.debian.org/clint/fakeroot/-/blob/debian/2.1.4-1/debian/changelog?ref_type=tags
DeltaFile
+240-139security/fakeroot/files/patch-doc.diff
+38-0security/fakeroot/files/patch-libfakeroot_time64_entry.c
+0-17security/fakeroot/files/patch-scripts-Makefile.in
+12-0security/fakeroot/files/patch-test-t.chown
+12-0security/fakeroot/files/patch-test-cp-atest
+11-0security/fakeroot/files/patch-communicate.h
+313-1563 files not shown
+321-1669 files

FreeBSD/ports aaa28e3databases/couchdb3 Makefile pkg-plist

databases/couchdb3: Resolve bundled OTP versions dynamically in PLIST_SUB

The release bundles erts and 13 OTP applications from
lang/erlang-runtime28, and pkg-plist pinned each of their versioned
directory names. Six of the last eight plist commits were pure OTP
rename churn, the largest touching 610 lines, while the 3.5.2 update
itself touched 23.

Derive the versions from the installed runtime at plist-generation time
instead. The package file list is unchanged: resolving the tokenized
plist with the versions this build staged reproduces the previous
pkg-plist byte for byte, so no PORTREVISION bump is needed.

An erlang-runtime28 update now needs only a PORTREVISION bump. Note
this reads ${LOCALBASE}/lib/erlang28 rather than the staged release,
because generate-plist runs before do-install; it holds as long as the
release copies erts and the OTP applications unmodified.

CouchDB's own rebar dependencies stay pinned deliberately - they move

    [4 lines not shown]
DeltaFile
+622-622databases/couchdb3/pkg-plist
+14-1databases/couchdb3/Makefile
+636-6232 files

FreeBSD/ports 57e1bbcgames/flightgear-aircraft Makefile distinfo

games/flightgear-aircraft: Update to 20260901
DeltaFile
+62-62games/flightgear-aircraft/distinfo
+1-1games/flightgear-aircraft/Makefile
+63-632 files

LLVM/project cd08ff0llvm/test/CodeGen/AArch64/GlobalISel knownbits-add.mir knownbits-fshl-fshr.mir

[AArch64][GlobalISel] Regenerate knownbits tests. NFC (#220200)

Mostly just adding IsKnownNeverZero. knownbits-srem.mir now has auto
generated check lines.
DeltaFile
+463-463llvm/test/CodeGen/AArch64/GlobalISel/knownbits-vector.mir
+101-101llvm/test/CodeGen/AArch64/GlobalISel/knownbits-uadde.mir
+101-101llvm/test/CodeGen/AArch64/GlobalISel/knownbits-sadde.mir
+97-97llvm/test/CodeGen/AArch64/GlobalISel/knownbits-rotl-rotr.mir
+95-95llvm/test/CodeGen/AArch64/GlobalISel/knownbits-fshl-fshr.mir
+80-80llvm/test/CodeGen/AArch64/GlobalISel/knownbits-add.mir
+937-93732 files not shown
+1,857-1,87138 files

OPNSense/core 80e403esrc/opnsense/mvc/app/views/OPNsense/Firewall filter_rule.volt

Only normalize when changing away from pass, as we don't know the intention when switching back to pass
DeltaFile
+1-3src/opnsense/mvc/app/views/OPNsense/Firewall/filter_rule.volt
+1-31 files

FreeBSD/ports 6cb4074math/scilab-toolbox-swt pkg-plist distinfo

math/scilab-toolbox-swt: 0.3.3

Update to release of January 9, 2025.
https://atoms.scilab.org/toolboxes/swt/0.3.3

Postponed expiration as upstream seems active and math/scilab was undeprecated.
But as nobody noticed when the port was broken I doubt we have any users of this.
If you use this, please speak up and mail the maintainer.

Depend on fortran to fix: (fortran was indirectly pulled in by the dependency on math/scilab)
====> Running Q/A tests (stage-qa)
Error: /usr/local/share/scilab/contrib/swt/sci_gateway/c/libswt_c.so is linked to /usr/local/lib/gcc14/libgfortran.so.5 from lang/gcc14 but it is not declared as a dependency
Error: /usr/local/share/scilab/contrib/swt/sci_gateway/c/libswt_c.so is linked to /usr/local/lib/gcc14/libquadmath.so.0 from lang/gcc14 but it is not declared as a dependency

Remove REINPLACE_CMD for:
====> Running Q/A tests (stage-qa)
Warning: Possible REINPLACE_CMD issues:
- - REINPLACE_CMD ran, but did not modify file contents: sci_gateway/c/swt_common.h

Approved by:    no maintainer
DeltaFile
+5-10math/scilab-toolbox-swt/Makefile
+3-3math/scilab-toolbox-swt/distinfo
+0-1math/scilab-toolbox-swt/pkg-plist
+8-143 files

LLVM/project b0a9909llvm/lib/Transforms/Vectorize VPlan.h VPlanUtils.cpp, llvm/test/Transforms/LoopVectorize runtime-checks-difference.ll nested-loops-scev-expansion.ll

[VPlan] Expand AddRecs in Plan's entry (#209921)

Extend VPSCEVExpander to expand AddRecs in the Plan's entry. In the
general case, an AddRec's loop header refers to a BasicBlock that is no
longer in the Plan, and we have to fall back to the IR SCEV expander.
However, when the Plan's entry has a canonical IV that we can re-use as
a VPIRPhi, expand the AddRec to VPInstructions.
DeltaFile
+50-9llvm/test/Transforms/LoopVectorize/VPlan/expand-scev.ll
+33-6llvm/lib/Transforms/Vectorize/VPlanUtils.cpp
+1-2llvm/test/Transforms/LoopVectorize/runtime-checks-difference.ll
+1-2llvm/test/Transforms/LoopVectorize/nested-loops-scev-expansion.ll
+1-1llvm/lib/Transforms/Vectorize/VPlan.h
+86-205 files

LLVM/project 7a98322llvm/lib/Target/SPIRV SPIRVNonSemanticDebugHandler.cpp, llvm/test/CodeGen/SPIRV/debug-info debug-scope-same-line.ll debug-scope-block.ll

Add support for NSDI DebugScope, DebugNoScope and DebugInlinedAt
DeltaFile
+127-18llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.cpp
+83-0llvm/test/CodeGen/SPIRV/debug-info/debug-inlined-at-recursive.ll
+68-0llvm/test/CodeGen/SPIRV/debug-info/debug-inlined-at.ll
+67-0llvm/test/CodeGen/SPIRV/debug-info/debug-scope.ll
+66-0llvm/test/CodeGen/SPIRV/debug-info/debug-scope-block.ll
+63-0llvm/test/CodeGen/SPIRV/debug-info/debug-scope-same-line.ll
+474-1815 files not shown
+658-2121 files

LLVM/project 7fc91d9llvm/lib/Target/SPIRV SPIRVNonSemanticDebugHandler.h SPIRVNonSemanticDebugHandler.cpp, llvm/test/CodeGen/SPIRV/debug-info debug-typedef-namespace-scope.ll debug-lexical-block-namespace.ll

Add support for DebugLexicalBlock. (#217965)

Emit
[DebugLexicalBlock](https://github.khronos.org/SPIRV-Registry/nonsemantic/NonSemantic.Shader.DebugInfo.html#DebugLexicalBlock)
for LLVM DILexicalBlock and DINamespace.

This also lets module-scope debug entities (globals, typedefs,
functions, composites) reference a lexical parent instead of always
choosing the compilation unit.

Summary of changes:

1. Collect DILexicalBlock / DINamespace and keep track of their relative
order for later emission.
2. Emit namespace scopes as DebugLexicalBlock before DebugFunction so
namespace-scoped functions and globals can use them as Parent.
3. Emit IR-function-body DILexicalBlock scopes as DebugLexicalBlock
after DebugFunction so these DebugLexicalBlock can properly reference
their parents.
4. Update the already-existing parent scope handling in other opcodes to
use the new data available.
DeltaFile
+120-5llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.cpp
+61-0llvm/test/CodeGen/SPIRV/debug-info/debug-lexical-block.ll
+51-0llvm/test/CodeGen/SPIRV/debug-info/debug-lexical-block-namespace-in-block.ll
+48-0llvm/test/CodeGen/SPIRV/debug-info/debug-lexical-block-namespace.ll
+31-0llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.h
+26-0llvm/test/CodeGen/SPIRV/debug-info/debug-typedef-namespace-scope.ll
+337-52 files not shown
+355-158 files

LLVM/project af6ae63clang/lib/StaticAnalyzer/Checkers StdLibraryFunctionsChecker.cpp, clang/test/Analysis stdlibraryfunction-darwin.c

[clang][analyzer] Fix false positive in StdLibraryFunctionsChecker for mmap with MAP_ANON (#219568)

On Darwin,`mmap(2)` acccepts a Mach VM tag encoded in the fd argument
when `MAP_ANON` is set; the encoding is done using `VM_MAKE_TAG(tag)`,
which expands to `(tag << 24)` and is therefore a large negative signed
value for tags >= 128.

This causes a false positive with the existing constraint, which
restricts `fd` to be >= 1, when code uses a `VM_MAKE_TAG` value as the
`fd` argument. The fix here is to eliminate the false positive by
omitting the `fd` constraint on Darwin targets, because it can't be
expressed as a simple range. This does give rise to false negatives (any
`fd` < -1 on Darwin when `MAP_ANON` is not set), but any code with such
a false negative would crash immediately when trying to use the invalid
file descriptor, rather than exhibiting some more subtle dangerous
behavior.

AI disclosure: I used Claude Sonnet 4.6 to help diagnose the original
false positive and suggest possible fixes.

rdar://185124909
DeltaFile
+31-0clang/test/Analysis/stdlibraryfunction-darwin.c
+21-7clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp
+52-72 files

LLVM/project 9139bffclang/lib/CIR/CodeGen CIRGenModule.cpp, clang/test/CIR/CodeGenCUDA template-class-static-member.cu

[CIR][CUDA/HIP] Fix template static member filtering (#219536)

Check host/device attributes before emitting static member of template
instantiation. This is basically a CIR version of
77fd30f7ce0795b4bbc22e65b3ff42856839d708 .
DeltaFile
+79-0clang/test/CIR/CodeGenCUDA/template-class-static-member.cu
+2-1clang/lib/CIR/CodeGen/CIRGenModule.cpp
+81-12 files