LLVM/project 872e45bllvm/lib/Target/X86 X86ISelLowering.cpp, llvm/test/CodeGen/X86 gfni-or-fold.ll

[X86] Fold OR of constant splats into GF2P8AFFINEQB (#194330)

Fold OR of a constant byte splat into X86ISD::GF2P8AFFINEQB when the
affine matrix is known at compile time.

For bits forced to 1 by the OR mask, zero the corresponding matrix rows
(in reverse row order within each 64-bit lane) and set the same bits in
the immediate. This turns:

  gf2p8affineqb(x, M, imm) | C

into:

  gf2p8affineqb(x, M & KeepMask, imm | C)

where KeepMask clears the rows for output bits selected by C.

This removes a separate OR after GF2P8AFFINEQB for constant-matrix cases
and extends the existing GFNI combine coverage beyond XOR folds.

Fixes: https://github.com/llvm/llvm-project/issues/191173
DeltaFile
+219-0llvm/test/CodeGen/X86/gfni-or-fold.ll
+53-15llvm/lib/Target/X86/X86ISelLowering.cpp
+272-152 files

LLVM/project 363fdc5llvm/lib/IR AsmWriter.cpp, llvm/test/Assembler dilabel.ll

[LLVM][IR] Make sure that DILabel's line is always printed (#200846)

This commit ensures that the textual IR of the DILabel always contains
the `line` information. This is required as the absence of a line causes
a parsing failure, i.e., this change fixes the print + parse roundtrip.
DeltaFile
+22-0llvm/test/Assembler/dilabel.ll
+1-1llvm/lib/IR/AsmWriter.cpp
+23-12 files

LLVM/project adcd285compiler-rt/lib/scudo/standalone secondary.h mem_map_linux.cpp, compiler-rt/lib/scudo/standalone/tests report_test.cpp

[scudo] Return nullptr if a remap fails on linux. (#200537)

Add a check if a fixed address mmap doesn't return the expected address.

Allow a remap call to fail if the mmap fails and returns a nullptr to
the caller.

Fix a place where if remap fails in the secondary, it didn't do
anything. Now it will unmap the original entry on failure.
DeltaFile
+7-2compiler-rt/lib/scudo/standalone/secondary.h
+5-3compiler-rt/lib/scudo/standalone/mem_map_linux.cpp
+8-0compiler-rt/lib/scudo/standalone/report_linux.cpp
+4-0compiler-rt/lib/scudo/standalone/report_linux.h
+3-0compiler-rt/lib/scudo/standalone/tests/report_test.cpp
+27-55 files

LLVM/project e4e39abllvm/lib/CodeGen MachineInstrBundle.cpp, llvm/test/CodeGen/AMDGPU finalizebundle.mir hard-clauses-gfx1250.mir

[CodeGen] Treat Reg uses which are partailly defined within bundle as internal read
DeltaFile
+76-0llvm/test/CodeGen/AMDGPU/finalizebundle.mir
+54-17llvm/lib/CodeGen/MachineInstrBundle.cpp
+42-0llvm/test/CodeGen/AMDGPU/hard-clauses-gfx1250.mir
+172-173 files

LLVM/project f3bed42llvm/lib/CodeGen/SelectionDAG TargetLowering.cpp, llvm/test/CodeGen/AArch64 vector-splice-compress-mmo-align.ll

[SelectionDAG] Don't over-claim alignment on vector splice/compress stack MMOs (#200622)

expandVectorSplice and expandVECTOR_COMPRESS allocate their scratch slot
on the stack with getReducedAlign, but the memory accesses they generate
touching this slot use the type's natural alignment, which may be
larger!
DeltaFile
+35-0llvm/test/CodeGen/AArch64/vector-splice-compress-mmo-align.ll
+9-7llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+44-72 files

LLVM/project 4cef4efllvm/docs/CommandGuide llvm-debuginfo-analyzer.rst, llvm/include/llvm/DebugInfo/LogicalView/Readers LVIRReader.h

[llvm-debuginfo-analyzer] Add support for LLVM IR format. (#200603)

llvm-debuginfo-analyzer is a command line tool that processes debug
info contained in a binary file and produces a debug information
format agnostic “Logical View”, which is a high-level semantic
representation of the debug info, independent of the low-level format.

Add support for the LLVM IR format and be able to generate logical
views. Both textual representation (.ll) and bitcode (.bc) formats
are supported.

This relands https://github.com/llvm/llvm-project/pull/135440, which was
reverted in https://github.com/llvm/llvm-project/pull/199890.
It includes the fixes for the buildbots problems.
DeltaFile
+2,630-0llvm/lib/DebugInfo/LogicalView/Readers/LVIRReader.cpp
+362-0llvm/unittests/DebugInfo/LogicalView/IRReaderTest.cpp
+303-0llvm/include/llvm/DebugInfo/LogicalView/Readers/LVIRReader.h
+87-134llvm/docs/CommandGuide/llvm-debuginfo-analyzer.rst
+168-0llvm/test/tools/llvm-debuginfo-analyzer/IR/08-ir-multiple-compile-units.test
+151-0llvm/test/tools/llvm-debuginfo-analyzer/IR/01-ir-select-logical-elements.test
+3,701-13435 files not shown
+5,408-15241 files

LLVM/project 7bff896clang/lib/Sema SemaDeclAttr.cpp, llvm/lib/IR Verifier.cpp

[AMDGPU] Verify AMDGPU required workgroup size matches flat workgroup size
DeltaFile
+78-0llvm/test/Verifier/AMDGPU/reqd-work-group-size.ll
+78-0llvm/lib/IR/Verifier.cpp
+35-0mlir/lib/Target/LLVMIR/Dialect/ROCDL/ROCDLToLLVMIRTranslation.cpp
+35-0clang/lib/Sema/SemaDeclAttr.cpp
+12-12llvm/test/Transforms/InstCombine/AMDGPU/mbcnt-wave32-optimizations.ll
+19-0mlir/test/Target/LLVMIR/rocdl-invalid.mlir
+257-1220 files not shown
+357-8626 files

LLVM/project 7290d87clang/lib/CIR/CodeGen CIRGenBuiltinAMDGPU.cpp, clang/test/CIR/CodeGenHIP builtins-amdgcn.hip

[CIR][AMDGPU] Implement lowering for __builtin_amdgcn_dispatch_ptr (#199880)

Port `emitAMDGPUDispatchPtr` from OGCG. Emits the `amdgcn.dispatch.ptr`
intrinsic and inserts an address-space cast when the builtin's expected
return type differs.
DeltaFile
+29-6clang/lib/CIR/CodeGen/CIRGenBuiltinAMDGPU.cpp
+8-0clang/test/CIR/CodeGenHIP/builtins-amdgcn.hip
+37-62 files

LLVM/project fba43a5clang/lib/CIR/Lowering/DirectToLLVM LowerToLLVM.cpp, clang/test/CIR/Lowering call-llvm-intrinsic.cir

[CIR] Fix cir.call_llvm_intrinsic lowering for 0-result ops (#199516)

`cir.call_llvm_intrinsic` declares `Optional<CIR_AnyType>:$result`, but
the lowering indexed `op->getResultTypes()[0]` unconditionally and OOBed
on void calls.
Guard with `getNumResults()` and pick the void overload of
`LLVM::CallIntrinsicOp::create` in `createCallLLVMIntrinsicOp`.
DeltaFile
+27-0clang/test/CIR/Lowering/call-llvm-intrinsic.cir
+14-6clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+41-62 files

LLVM/project 5148d2dclang/lib/AST/ByteCode Descriptor.cpp Program.cpp, clang/unittests/AST/ByteCode Pointer.cpp

[clang][bytecode] Improve `getType()`  (#200342)

We previously often fell back to the type of the declaration, which is
wrong if we're pointing e.g. to a nested array.

Add a new unit test to vaildate this.
DeltaFile
+274-0clang/unittests/AST/ByteCode/Pointer.cpp
+27-26clang/lib/AST/ByteCode/Descriptor.cpp
+16-13clang/lib/AST/ByteCode/Program.cpp
+22-3clang/lib/AST/ByteCode/Pointer.h
+5-3clang/lib/AST/ByteCode/DynamicAllocator.cpp
+3-3clang/lib/AST/ByteCode/Descriptor.h
+347-481 files not shown
+348-487 files

LLVM/project a4e18dcllvm/include/llvm/ExecutionEngine/Orc ExecutorResolutionGenerator.h

[ORC] Fix header comment. NFC. (#200980)
DeltaFile
+1-1llvm/include/llvm/ExecutionEngine/Orc/ExecutorResolutionGenerator.h
+1-11 files

LLVM/project 3226701flang/lib/Lower/OpenMP OpenMP.cpp, flang/test/Lower/OpenMP/Todo metadirective-declarative.f90

Add todo guard for declarative construct

Metadirective variants are lowered through genOMPDispatch, which
only handles executable constructs. If the generated construct
queue contains a declarative directive, route it to the existing
TODO path instead of dispatching it.
DeltaFile
+10-0flang/test/Lower/OpenMP/Todo/metadirective-declarative.f90
+9-0flang/lib/Lower/OpenMP/OpenMP.cpp
+19-02 files

LLVM/project c0e4fc8

[ORC] Simplify DylibManager::lookupSymbols, remove LookupRequest. (#195954)

DylibManager::lookupSymbols used to take an array of LookupRequests,
where each request specified a handle and list of symbols to lookup
within that handle.

This commit replaces the array of lookup requests with a single handle
and list of symbols passed directly to lookupSymbols.

In practice all clients were passing a singlton array anyway, and
simplifying this signature significantly simplifies implementations.
DeltaFile
+0-00 files

LLVM/project db9d559clang/lib/Sema SemaDeclAttr.cpp, llvm/lib/IR Verifier.cpp

[AMDGPU] Verify AMDGPU required workgroup size matches flat workgroup size
DeltaFile
+78-0llvm/test/Verifier/AMDGPU/reqd-work-group-size.ll
+78-0llvm/lib/IR/Verifier.cpp
+35-0mlir/lib/Target/LLVMIR/Dialect/ROCDL/ROCDLToLLVMIRTranslation.cpp
+35-0clang/lib/Sema/SemaDeclAttr.cpp
+12-12llvm/test/Transforms/InstCombine/AMDGPU/mbcnt-wave32-optimizations.ll
+11-7llvm/test/CodeGen/AMDGPU/implicit-arg-v5-opt.ll
+249-1919 files not shown
+338-8625 files

LLVM/project b322141llvm/lib/Transforms/Vectorize/SandboxVectorizer/Passes LoadStoreVec.cpp TransactionAcceptOrRevert.cpp, llvm/test/Transforms/SandboxVectorizer load_store_vec_mixed_types.ll load_store_vec.ll

[SandboxVec][LoadStoreVec][AMDGPU] Remove early reject of mixed types (#200523)

Up until now mixing floats and non-floats was disabled in the legality
checks. This patch changes this. We are now eagerly vectorizing mixed
types, but we are also checking the cost model to make sure we don't
regress on targets where this is expensive.
DeltaFile
+35-15llvm/lib/Transforms/Vectorize/SandboxVectorizer/Passes/LoadStoreVec.cpp
+6-15llvm/test/Transforms/SandboxVectorizer/load_store_vec_mixed_types.ll
+4-10llvm/test/Transforms/SandboxVectorizer/load_store_vec.ll
+2-3llvm/lib/Transforms/Vectorize/SandboxVectorizer/Passes/TransactionAcceptOrRevert.cpp
+47-434 files

LLVM/project db1ee7bclang/include/clang/Serialization ASTRecordReader.h, clang/lib/AST ASTContext.cpp Type.cpp

trivial changes
DeltaFile
+20-14clang/lib/Sema/SemaOpenMP.cpp
+18-14clang/lib/AST/ASTContext.cpp
+16-15clang/lib/Sema/SemaTemplate.cpp
+14-11clang/lib/AST/Type.cpp
+14-8clang/lib/AST/ASTDiagnostic.cpp
+11-6clang/include/clang/Serialization/ASTRecordReader.h
+93-6833 files not shown
+207-15939 files

LLVM/project 3d7c58aclang/lib/AST ASTContext.cpp ItaniumMangle.cpp, clang/lib/Sema SemaCXXScopeSpec.cpp SemaTemplate.cpp

[clang] implement CWG2064: ignore value dependence for decltype

The 'decltype' for a value-dependent (but non-type-dependent) should be known,
so this patch makes them non-opaque instead.

This patch also implements what's neceessary to allow overloading
on pure differences in instantiation dependence, making `std::void_t`
usable for SFINAE purposes.

This also readds a few test cases from da98651, which was a previous attempt
at resolving CWG2064.

Fixes #8740
Fixes #61818
Fixes #190388
DeltaFile
+888-161clang/lib/AST/ASTContext.cpp
+328-12clang/test/SemaTemplate/instantiation-dependence.cpp
+178-96clang/lib/AST/ItaniumMangle.cpp
+100-98clang/lib/Sema/SemaCXXScopeSpec.cpp
+62-57clang/lib/AST/Type.cpp
+71-44clang/lib/Sema/SemaTemplate.cpp
+1,627-46869 files not shown
+2,392-79975 files

LLVM/project ff2fec3clang-tools-extra/clang-tidy/bugprone MissingEndComparisonCheck.cpp, clang-tools-extra/docs/clang-tidy/checks/bugprone missing-end-comparison.rst

[clang-tidy] Add `bugprone-missing-end-comparison` check (#182543)

This PR introduces a new check `bugprone-missing-end-comparison`.

It detects instances where the result of a standard algorithm is used
directly in a boolean context without being compared against the
corresponding end iterator.

Currently the check can't handle algorithms returning `std::pair` and
`std::ranges::mismatch_result`, but it should be a good enough starting
point for future improvements.

As of AI-Usage: Assisted by Gemini CLI (for pre-commit reviewing,
documentation and some code refactor/cleanup)
Closes https://github.com/llvm/llvm-project/issues/178731

---------

Co-authored-by: EugeneZelenko <eugene.zelenko at gmail.com>
DeltaFile
+241-0clang-tools-extra/clang-tidy/bugprone/MissingEndComparisonCheck.cpp
+175-0clang-tools-extra/test/clang-tidy/checkers/Inputs/Headers/std/algorithm
+166-0clang-tools-extra/test/clang-tidy/checkers/bugprone/missing-end-comparison.cpp
+123-0clang-tools-extra/test/clang-tidy/checkers/bugprone/missing-end-comparison-cxx20.cpp
+91-0clang-tools-extra/docs/clang-tidy/checks/bugprone/missing-end-comparison.rst
+50-0clang-tools-extra/test/clang-tidy/checkers/bugprone/missing-end-comparison-cxx17.cpp
+846-08 files not shown
+1,018-014 files

LLVM/project 602481aclang/test/CodeGen ubsan-strict-flex-arrays-ignorelist.c

improve testr

Created using spr 1.3.7
DeltaFile
+24-23clang/test/CodeGen/ubsan-strict-flex-arrays-ignorelist.c
+24-231 files

LLVM/project 734012dllvm/lib/Target/RISCV RISCVFrameLowering.cpp, llvm/test/CodeGen/RISCV cmp-zilsd-csr.ll saverestore-zilsd-fixed-location.ll

[RISCV] Disable Zilsd CSR-pair generation when push/pop or save-restore is enabled (#200623)

We were generating duplicate/worse code due to the generation of the
`Zilsd` load/store doubles for handling `CSR's` when `Zcmp/Xqccmp` or
`Save/Restore Libcalls` were enabled.
DeltaFile
+80-0llvm/test/CodeGen/RISCV/cmp-zilsd-csr.ll
+24-0llvm/test/CodeGen/RISCV/saverestore-zilsd-fixed-location.ll
+4-2llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
+108-23 files

LLVM/project c510c73clang/include/clang/Serialization ASTRecordReader.h, clang/lib/AST ASTContext.cpp Type.cpp

trivial changes
DeltaFile
+20-14clang/lib/Sema/SemaOpenMP.cpp
+18-14clang/lib/AST/ASTContext.cpp
+16-15clang/lib/Sema/SemaTemplate.cpp
+14-11clang/lib/AST/Type.cpp
+14-8clang/lib/AST/ASTDiagnostic.cpp
+11-6clang/include/clang/Serialization/ASTRecordReader.h
+93-6833 files not shown
+207-15939 files

LLVM/project a262cabclang/lib/AST ASTContext.cpp ItaniumMangle.cpp, clang/lib/Sema SemaCXXScopeSpec.cpp SemaTemplate.cpp

[clang] implement CWG2064: ignore value dependence for decltype

The 'decltype' for a value-dependent (but non-type-dependent) should be known,
so this patch makes them non-opaque instead.

This patch also implements what's neceessary to allow overloading
on pure differences in instantiation dependence, making `std::void_t`
usable for SFINAE purposes.

This also readds a few test cases from da98651, which was a previous attempt
at resolving CWG2064.

Fixes #8740
Fixes #61818
Fixes #190388
DeltaFile
+888-161clang/lib/AST/ASTContext.cpp
+328-12clang/test/SemaTemplate/instantiation-dependence.cpp
+178-96clang/lib/AST/ItaniumMangle.cpp
+100-98clang/lib/Sema/SemaCXXScopeSpec.cpp
+62-57clang/lib/AST/Type.cpp
+71-44clang/lib/Sema/SemaTemplate.cpp
+1,627-46869 files not shown
+2,391-79775 files

LLVM/project 8ce6c5fclang-tools-extra/clang-tidy/bugprone UseAfterMoveCheck.cpp, clang-tools-extra/docs ReleaseNotes.rst

[clang-tidy] Fix false positive in bugprone-use-after-move for std::tie (#192895)

std::tie(a, b) = expr reinitializes all variables passed to std::tie
because the tuple assignment operator writes back through the stored
references. The check was not recognizing this pattern, causing a false
positive on the second std::tie assignment in loops like:

  std::tie(a, b) = foo(std::move(a), std::move(b));
  std::tie(a, b) = foo(std::move(a), std::move(b)); // false positive

Add std::tie assignment as a reinitialization case in
makeReinitMatcher().

Fixes #136105.

---

**AI Disclosure:** Claude (Anthropic) was used to assist in diagnosing
the CI test failure and identifying the off-by-one line number in the

    [5 lines not shown]
DeltaFile
+127-0clang-tools-extra/test/clang-tidy/checkers/bugprone/use-after-move.cpp
+9-0clang-tools-extra/clang-tidy/bugprone/UseAfterMoveCheck.cpp
+5-0clang-tools-extra/docs/clang-tidy/checks/bugprone/use-after-move.rst
+5-0clang-tools-extra/docs/ReleaseNotes.rst
+146-04 files

LLVM/project dbab3f7llvm/lib/Analysis IVDescriptors.cpp, llvm/lib/Transforms/Vectorize LoopVectorizationLegality.cpp VPlanConstruction.cpp

[VPlan] Move IV predicate handling to VPlan. (#192876)
DeltaFile
+262-102llvm/test/Transforms/LoopVectorize/predicated-inductions.ll
+8-102llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
+69-0llvm/lib/Transforms/Vectorize/VPlanConstruction.cpp
+32-32llvm/test/Transforms/LoopVectorize/induction.ll
+33-18llvm/lib/Analysis/IVDescriptors.cpp
+6-43llvm/test/Transforms/LoopVectorize/predicated-inductions-vs-first-order-recurrences.ll
+410-2978 files not shown
+490-31414 files

LLVM/project 6029be7llvm/lib/Target/AMDGPU AMDGPUCoExecSchedStrategy.cpp, llvm/test/CodeGen/AMDGPU llvm.amdgcn.sched.group.barrier.gfx12.ll

[AMDGPU] Add IGLP mutations to CoexecSched

Change-Id: I91fe4079c8744dd41d5ddc7bd04c5b1691c13b78
DeltaFile
+116-0llvm/test/CodeGen/AMDGPU/llvm.amdgcn.sched.group.barrier.gfx12.ll
+4-1llvm/lib/Target/AMDGPU/AMDGPUCoExecSchedStrategy.cpp
+120-12 files

LLVM/project ad6366dclang/include/clang/AST ASTTypeTraits.h, clang/include/clang/Basic DirectoryEntry.h FileEntry.h

[clang][clang-tools-extra] Remove unused DenseMapInfo::getTombstoneKey (#200634)

#200595 changed DenseMap to no longer create tombstone buckets, so
DenseMapInfo<T>::getTombstoneKey() is never called. Remove dead
definitions and dead tombstone branches.
DeltaFile
+6-18clang/lib/CodeGen/CGObjCMacConstantLiteralUtil.h
+0-18clang/lib/APINotes/APINotesFormat.h
+1-14clang/lib/AST/ItaniumCXXABI.cpp
+3-12clang/include/clang/Basic/DirectoryEntry.h
+3-11clang/include/clang/Basic/FileEntry.h
+0-13clang/include/clang/AST/ASTTypeTraits.h
+13-8646 files not shown
+18-33952 files

LLVM/project a6255e4llvm/include/llvm/Transforms/Utils TriggerCrashPass.h, llvm/lib/CodeGen TargetPassConfig.cpp

Revert "[LLVM] Add flags to crash the opt/codegen pipeline" (#200977)

Reverts llvm/llvm-project#200967

Test failing on some buildbots:
https://lab.llvm.org/buildbot/#/builders/11/builds/41237
DeltaFile
+0-43llvm/lib/Transforms/Utils/TriggerCrashPass.cpp
+0-39llvm/include/llvm/Transforms/Utils/TriggerCrashPass.h
+22-1llvm/lib/Passes/PassBuilder.cpp
+0-13llvm/test/Other/trigger-crash-flags.ll
+0-10llvm/lib/CodeGen/TargetPassConfig.cpp
+0-8llvm/lib/Passes/PassBuilderPipelines.cpp
+22-1142 files not shown
+22-1168 files

LLVM/project ccd2606clang/include/clang/AST DeclTemplate.h, clang/lib/AST DeclTemplate.cpp

[clang] fix getTemplateInstantiationArgs (#199528)

This implements a new strategy for collecting the template arguments, by
relying on the qualifiers and template parameter lists to navigate the
template context of out-of-line definitions.

This greatly simplifies the signature of that function, by removing a
bunch of workarounds, and simpliffying a couple that weren't removed
yet.

Since this now relies on qualifiers and template parameter lists, this
patch expends most of its effort making sure these are placed,
transformed and propagated to template instantiations.

Also makes the explicit specialization AST nodes stop abusing the
template parameter lists by storing it's own template parameter list,
creating a dedicated field for them, similar to partial specializations.

Fixes #101330
DeltaFile
+194-429clang/lib/Sema/SemaTemplateInstantiate.cpp
+257-164clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
+151-147clang/lib/Sema/SemaTemplate.cpp
+96-95clang/include/clang/AST/DeclTemplate.h
+59-129clang/lib/Sema/SemaConcept.cpp
+60-92clang/lib/AST/DeclTemplate.cpp
+817-1,05652 files not shown
+1,456-1,71658 files

LLVM/project f9ae788clang-tools-extra/clangd/unittests SemanticHighlightingTests.cpp, clang/lib/Sema HeuristicResolver.cpp

[clang][HeuristicResolver] Handle non-dependent TemplateSpecializationType gracefully (#200714)

Fixes https://github.com/llvm/llvm-project/issues/197716
DeltaFile
+19-0clang-tools-extra/clangd/unittests/SemanticHighlightingTests.cpp
+9-5clang/lib/Sema/HeuristicResolver.cpp
+28-52 files

LLVM/project 62118b5llvm/lib/Target/SPIRV SPIRVBuiltins.cpp

[NFC][SPIR-V] Fix unused-variable in SPIRVBuiltins (#200842)
DeltaFile
+1-1llvm/lib/Target/SPIRV/SPIRVBuiltins.cpp
+1-11 files