LLVM/project 458f1aapolly/include/polly ScopInliner.h, polly/lib/Support RegisterPasses.cpp

[Polly] Forward VFS from PassBuilder for IO sandboxing (#188657)

#184545 default-enables the IO sandbox in assert-builds. This causes
Clang using Polly to crash (#188568).

The issue is that `PassBuilder` uses `vfs::getRealFileSystem()` by
default which is considered a IO sandbox violation in the Clang process.
With this PR store the VFS from the `PassBuilder` from the original
`registerPollyPasses` call for creating other `PassBuilder` instances.

This PR also adds infrastructure for running Polly in `clang` (in
addition in `opt`). `opt` does not enable the sandbox such that we need
separate tests using Clang.

Closes: #188568
DeltaFile
+26-11polly/lib/Support/RegisterPasses.cpp
+0-23polly/test/CodeGen/RuntimeDebugBuilder/combine_different_values.c
+21-0polly/test/lit.cfg
+11-4polly/lib/Transform/ScopInliner.cpp
+10-1polly/include/polly/ScopInliner.h
+9-0polly/test/polly.c
+77-396 files not shown
+89-4212 files

LLVM/project 191a9a9llvm/utils/gn/secondary/clang/unittests/Format BUILD.gn

[gn build] Port c0bd2f9084d7
DeltaFile
+1-0llvm/utils/gn/secondary/clang/unittests/Format/BUILD.gn
+1-01 files

LLVM/project c0bd2f9clang/unittests/Format AlignmentTest.cpp FormatTest.cpp

[clang-format][NFC] Extract some alignment tests

FormatTest.cpp is too huge, extract some tests to mitigate this a bit.
DeltaFile
+3,566-0clang/unittests/Format/AlignmentTest.cpp
+0-3,543clang/unittests/Format/FormatTest.cpp
+1-0clang/unittests/Format/CMakeLists.txt
+3,567-3,5433 files

LLVM/project 617ec39llvm/test/Transforms/LoopVectorize/VPlan dissolve-replicate-regions.ll

[VPlan] Add printing test for dissolving replicate regions. (#189192)

Add VPlan printing test for
 https://github.com/llvm/llvm-project/pull/186252
 https://github.com/llvm/llvm-project/pull/189022
DeltaFile
+202-0llvm/test/Transforms/LoopVectorize/VPlan/dissolve-replicate-regions.ll
+202-01 files

LLVM/project 4450891llvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/X86 non-reduced-select-of-bits.ll

[SLP] Check if potential bitcast/bswap candidate is a root of reduction

Need to check if the potential bitcast/bswap-like construct is a root of
the reduction, otherwise it cannot represent a bitcast/bswap construct.

Fixes #189184
DeltaFile
+55-0llvm/test/Transforms/SLPVectorizer/X86/non-reduced-select-of-bits.ll
+1-1llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+56-12 files

LLVM/project ba6041bllvm/lib/Transforms/Scalar LowerMatrixIntrinsics.cpp, llvm/test/Transforms/LowerMatrixIntrinsics multiply-fused-differing-addr-spaces.ll

[Matrix] Handle load/store with different AS in getNonAliasingPointer. (#188721)

If a load and a store have different address spaces, we cannot create a
runtime check. Instead, always copy the data to an alloca matching the
store address space.

Fixes https://github.com/llvm/llvm-project/issues/185236.

PR: https://github.com/llvm/llvm-project/pull/188721
DeltaFile
+369-0llvm/test/Transforms/LowerMatrixIntrinsics/multiply-fused-differing-addr-spaces.ll
+15-0llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp
+384-02 files

LLVM/project 73c8ed0llvm/lib/Transforms/Vectorize SLPVectorizer.cpp

Rebase, address comments

Created using spr 1.3.7
DeltaFile
+60-38llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+60-381 files

LLVM/project 28674ddllvm/lib/Target/AMDGPU AMDGPUInstCombineIntrinsic.cpp, llvm/test/Transforms/InstCombine/AMDGPU mbcnt.ll llvm.amdgcn.wave.shuffle.ll

AMDGPU: Add range attribute to mbcnt intrinsic callsites

It seems the known bits handling added in 686987a540bc176bceaad43ffe530cb3e88796d5
is insufficient to perform many range based optimizations. For some reason
computeConstantRange doesn't fall back on KnownBits, and has a separate,
less used form which tries to use computeKnownBits.
DeltaFile
+236-15llvm/test/Transforms/InstCombine/AMDGPU/mbcnt.ll
+22-22llvm/test/Transforms/InstCombine/AMDGPU/llvm.amdgcn.wave.shuffle.ll
+22-2llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp
+1-1llvm/test/Transforms/InstCombine/AMDGPU/canonicalize-add-to-gep.ll
+281-404 files

LLVM/project 9015a18llvm/lib/Target/AMDGPU AMDGPULegalizerInfo.cpp SIISelLowering.cpp, llvm/test/CodeGen/AMDGPU rsq.f64.ll fdiv.f64.ll

AMDGPU: Skip last corrections in afn f64 reciprocal

Device libs has a fast reciprocal macro that is close
to the fast division expansion, but skips the last terms
compared to the full division.

The basic reciprocal handling has identical output to this
macro. The negative reciprocal case has different fneg placement
and smaller code size, but I believe should be the same.
DeltaFile
+32-116llvm/test/CodeGen/AMDGPU/rsq.f64.ll
+37-7llvm/test/CodeGen/AMDGPU/GlobalISel/fdiv.f64.ll
+17-1llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
+16-1llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+12-2llvm/test/CodeGen/AMDGPU/fdiv.f64.ll
+0-4llvm/test/CodeGen/AMDGPU/fneg-combines.new.ll
+114-1311 files not shown
+114-1337 files

LLVM/project 805a814llvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/X86 copyable_reorder.ll reused-last-instruction-in-split-node.ll

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+21-44llvm/test/Transforms/SLPVectorizer/X86/copyable_reorder.ll
+55-0llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+1-1llvm/test/Transforms/SLPVectorizer/X86/reused-last-instruction-in-split-node.ll
+1-1llvm/test/Transforms/SLPVectorizer/X86/bottom-to-top-reorder.ll
+78-464 files

LLVM/project 9f3a9eamlir/lib/Dialect/XeGPU/Transforms XeGPUSgToWiDistributeExperimental.cpp, mlir/test/Dialect/XeGPU sg-to-wi-experimental-unit.mlir

[MLIR][XeGPU] Add distribution patterns for vector step, shape_cast & broadcast from sg-to-wi (#185960)

This PR adds distribution patterns for vector.step, vector.shape_cast &
vector.broadcast in the new sg-to-wi pass
DeltaFile
+220-1mlir/lib/Dialect/XeGPU/Transforms/XeGPUSgToWiDistributeExperimental.cpp
+162-0mlir/test/Dialect/XeGPU/sg-to-wi-experimental-unit.mlir
+382-12 files

LLVM/project 9d6b92ellvm/lib/CodeGen/SelectionDAG SelectionDAG.cpp, llvm/test/CodeGen/AArch64 knownpow2-trunc-orzero.ll

[DAG] SelectionDAG::isKnownToBeAPowerOfTwo - add ISD::TRUNCATE handling and tests (#184365)

Closes #181654
DeltaFile
+34-0llvm/test/CodeGen/AArch64/knownpow2-trunc-orzero.ll
+9-11llvm/test/CodeGen/X86/known-pow2.ll
+5-0llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+48-113 files

LLVM/project 3f42ec6clang/lib/Format TokenAnnotator.cpp, clang/unittests/Format TokenAnnotatorTest.cpp

[clang-format] Fix annotation of references in function pointer typedefs (#188860)

Fixes #188695
DeltaFile
+6-0clang/unittests/Format/TokenAnnotatorTest.cpp
+1-1clang/lib/Format/TokenAnnotator.cpp
+7-12 files

LLVM/project 0ac35ecclang/lib/Format UnwrappedLineParser.cpp Format.cpp, clang/unittests/Format FormatTest.cpp

[clang-format] Fix breaking enum braces when combined with export (#189128)

This fixes #186684.

Also fix (not) breaking variables declared on the same line as the
closing brace.

And adapt whitesmith to that changes.
DeltaFile
+17-3clang/lib/Format/UnwrappedLineParser.cpp
+11-1clang/unittests/Format/FormatTest.cpp
+6-0clang/lib/Format/Format.cpp
+2-1clang/lib/Format/TokenAnnotator.cpp
+36-54 files

LLVM/project f0ce26dlibc/src/__support/math log2p1f16.h CMakeLists.txt, libc/src/math log2p1f16.h

[libc][math][c23] Add log2p1f16 C23 math function (#186754)

Signed-off-by: Shikhar Soni <shikharish05 at gmail.com>
DeltaFile
+207-0libc/src/__support/math/log2p1f16.h
+49-0libc/test/src/math/log2p1f16_test.cpp
+48-0libc/test/src/math/smoke/log2p1f16_test.cpp
+21-0libc/src/math/log2p1f16.h
+18-0libc/src/math/generic/log2p1f16.cpp
+18-0libc/src/__support/math/CMakeLists.txt
+361-018 files not shown
+433-124 files

LLVM/project 15940b1libcxx/cmake/caches AMDGPU.cmake NVPTX.cmake

[libcxx] Update GPU cache files to use the proper loader

Summary:
These were renamed and the aliases removed, fix running the tests.
DeltaFile
+1-1libcxx/cmake/caches/AMDGPU.cmake
+1-1libcxx/cmake/caches/NVPTX.cmake
+2-22 files

LLVM/project e568136mlir/python/mlir/dialects ext.py, mlir/test/python/dialects ext.py

[MLIR][Python] Add more field specifiers to Python-defined operations (#188064)

This PR adds two new field specifiers (`operand` and `attribute`) and
extends the existing one (`result`):
- `default_factory` parameter is added for `result` and `attribute` to
specify default value via a lambda/function
- `kw_only` parameter is added for all these three specifiers, to make a
field a keyword-only parameter (without giving a default value).

```python
def result(
    *,
    infer_type: bool = False,
    default_factory: Optional[Callable[[], Any]] = None,
    kw_only: bool = False,
) -> Any: ...


def operand(

    [43 lines not shown]
DeltaFile
+131-29mlir/python/mlir/dialects/ext.py
+99-1mlir/test/python/dialects/ext.py
+230-302 files

LLVM/project 3b76b85mlir/test/Bytecode bytecode_callback.mlir, mlir/test/lib/IR TestBytecodeRoundtrip.cpp

[MLIR] Fix crash in test-bytecode-roundtrip when test dialect is absent (#189163)

When invoking `-test-bytecode-roundtrip=test-dialect-version=X.Y` on a
module that contains no test dialect operations, the reader type
callback in `runTest0` called
`reader.getDialectVersion<test::TestDialect>()` and then immediately
asserted that it succeeded. However, if the test dialect was never
referenced in the bytecode (because no test dialect types appear in the
module), the dialect's version information is not stored in the
bytecode, so `getDialectVersion` legitimately returns failure.

When the test dialect version is unavailable in the bytecode being read,
the module contains no test dialect types, so no "funky"-group overrides
are needed and the callback can safely skip by returning `success()`.

A regression test is added with a module that has no test dialect ops,
exercising the `test-dialect-version=2.0` path that previously crashed.

Fixes #128321

    [2 lines not shown]
DeltaFile
+13-0mlir/test/Bytecode/bytecode_callback.mlir
+5-3mlir/test/lib/IR/TestBytecodeRoundtrip.cpp
+18-32 files

LLVM/project 16e0658clang/www cxx_status.html

[Clang][NFC] Trivial relocation is no longer a c++26 feature
DeltaFile
+0-5clang/www/cxx_status.html
+0-51 files

LLVM/project 00c6b4dmlir/lib/Dialect/Vector/IR VectorOps.cpp, mlir/test/Dialect/Vector canonicalize.mlir

[MLIR][Vector] Fix crash in foldDenseElementsAttrDestInsertOp on poison index (#188508)

When a dynamic index of -1 (the kPoisonIndex sentinel) was folded into
the static position of a vector.insert op,
foldDenseElementsAttrDestInsertOp would proceed to call
calculateInsertPosition, which returned -1. The subsequent iterator
arithmetic (allValues.begin() + (-1)) was undefined behaviour, causing
an assertion in DenseElementsAttr::get.

Fix by bailing out early in foldDenseElementsAttrDestInsertOp when any
static position equals kPoisonIndex, consistent with how
InsertChainFullyInitialized already guards this case.

Fixes #188404

Assisted-by: Claude Code
DeltaFile
+19-0mlir/test/Dialect/Vector/canonicalize.mlir
+5-0mlir/lib/Dialect/Vector/IR/VectorOps.cpp
+24-02 files

LLVM/project 64d2f70clang/www cxx_status.html

[Clang][NFC] Add the list of C++26 papers approved in Kona and Croydon
DeltaFile
+57-7clang/www/cxx_status.html
+57-71 files

LLVM/project 1efef76mlir/include/mlir/Dialect/ControlFlow/IR ControlFlowOps.td, mlir/include/mlir/Interfaces ControlFlowInterfaces.td

Revert "[mlir][reducer] Add eraseRedundantBlocksInRegion and getSuccessorForwardOperands API to BranchOpInterface" (#189150)

Reverts llvm/llvm-project#187864, because it is causing same build bot
failures. See https://lab.llvm.org/buildbot/#/builders/138/builds/27662
and
https://lab.llvm.org/buildbot/#/builders/169/builds/21376/steps/11/logs/stdio
for memory leak issues.
DeltaFile
+0-115mlir/lib/Reducer/ReductionTreePass.cpp
+0-66mlir/test/mlir-reduce/reduction-tree.mlir
+0-24mlir/lib/Dialect/ControlFlow/IR/ControlFlowOps.cpp
+4-6mlir/include/mlir/Dialect/ControlFlow/IR/ControlFlowOps.td
+0-10mlir/lib/Reducer/ReductionNode.cpp
+0-9mlir/include/mlir/Interfaces/ControlFlowInterfaces.td
+4-2301 files not shown
+4-2337 files

LLVM/project 4be3696mlir/include/mlir/Dialect/ControlFlow/IR ControlFlowOps.td, mlir/include/mlir/Interfaces ControlFlowInterfaces.td

Revert "[mlir][reducer] Add eraseRedundantBlocksInRegion and getSuccessorForw…"

This reverts commit eb53972051f175224569ebc28e8dafbf73930b4d.
DeltaFile
+0-115mlir/lib/Reducer/ReductionTreePass.cpp
+0-66mlir/test/mlir-reduce/reduction-tree.mlir
+0-24mlir/lib/Dialect/ControlFlow/IR/ControlFlowOps.cpp
+4-6mlir/include/mlir/Dialect/ControlFlow/IR/ControlFlowOps.td
+0-10mlir/lib/Reducer/ReductionNode.cpp
+0-9mlir/include/mlir/Interfaces/ControlFlowInterfaces.td
+4-2301 files not shown
+4-2337 files

LLVM/project 5ae2fe7mlir/lib/Dialect/Vector/IR VectorOps.cpp, mlir/test/Dialect/Vector invalid.mlir

[mlir][vector] Reject alignment attribute on tensor-level gather/scatter (#188924)
DeltaFile
+18-0mlir/test/Dialect/Vector/invalid.mlir
+8-0mlir/lib/Dialect/Vector/IR/VectorOps.cpp
+26-02 files

LLVM/project ad91a2fclang-tools-extra/clang-tidy/cppcoreguidelines RvalueReferenceParamNotMovedCheck.cpp, clang-tools-extra/docs ReleaseNotes.rst

[clang-tidy] Fix rvalue-reference-param-not-moved FP on implicit functions (#189113)

Fixes https://github.com/llvm/llvm-project/issues/187716.
DeltaFile
+61-0clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/rvalue-reference-param-not-moved.cpp
+5-0clang-tools-extra/docs/ReleaseNotes.rst
+1-0clang-tools-extra/clang-tidy/cppcoreguidelines/RvalueReferenceParamNotMovedCheck.cpp
+67-03 files

LLVM/project eb53972mlir/include/mlir/Dialect/ControlFlow/IR ControlFlowOps.td, mlir/include/mlir/Interfaces ControlFlowInterfaces.td

[mlir][reducer] Add eraseRedundantBlocksInRegion and getSuccessorForwardOperands API to BranchOpInterface (#187864)

To simplify the output of the reduction-tree pass, this PR introduces
the eraseRedundantBlocksInRegion. For regions containing multiple
execution paths, this functionality selects the shortest 'interesting'
path. Additionally, this PR adds the getSuccessorForwardOperands API to
BranchOpInterface. This allows us to extract the ForwardOperands for a
specific path chosen from multiple alternatives, enabling the creation
of a cf.br operation for the redirected jump.
DeltaFile
+115-0mlir/lib/Reducer/ReductionTreePass.cpp
+66-0mlir/test/mlir-reduce/reduction-tree.mlir
+24-0mlir/lib/Dialect/ControlFlow/IR/ControlFlowOps.cpp
+6-4mlir/include/mlir/Dialect/ControlFlow/IR/ControlFlowOps.td
+10-0mlir/lib/Reducer/ReductionNode.cpp
+9-0mlir/include/mlir/Interfaces/ControlFlowInterfaces.td
+230-41 files not shown
+233-47 files

LLVM/project 097abb3clang/lib/AST/ByteCode InterpBuiltin.cpp, clang/test/AST/ByteCode builtins.c

[clang][bytecode] Handle strcmp() not pointing to primitive arrays (#188917)
DeltaFile
+12-0clang/test/AST/ByteCode/builtins.c
+3-0clang/lib/AST/ByteCode/InterpBuiltin.cpp
+15-02 files

LLVM/project cb8b65eclang/lib/AST/ByteCode Compiler.cpp Compiler.h, clang/test/CodeGenObjC no-nsconstant-literals.m objc2-constant-collection-literals.m

[clang][bytecode] Add support for objc array- and dictionary literals (#189058)
DeltaFile
+15-0clang/lib/AST/ByteCode/Compiler.cpp
+6-0clang/test/CodeGenObjC/no-nsconstant-literals.m
+6-0clang/test/CodeGenObjC/objc2-constant-collection-literals.m
+2-0clang/lib/AST/ByteCode/Compiler.h
+29-04 files

LLVM/project b9ca7e4llvm/include/llvm/Frontend/OpenMP OMPIRBuilder.h, llvm/lib/Frontend/OpenMP OMPIRBuilder.cpp

WIP
DeltaFile
+185-47mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
+65-62llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+92-0mlir/test/Target/LLVMIR/openmp-iterator.mlir
+57-0mlir/test/Target/LLVMIR/omptarget-depend-iterator.mlir
+34-9llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
+15-2llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp
+448-1202 files not shown
+462-1258 files

LLVM/project fb09449clang/lib/AST/ByteCode Compiler.cpp EvalEmitter.cpp, clang/test/CodeGenCXX reference-temporary-subobject.cpp static-local-in-local-class.cpp

[clang][bytecode] Skip rvalue subobject adjustments for global temporaries (#189044)

We only did this for local variables but were were missing it for
globals.
DeltaFile
+35-22clang/lib/AST/ByteCode/Compiler.cpp
+8-3clang/lib/AST/ByteCode/EvalEmitter.cpp
+2-3clang/lib/AST/ByteCode/Program.cpp
+1-1clang/lib/AST/ByteCode/Program.h
+2-0clang/test/CodeGenCXX/reference-temporary-subobject.cpp
+1-0clang/test/CodeGenCXX/static-local-in-local-class.cpp
+49-296 files