LLVM/project 35c7191mlir/include/mlir/Analysis/Presburger Matrix.h, mlir/lib/Analysis/Presburger Matrix.cpp

[MLIR][Presburger] Conversion between Int- and FracMatrix (#192822)

A straightforward conversion between `IntMatrix` and `FracMatrix`. This
is one further preparation PR.

The next step for upstreaming is to find a particular solution `x` to
the system `Ax = Bp + C`, which might contain fractions while `A`, `B`
and `C` are IntMatrices. That's the reason we need these conversion
helpers.

---------

Co-authored-by: Arjun Pitchanathan <arjunpitchanathan at gmail.com>
DeltaFile
+18-0mlir/lib/Analysis/Presburger/Matrix.cpp
+8-0mlir/include/mlir/Analysis/Presburger/Matrix.h
+26-02 files

LLVM/project becb707llvm/include/llvm/ADT FoldingSet.h ImmutableSet.h, llvm/lib/IR Intrinsics.cpp

Rebase, address comments

Created using spr 1.3.7
DeltaFile
+214-184llvm/test/CodeGen/X86/subcarry.ll
+94-105llvm/include/llvm/ADT/FoldingSet.h
+61-69llvm/include/llvm/ADT/ImmutableSet.h
+52-0llvm/test/Transforms/SLPVectorizer/X86/shuffled-gathered-vectors.ll
+31-13llvm/lib/IR/Intrinsics.cpp
+36-7llvm/utils/TableGen/Basic/CodeGenIntrinsics.cpp
+488-37831 files not shown
+719-62437 files

LLVM/project 6f2deabllvm/include/llvm/CodeGen SelectionDAGNodes.h, llvm/lib/CodeGen/SelectionDAG DAGCombiner.cpp

[SelectionDAG][NFC] Add function for `peekThroughFreeze` (#195324)

There are a few callsites in SelectionDAG and DAGCombiner where it is
necessary to look through an `ISD::FREEZE` to unblock some optimization
and folds. This patch introduces `peekThroughFreeze` and
`peekThroughOneUseFreeze` utility functions to cleanup the repeated sites.
DeltaFile
+16-0llvm/include/llvm/CodeGen/SelectionDAGNodes.h
+1-6llvm/lib/Target/X86/X86ISelLowering.cpp
+1-3llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
+1-3llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp
+1-1llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+20-135 files

LLVM/project 2ae0fbbclang/docs ReleaseNotes.rst, clang/lib/Sema SemaTemplateInstantiate.cpp

[Clang][ItaniumMangle] Preserve field-name closure-prefix for instantiated lambdas (#195340)

Previously, instantiation did not pass `LambdaContextDecl`, so the NSDMI
lambda in the class template used the wrong `ContextDecl`.

Fixes: #190555
DeltaFile
+2-2clang/test/CodeGenCXX/lambda-expressions-nested-linkage.cpp
+3-0clang/docs/ReleaseNotes.rst
+2-1clang/lib/Sema/SemaTemplateInstantiate.cpp
+1-1clang/test/CodeGenCXX/dtor-local-lambda-mangle.cpp
+8-44 files

LLVM/project 58eadc4clang/include/clang/AST DeclCXX.h, clang/lib/AST DeclCXX.cpp

[clang][AST][NFC] Simplify ExplicitSpecifier (#193984)

One overload of each of these functions is all that is needed.
DeltaFile
+5-16clang/include/clang/AST/DeclCXX.h
+2-2clang/lib/AST/DeclCXX.cpp
+7-182 files

LLVM/project 6d97082clang/lib/AST/ByteCode Interp.cpp, clang/test/AST/ByteCode lifetimes.cpp

[clang][bytecode] Fix an assertion for composite array roots (#195530)

The assertion only holds if the array is primitive.
DeltaFile
+11-4clang/test/AST/ByteCode/lifetimes.cpp
+3-2clang/lib/AST/ByteCode/Interp.cpp
+14-62 files

LLVM/project 2ae4f5allvm/test/Transforms/SLPVectorizer/X86 buildvector-store-chains.ll

[SLP][NFC] Pre-commit tests for build-vector stores in store chains (#195531)

These tests exercise SLP store-chain handling when an explicit
build-vector store (a chain of insertelements stored to memory) is
interleaved with scalar stores at adjacent addresses. The CHECK lines
reflect current behavior:

- buildvector_store_middle: vector store sits in the middle of the
chain.
  SLP currently leaves it intact and packs the surrounding scalars into
  a narrower <2 x float> + scalar tail mix.

- buildvector_store_start / buildvector_store_end: vector store sits at
  the start/end of the chain. SLP already combines the adjacent scalar
  stores into a clean <4 x float> store, so these are regression cases
  that should remain unchanged.

- buildvector_store_duplicate_offset: scalar stores at the same address
  bracket the vector store; SLP keeps the chain split.

A follow-up patch updates the CHECK lines for the cases that change.
DeltaFile
+191-0llvm/test/Transforms/SLPVectorizer/X86/buildvector-store-chains.ll
+191-01 files

LLVM/project c4aba56llvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/X86 shuffled-gathered-vectors.ll

[SLP][REVEC] Replace all uses of direct gather scalar operands

When ReVec gather inserts a tree-vector scalar V directly as a
shufflevector operand (poison-vector path of createInsertVector), the
existing per-User external use only rewrites V's use inside that one
shufflevector. Other in-IR uses of V are left untouched and trigger
the "Deleting out-of-tree value" assertion in vectorizeTree when V's
tree entry is erased.

Register an additional nullptr-User external use so V's remaining
uses are rewritten via replaceAllUsesWith.

Fixes #195425

Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/195536
DeltaFile
+52-0llvm/test/Transforms/SLPVectorizer/X86/shuffled-gathered-vectors.ll
+9-0llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+61-02 files

LLVM/project 8cc0907llvm/test/CodeGen/X86 subcarry.ll

[X86] subcarry.ll - regenerate to show stack math and missing AVX512 codegen (#195524)
DeltaFile
+214-184llvm/test/CodeGen/X86/subcarry.ll
+214-1841 files

LLVM/project 2a2348eclang/test/Format clang-format-ignore.cpp list-ignored.cpp, clang/tools/clang-format ClangFormat.cpp

[clang-format] Honor later negated .clang-format-ignore patterns (#195432)

This addresses (#178344).
In this issue the negation (`!`) for paths inside .clang-format-ignore
doesn't behave as intended, as clang-format stops processing patterns on
the first match, rather than processing further rules/patterns.
Rather than 
```
foo/*
!foo/*.h
```
un-ignoring `.h`-files in `foo/` - the header-files remain ignored,
since the ignore-condition exits early and considers the files ignored
when checking `foo/*`.

I've tried to make negation work with the old behaviour (like mentioned
in #178344), but could find no sensible way to use it.
From the draft/proposal of .clang-format-ignore (#52975) it looks like
the intent of the negation pattern was to behave similar to .gitignore -

    [8 lines not shown]
DeltaFile
+38-0clang/test/Format/clang-format-ignore.cpp
+11-0clang/test/Format/list-ignored.cpp
+4-3clang/tools/clang-format/ClangFormat.cpp
+53-33 files

LLVM/project 26b8316clang/docs ClangFormatStyleOptions.rst, clang/include/clang/Format Format.h

[clang-format][docs] Clarify AllowShortFunctionsOnASingleLine deprecation (#195491)

Addresses #195326.
DeltaFile
+4-8clang/docs/ClangFormatStyleOptions.rst
+4-8clang/include/clang/Format/Format.h
+8-162 files

LLVM/project 4153b05llvm/include/llvm/IR PatternMatch.h, llvm/lib/Transforms/AggressiveInstCombine AggressiveInstCombine.cpp

[PatternMatch] Add m_Ctpop / m_Ctlz / m_Cttz matchers (#195520)
DeltaFile
+8-11llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
+16-0llvm/include/llvm/IR/PatternMatch.h
+4-8llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp
+4-5llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp
+3-6llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
+4-4llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
+39-347 files not shown
+48-4913 files

LLVM/project 8a68898llvm/lib/Transforms/Utils CloneFunction.cpp

[NFC][LLVM] Eliminate use of `getIntrinsicInfoTableEntries` from CloneFunction.cpp (#195448)

Simplify creation of constrained intrinsic calls by just using
`getOrInsertDeclaration` that accepts arg and return types of an
intrinsic and hence eliminating the need to look at the IIT descriptors
to map overload types.
DeltaFile
+7-28llvm/lib/Transforms/Utils/CloneFunction.cpp
+7-281 files

LLVM/project 79ebe71llvm/include/llvm/IR Intrinsics.h, llvm/lib/IR Intrinsics.cpp AutoUpgrade.cpp

[NFC][LLVM][Intrinsics] Add `hasStructReturnType` helper (#195457)

Add a helper function to query if an intrinsic has a struct return type
and use it in AutoUpgrade
DeltaFile
+7-0llvm/lib/IR/Intrinsics.cpp
+2-4llvm/lib/IR/AutoUpgrade.cpp
+3-0llvm/include/llvm/IR/Intrinsics.h
+12-43 files

LLVM/project 976817ellvm/test/Transforms/SLPVectorizer/X86 arith-sub-ssubo.ll arith-add-saddo.ll

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+2,947-615llvm/test/Transforms/SLPVectorizer/X86/arith-sub-ssubo.ll
+2,947-615llvm/test/Transforms/SLPVectorizer/X86/arith-add-saddo.ll
+2,947-615llvm/test/Transforms/SLPVectorizer/X86/arith-add-uaddo.ll
+2,947-615llvm/test/Transforms/SLPVectorizer/X86/arith-sub-usubo.ll
+846-515llvm/test/Transforms/SLPVectorizer/X86/arith-mul-umulo.ll
+640-473llvm/test/Transforms/SLPVectorizer/X86/arith-mul-smulo.ll
+13,274-3,4483 files not shown
+13,618-3,6539 files

LLVM/project 204f489llvm/include/llvm/IR Intrinsics.h, llvm/lib/IR Intrinsics.cpp

[NFC][LLVM] Make `matchIntrinsicSignature` static and rename it (#195380)

Make `matchIntrinsicSignature` static, rename it to `isSignatureValid`,
and change the sense of its return value to match the new name.
DeltaFile
+24-13llvm/lib/IR/Intrinsics.cpp
+0-12llvm/include/llvm/IR/Intrinsics.h
+24-252 files

LLVM/project 32f06d8llvm/include/llvm/ADT ImmutableSet.h ImmutableList.h

[NFC][LLVM][ADT] Remove function names from Doxygen comments (#195469)

Adopt LLVM CS recommendation to not repeat function or class name is
Doxygen comments.

https://llvm.org/docs/CodingStandards.html#doxygen-use-in-documentation-comments
DeltaFile
+61-69llvm/include/llvm/ADT/ImmutableSet.h
+19-21llvm/include/llvm/ADT/ImmutableList.h
+9-9llvm/include/llvm/ADT/ImmutableMap.h
+89-993 files

LLVM/project 25d6d33llvm/include/llvm/ADT FoldingSet.h EquivalenceClasses.h

[NFC][LLVM][ADT] Remove function names from Doxygen comments (#195467)

Adopt LLVM CS recommendation to not repeat function or class name is
Doxygen comments.

https://llvm.org/docs/CodingStandards.html#doxygen-use-in-documentation-comments
DeltaFile
+94-105llvm/include/llvm/ADT/FoldingSet.h
+21-22llvm/include/llvm/ADT/EquivalenceClasses.h
+3-4llvm/include/llvm/ADT/DepthFirstIterator.h
+118-1313 files

LLVM/project 8901889llvm/lib/IR FPEnv.cpp

[NFC][LLVM][FPEnv] Minor cleanup in convert to string functions (#195461)

Return string value directly from the switch-case.
DeltaFile
+11-23llvm/lib/IR/FPEnv.cpp
+11-231 files

LLVM/project ad03b7allvm/include/llvm/ADT StringRef.h

[NFC][LLVM][StringRef] Remove function names from header comments (#195463)

Adopt LLVM CS recommendation to not repeat function or class name is
Doxygen comments.

https://llvm.org/docs/CodingStandards.html#doxygen-use-in-documentation-comments
DeltaFile
+13-14llvm/include/llvm/ADT/StringRef.h
+13-141 files

LLVM/project a3d8c1cllvm/include/llvm/IR Intrinsics.td, llvm/test/TableGen intrinsic-overload-dependent-type-validation.td intrinsic-arginfo-error.td

[LLVM][Intrinsic] Move overload index validation to C++ (#195297)

Move overload index validation to C++ to enable more descriptive error
messages when that validation fails.

Also delete the `intrinsic-arginfo-error.td` test as its redundant.
DeltaFile
+36-7llvm/utils/TableGen/Basic/CodeGenIntrinsics.cpp
+23-8llvm/test/TableGen/intrinsic-overload-dependent-type-validation.td
+0-21llvm/include/llvm/IR/Intrinsics.td
+0-9llvm/test/TableGen/intrinsic-arginfo-error.td
+59-454 files

LLVM/project 120b580llvm/test/Transforms/SLPVectorizer sincos.ll

[SLP][NFC]Add sincos test, NFC



Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/195517
DeltaFile
+114-0llvm/test/Transforms/SLPVectorizer/sincos.ll
+114-01 files

LLVM/project 8e92d3bllvm/docs JITLink.rst

[JITLink][Docs] Update roadmap and availability sections (#195446)

This patch updates the JITLink documentation, in particular the
`Roadmap` and `JITLink Availability and Feature Status` to match the
latest code changes. I am not an expert on the JITLink codebase, so let
me know if I missed something.

Fixes #191781
DeltaFile
+33-16llvm/docs/JITLink.rst
+33-161 files

LLVM/project ef2815dllvm/test/Transforms/LoopVectorize/AArch64 call-costs.ll

[LV] Add test for cost modeling wide calls with mixed return types (NFC) (#195177)

Add missing test coverage for test with multiple calls with different
return types
DeltaFile
+69-7llvm/test/Transforms/LoopVectorize/AArch64/call-costs.ll
+69-71 files

LLVM/project 9eb57b6mlir/include/mlir/Dialect/LLVMIR NVVMOps.td

[MLIR][NVVM] Add `NVVM_F32UnaryApproxOp` Base Class (NFC) (#194378)

Add `NVVM_F32UnaryApproxOp` tablegen class to unify implementation
DeltaFile
+15-26mlir/include/mlir/Dialect/LLVMIR/NVVMOps.td
+15-261 files

LLVM/project efd429fllvm/lib/Transforms/Vectorize VPlanUnroll.cpp VPlanRecipes.cpp, llvm/test/Transforms/LoopVectorize hoist-predicated-loads-with-predicated-stores.ll struct-return-replicate.ll

[VPlan] Dissolve replicate regions with vector live-outs. (#189022)

Remove the scalar VF restriction and properly handle replicate regions
with vector live outs.

After unrolling the replicate regions, we end up with a set of scalar
VPPhis. The current patch post-processes them and converts them to
a chain of InsertElement + VPWidenPHiRecipes to match original codegen
as closely as possible.

An alternative would be to keep the phis scalar and combine them with
BuildVector at the end, but that would result in quite different
codegen.

Now that ::execute for replicate regions is dead, clean up
VPTransformState::Lane and various ::execute that relied on it.


Depends on https://github.com/llvm/llvm-project/pull/186252 

PR: https://github.com/llvm/llvm-project/pull/189022
DeltaFile
+120-200llvm/test/Transforms/LoopVectorize/X86/x86-interleaved-accesses-masked-group.ll
+50-96llvm/test/Transforms/LoopVectorize/X86/cost-conditional-branches.ll
+64-80llvm/test/Transforms/LoopVectorize/hoist-predicated-loads-with-predicated-stores.ll
+106-28llvm/lib/Transforms/Vectorize/VPlanUnroll.cpp
+26-108llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
+39-43llvm/test/Transforms/LoopVectorize/struct-return-replicate.ll
+405-55543 files not shown
+600-95349 files

LLVM/project 5d79fb0llvm/lib/IR DebugInfo.cpp, llvm/test/DebugInfo/Generic/assignment-tracking/declare-to-assign scalable-vector-memcpy.ll

[DebugInfo] Fix crash in declare-to-assign when memcpy writes to scalable-vector alloca (#194107)

## Problem

`declare-to-assign` (`AssignmentTrackingPass`) crashes with a fatal error when a fixed-size `memcpy` writes into a scalable-vector alloca (e.g. an RVV `vint32m1_t`):

Cannot implicitly convert a scalable size to a fixed-width size in TypeSize::operator ScalarTy()

**PS**: The compiler explorer always implicitly adds the '-g' option, when adding the '-g0', the crash will disappear: https://riscvc.godbolt.org/z/dEqhc4EoE

**Reproducer** (clang `-target riscv64-unknown-linux-gnu -march=rv64gcv -O1 -g`):
```c
#include <string.h>
#include <riscv_vector.h>
vint32m1_t get_i32x4(int* v) {
  vint32m1_t r;
  memcpy(&r, v, 16);
  return r;
}

    [13 lines not shown]
DeltaFile
+89-0llvm/test/DebugInfo/Generic/assignment-tracking/declare-to-assign/scalable-vector-memcpy.ll
+2-1llvm/lib/IR/DebugInfo.cpp
+91-12 files

LLVM/project b6fd155mlir/lib/Dialect/AMDGPU/Transforms FoldMemRefsOps.cpp

nits

Signed-off-by: Eric Feng <Eric.Feng at amd.com>
DeltaFile
+44-39mlir/lib/Dialect/AMDGPU/Transforms/FoldMemRefsOps.cpp
+44-391 files

LLVM/project d184d9allvm/tools/llubi/lib Interpreter.cpp

[llubi] Fix inconsistent intrinsic argument retrieval (#195499)

This PR fixes inconsistent intrinsic argument retrieval by making all
intrinsics fetch their arguments from `Args`. This change is a
prerequisite for handling parameter attributes in `enterCall`.
DeltaFile
+60-50llvm/tools/llubi/lib/Interpreter.cpp
+60-501 files

LLVM/project d873c55mlir/lib/Dialect/AMDGPU/IR AMDGPUOps.cpp, mlir/test/Dialect/AMDGPU invalid.mlir

nits

Signed-off-by: Eric Feng <Eric.Feng at amd.com>
DeltaFile
+11-15mlir/lib/Dialect/AMDGPU/IR/AMDGPUOps.cpp
+24-0mlir/test/Dialect/AMDGPU/invalid.mlir
+35-152 files