LLVM/project 6dfd733lldb/source/Plugins/Platform/Windows PlatformWindows.cpp

[lldb][Windows] Improve error messages in PlatformWindows.cpp (#213011)

The reason for the failure is known but is not in the log. Add a helper
function to map the error to a string and log it.

---------

Co-authored-by: Jonas Devlieghere <jonas at devlieghere.com>
DeltaFile
+10-2lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp
+10-21 files

LLVM/project 67a2074lldb/docs/resources test.md, lldb/packages/Python/lldbsuite/test skip_reason.py test_result.py

[lldb] Introduce the require decorator (#212753)

Currently, it is unclear if a test that is skipped is either:
- Unsupported because it will never run (macosx tests should not run on
Windows).
- Skipped because it's supposed to work but does not yet.
`@expectedFailure` is not always an option because a test might be
timing out and waiting 600s for it to fail is not acceptable.

This patch introduces 2 new decorators to differentiate those tests:
- `@requireX` meaning the tests require X to run (e.g `@requireDarwin`).
- `@requireNotX` meaning the tests requires anything but `X` to run (e.g
`@requireNotDarwin`).

In the tests results summary, this introduces a new category: `skipped`
tests:
- `@requireX` -> `UNSUPPORTED`
- `@skipIfX` -> `SKIPPED`


    [35 lines not shown]
DeltaFile
+121-0lldb/packages/Python/lldbsuite/test/decorators.py
+29-0lldb/docs/resources/test.md
+16-3lldb/packages/Python/lldbsuite/test/test_result.py
+17-0lldb/packages/Python/lldbsuite/test/skip_reason.py
+12-1lldb/test/API/lldbtest.py
+6-6lldb/test/API/linux/aarch64/gcs/TestAArch64LinuxGCS.py
+201-1082 files not shown
+322-12588 files

LLVM/project bd427e7llvm/utils/gn/secondary/clang-tools-extra/include-cleaner/unittests BUILD.gn, llvm/utils/gn/secondary/clang-tools-extra/unittests BUILD.gn

[gn] add ClangIncludeCleanerTests (#213073)
DeltaFile
+32-0llvm/utils/gn/secondary/clang-tools-extra/include-cleaner/unittests/BUILD.gn
+1-0llvm/utils/gn/secondary/clang-tools-extra/unittests/BUILD.gn
+33-02 files

LLVM/project 308cb96llvm/utils/gn/secondary/llvm/unittests/Target/RISCV BUILD.gn

[gn build] Port b94b699857a5 (#213458)
DeltaFile
+1-0llvm/utils/gn/secondary/llvm/unittests/Target/RISCV/BUILD.gn
+1-01 files

LLVM/project eeb1e68llvm/test/CodeGen/AArch64/GlobalISel contract-store.mir store-addressing-modes.mir

[AArch64][GlobalISel] Update a number of select tests to concrete types. NFC (#213454)
DeltaFile
+180-180llvm/test/CodeGen/AArch64/GlobalISel/opt-shifted-reg-compare.mir
+47-47llvm/test/CodeGen/AArch64/GlobalISel/select.mir
+44-44llvm/test/CodeGen/AArch64/GlobalISel/preselect-process-phis.mir
+42-42llvm/test/CodeGen/AArch64/GlobalISel/fold-brcond-fcmp.mir
+41-41llvm/test/CodeGen/AArch64/GlobalISel/store-addressing-modes.mir
+38-38llvm/test/CodeGen/AArch64/GlobalISel/contract-store.mir
+392-3927 files not shown
+497-49713 files

LLVM/project 7890908llvm/lib/Transforms/Scalar ConstraintElimination.cpp, llvm/test/Transforms/ConstraintElimination ne-tightening.ll

[ConstraintElim] Remove const op restriction from tightenBoundUsingNe. (#213440)

Remove the constant operand restriction for the bounds tightening logic
added in https://github.com/llvm/llvm-project/pull/213049.

The condition is not needed for correctness, and there are a number of
cases in practice where results can be improved:
https://github.com/dtcxzyw/llvm-opt-benchmark-nightly/pull/839


Compile-time impact in the noise

https://llvm-compile-time-tracker.com/compare.php?from=60f965b1f62c0c77bcdb2997ea9bb6603aa0d002&to=1f7190605cc3a13cd992eaad3053b599cd5e4ed0&stat=instructions:u

PR: https://github.com/llvm/llvm-project/pull/213440
DeltaFile
+1-2llvm/test/Transforms/ConstraintElimination/ne-tightening.ll
+1-1llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
+2-32 files

LLVM/project efe31d6llvm/lib/Analysis InstructionSimplify.cpp, llvm/test/Transforms/InstCombine fold-or-zext-sext.ll fold-and-zext-sext.ll

[InstSimplify] Fold `zext(X) | sext(X)` --> `sext(X)` and `zext(X) & sext(X)` --> `zext(X)` (#213313)

fix #213247

alive2: https://alive2.llvm.org/ce/z/G6se2o
godbolt: https://godbolt.org/z/M3nz5Tvcn
DeltaFile
+101-0llvm/test/Transforms/InstCombine/fold-or-zext-sext.ll
+101-0llvm/test/Transforms/InstCombine/fold-and-zext-sext.ll
+20-0llvm/lib/Analysis/InstructionSimplify.cpp
+222-03 files

LLVM/project e456ba9llvm/test/CodeGen/AMDGPU llvm.amdgcn.av.load.b128.ll amdgcn.bitcast.1024bit.ll, llvm/test/CodeGen/AMDGPU/GlobalISel llvm.amdgcn.ptr.s.buffer.load.ll

Merge branch 'main' into users/c8ef/generator
DeltaFile
+2,825-2,887llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+5,516-0llvm/test/CodeGen/RISCV/rvv/fixed-vectors-clmulh.ll
+4,862-0llvm/test/Transforms/LoopVectorize/vplan-based-stride-mv.ll
+4,058-0llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.ptr.s.buffer.load.ll
+3,291-0llvm/test/CodeGen/AMDGPU/llvm.amdgcn.av.load.b128.ll
+2,988-0llvm/test/Transforms/LoopVectorize/VPlan/vplan-based-stride-mv.ll
+23,540-2,8873,524 files not shown
+178,425-103,8623,530 files

LLVM/project cfad953clang/test/Sema/LifetimeSafety/Inputs lifetime-analysis.h

fix test
DeltaFile
+3-3clang/test/Sema/LifetimeSafety/Inputs/lifetime-analysis.h
+3-31 files

LLVM/project 36b6f48libc/test/src/__support/FPUtil CMakeLists.txt float128_test.cpp

[libc] Add conversion tests between emulated and native f128 (#213422)

Adds conversion tests between emulated and native float128 type, which
would be later used in f128 functions .
DeltaFile
+23-0libc/test/src/__support/FPUtil/float128_test.cpp
+1-0libc/test/src/__support/FPUtil/CMakeLists.txt
+24-02 files

LLVM/project 82d818bmlir/lib/Target/LLVMIR ModuleImport.cpp, mlir/test/Target/LLVMIR/Import function-metadata.ll

[MLIR][LLVM] Preserve unknown function metadata on import

Import representable non-debug function metadata without a kind-specific
dialect conversion into `LLVMFuncOp` `function_metadata`. Preserve repeated
metadata kinds through the generic carrier so LLVM IR import and export can
round-trip the supported generic metadata subset.

Warn and drop attachments outside that subset while continuing to import the
function.
DeltaFile
+110-0mlir/test/Target/LLVMIR/Import/function-metadata.ll
+36-5mlir/lib/Target/LLVMIR/ModuleImport.cpp
+146-52 files

LLVM/project 1d87038mlir/lib/Target/LLVMIR ModuleTranslation.cpp, mlir/test/Target/LLVMIR function-metadata.mlir

[MLIR][LLVM] Translate LLVMFuncOp function metadata

Materialize LLVMFuncOp function_metadata through ModuleTranslation metadata conversion. Attach function metadata after module-level symbols are mapped so metadata references to functions, globals, aliases, and ifuncs can be resolved.
DeltaFile
+156-0mlir/test/Target/LLVMIR/function-metadata.mlir
+49-5mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
+205-52 files

LLVM/project 396eb66mlir/include/mlir/Dialect/LLVMIR LLVMOps.td LLVMAttrDefs.td, mlir/lib/Dialect/LLVMIR/IR LLVMAttrs.cpp

[MLIR][LLVM] Add function metadata to LLVMFuncOp

Add a generic LLVM dialect carrier for LLVM IR function metadata on LLVMFuncOp.
Represent attachments as an ordered list so repeated metadata kinds, such as
multiple type metadata attachments, can be preserved while keeping metadata names
language-agnostic.
DeltaFile
+22-0mlir/test/Dialect/LLVMIR/roundtrip.mlir
+22-0mlir/include/mlir/Dialect/LLVMIR/LLVMAttrDefs.td
+20-0mlir/test/Dialect/LLVMIR/invalid.mlir
+18-0mlir/lib/Dialect/LLVMIR/IR/LLVMAttrs.cpp
+3-0mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
+1-0mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
+86-06 files

LLVM/project c938d3bmlir/lib/Target/LLVMIR ModuleImport.cpp, mlir/test/Target/LLVMIR/Import import-failure.ll intrinsic-unregistered.ll

[MLIR][LLVM] Preserve global value metadata operands on import

Import global value references inside LLVM metadata operands as LLVM dialect metadata symbol-reference attributes. Add llvm.read_register import coverage for function, global, alias, and nameless-global metadata operands.
DeltaFile
+75-5mlir/test/Target/LLVMIR/Import/intrinsic-unregistered.ll
+51-13mlir/lib/Target/LLVMIR/ModuleImport.cpp
+45-0mlir/test/Target/LLVMIR/Import/import-failure.ll
+171-183 files

LLVM/project 9a894ffllvm/lib/Transforms/IPO IROutliner.cpp, llvm/test/CodeGen/AMDGPU llvm.amdgcn.av.load.b128.ll amdgcn.bitcast.1024bit.ll

Rebase

Created using spr 1.3.7
DeltaFile
+2,825-2,887llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+4,862-0llvm/test/Transforms/LoopVectorize/vplan-based-stride-mv.ll
+4,058-0llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.ptr.s.buffer.load.ll
+3,291-0llvm/test/CodeGen/AMDGPU/llvm.amdgcn.av.load.b128.ll
+2,988-0llvm/test/Transforms/LoopVectorize/VPlan/vplan-based-stride-mv.ll
+0-2,975llvm/lib/Transforms/IPO/IROutliner.cpp
+18,024-5,8622,851 files not shown
+154,244-94,0442,857 files

LLVM/project 610a310mlir/include/mlir/Dialect/LLVMIR LLVMAttrDefs.td LLVMOps.td, mlir/lib/CAPI/Dialect LLVM.cpp

[MLIR][LLVM] Share LLVM metadata attribute translation (#203016)

Share LLVM dialect metadata materialization through `ModuleTranslation`
so named metadata and metadata-as-value lowering use one conversion
path. Resolve metadata symbol references to functions, globals, aliases,
and ifuncs, and diagnose malformed required metadata before lowering.

Rename `MDFuncAttr` to `MDGlobalValueAttr` to reflect its support for
symbol-backed global values.
DeltaFile
+19-43mlir/lib/Target/LLVMIR/Dialect/LLVMIR/LLVMToLLVMIRTranslation.cpp
+53-0mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
+32-1mlir/test/Target/LLVMIR/llvmir-named-metadata.mlir
+13-10mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
+13-8mlir/include/mlir/Dialect/LLVMIR/LLVMAttrDefs.td
+10-9mlir/lib/CAPI/Dialect/LLVM.cpp
+140-719 files not shown
+204-10215 files

LLVM/project ecb50abmlir/lib/Target/LLVMIR ModuleImport.cpp, mlir/test/Target/LLVMIR/Import import-failure.ll

[MLIR][LLVM] Reject distinct generic metadata on import (#212455)

Reject distinct nodes when converting generic LLVM metadata into LLVM
dialect attributes because `MDNodeAttr` cannot preserve node identity.
Apply the policy recursively so top-level and nested nodes use the
existing unsupported-metadata failure path while finite acyclic uniqued
nodes remain importable.
DeltaFile
+25-0mlir/test/Target/LLVMIR/Import/import-failure.ll
+6-2mlir/lib/Target/LLVMIR/ModuleImport.cpp
+31-22 files

LLVM/project 1be2288clang/lib/Analysis/LifetimeSafety LifetimeAnnotations.cpp FactsGenerator.cpp, clang/test/Sema/LifetimeSafety safety.cpp

[LifetimeSafety] Support allocating/freeing builtins
DeltaFile
+21-8clang/lib/Analysis/LifetimeSafety/FactsGenerator.cpp
+24-2clang/test/Sema/LifetimeSafety/safety.cpp
+20-0clang/lib/Analysis/LifetimeSafety/LifetimeAnnotations.cpp
+5-0clang/test/Sema/LifetimeSafety/Inputs/lifetime-analysis.h
+70-104 files

LLVM/project 07a12d8llvm/lib/Transforms/IPO IROutliner.cpp, llvm/test/CodeGen/AMDGPU llvm.amdgcn.av.load.b128.ll amdgcn.bitcast.1024bit.ll

Rebase

Created using spr 1.3.7
DeltaFile
+2,825-2,887llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+4,058-0llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.ptr.s.buffer.load.ll
+3,291-0llvm/test/CodeGen/AMDGPU/llvm.amdgcn.av.load.b128.ll
+0-2,975llvm/lib/Transforms/IPO/IROutliner.cpp
+0-2,850llvm/unittests/Analysis/IRSimilarityIdentifierTest.cpp
+1,139-1,149llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fdiv.mir
+11,313-9,8612,111 files not shown
+118,162-84,4762,117 files

LLVM/project df8c73bclang/include/clang/Analysis/Analyses/LifetimeSafety Loans.h, clang/lib/Analysis/LifetimeSafety Loans.cpp LifetimeAnnotations.cpp

[LifetimeSafety] Support allocating/freeing functions annotated with ownership_takes/ownership_returns
DeltaFile
+134-0clang/test/Sema/LifetimeSafety/safety.cpp
+51-0clang/lib/Analysis/LifetimeSafety/FactsGenerator.cpp
+17-3clang/lib/Sema/SemaLifetimeSafety.h
+12-4clang/include/clang/Analysis/Analyses/LifetimeSafety/Loans.h
+14-0clang/lib/Analysis/LifetimeSafety/LifetimeAnnotations.cpp
+8-3clang/lib/Analysis/LifetimeSafety/Loans.cpp
+236-102 files not shown
+256-108 files

LLVM/project a7b2404clang/include/clang/Analysis/Analyses/LifetimeSafety Loans.h, clang/lib/Analysis/LifetimeSafety Loans.cpp LifetimeAnnotations.cpp

[LifetimeSafety] Support allocating/freeing functions annotated with ownership_takes/ownership_returns
DeltaFile
+134-0clang/test/Sema/LifetimeSafety/safety.cpp
+51-0clang/lib/Analysis/LifetimeSafety/FactsGenerator.cpp
+17-3clang/lib/Sema/SemaLifetimeSafety.h
+12-4clang/include/clang/Analysis/Analyses/LifetimeSafety/Loans.h
+14-0clang/lib/Analysis/LifetimeSafety/LifetimeAnnotations.cpp
+8-3clang/lib/Analysis/LifetimeSafety/Loans.cpp
+236-102 files not shown
+256-108 files

LLVM/project 60f965bclang-tools-extra/clang-tidy/readability UseStdMinMaxCheck.cpp, clang-tools-extra/docs ReleaseNotes.rst

[clang-tidy] Fix trailing semicolon and lost comment in readability-use-std-min-max (#208782)

Fix two bugs in readability-use-std-min-max when the if body has no
braces.

For brace-less if bodies, If->getEndLoc() points to the expression end
rather than the trailing semicolon, truncating replacements and losing
comments. We find the semicolon via findNextToken and extend the range
consistent with compound statement logic.

Before:
  if (n < -1) n = -1 ;          ->  n = std::max(n, -1); ;
  if (n > 1) n = 1/*comment*/;  ->  n = std::min(n, 1);;

After:
  if (n < -1) n = -1 ;          ->  n = std::max(n, -1);
  if (n > 1) n = 1/*comment*/;  ->  n = std::min(n, 1); /*comment*/

Fixes #208708.

AI Usage: This patch is AI-assisted, reviewed and verified by me.
DeltaFile
+12-0clang-tools-extra/test/clang-tidy/checkers/readability/use-std-min-max.cpp
+7-1clang-tools-extra/clang-tidy/readability/UseStdMinMaxCheck.cpp
+4-0clang-tools-extra/docs/ReleaseNotes.rst
+23-13 files

LLVM/project 63f9de8llvm/test/CodeGen/AArch64/GlobalISel store-merging-debug.mir store-merging.mir

[AArch64][GlobalISel] Update store merging tests to concrete types. NFC (#213429)
DeltaFile
+86-86llvm/test/CodeGen/AArch64/GlobalISel/store-merging.mir
+38-38llvm/test/CodeGen/AArch64/GlobalISel/store-merging-debug.mir
+124-1242 files

LLVM/project 71b120fllvm/lib/Target/AMDGPU VOP1Instructions.td AMDGPU.td

[AMDGPU] Use SubtargetPredicates for the f32/f16 -> fp8/bf8 conversions (#213383)

The follow-up #212888 left for the other direction. HasCvtFP8SDWASrcSel
and HasCvtFP8ByteSel replace isGFX940Plus and isGFX11Plus on the f32 ->
fp8/bf8 conversions, which split by the same encoding characteristic, so
the two feature descriptions become direction-neutral. The f16 ->
fp8/bf8 conversions had no feature at all, so add
FeatureF16FP8ConversionInsts, the mirror of the existing
FeatureFP8F16ConversionInsts, and use it in place of isGFX1250Plus.

Assisted-By: Claude Opus 5
DeltaFile
+16-14llvm/lib/Target/AMDGPU/VOP3Instructions.td
+11-4llvm/lib/Target/AMDGPU/AMDGPU.td
+1-1llvm/lib/Target/AMDGPU/VOP1Instructions.td
+28-193 files

LLVM/project fc4b0bellvm/lib/Analysis ConstantFolding.cpp, llvm/lib/Target/AMDGPU SIISelLowering.cpp

Fold constant `0` at instcombine.
DeltaFile
+0-25llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+10-0llvm/lib/Analysis/ConstantFolding.cpp
+10-252 files

LLVM/project 232e8b5libcxx/docs/Status Cxx26Issues.csv, libcxx/include/__atomic atomic.h

[libc++] Implement LWG4169: `std::atomic<T>`'s default constructor should be constrained (#131950)

Drive-by: Rename `constexpr_noexcept.compile.pass.cpp` to
`ctor.default.pass.cpp` as test coverage is added to it, and compile and
run it in all modes.
DeltaFile
+71-0libcxx/test/std/atomics/atomics.types.generic/ctor.default.pass.cpp
+0-41libcxx/test/std/atomics/atomics.types.generic/constexpr_noexcept.compile.pass.cpp
+4-1libcxx/include/__atomic/atomic.h
+1-1libcxx/docs/Status/Cxx26Issues.csv
+76-434 files

LLVM/project a2756bdmlir/include/mlir-c IR.h, mlir/lib/CAPI/IR IR.cpp

Address review: fix -Wenum-compare build failure, add structural hash, expand flag coverage
DeltaFile
+115-2mlir/test/CAPI/ir.c
+11-16mlir/lib/CAPI/IR/IR.cpp
+19-7mlir/include/mlir-c/IR.h
+145-253 files

LLVM/project 50b15d6mlir/include/mlir-c IR.h, mlir/lib/CAPI/IR IR.cpp

[mlir-c] Add structural operation equivalence
DeltaFile
+70-0mlir/test/CAPI/ir.c
+25-0mlir/include/mlir-c/IR.h
+24-0mlir/lib/CAPI/IR/IR.cpp
+119-03 files

LLVM/project 9947b7fmlir/cmake/modules AddMLIR.cmake, mlir/lib CMakeLists.txt

[MLIR][CMake] Extend MLIRIR PCH reuse to transitive dependants

llvm_update_pch() only offers a PCH to targets that name the defining
library as a *direct* dependency, because across LLVM subprojects a
transitively reused PCH drags in unrelated headers and causes name
collisions. Within MLIR that concern is much weaker: mlir/IR/pch.h holds
MLIR core headers that essentially every MLIR library includes anyway.

Add mlir_reuse_ir_pch(), which offers MLIRIR's PCH to any target that
actually reaches MLIRIR through its link graph. The reachability check
matters: a PCH containing MLIR IR headers emits out-of-line symbols that
only libMLIRIR provides, so handing it to a Support-only target such as
tblgen-lsp-server breaks the link.

The helper is called from add_mlir_library() and add_mlir_tool(), and
again from mlir_target_link_libraries(), where most tests, unittests and
libMLIR.so-avoiding libraries actually attach their MLIR dependencies. It
is idempotent and skips targets that define their own PCH, that opt out
with DISABLE_PCH_REUSE, that override RTTI/EH, or that contain C/ObjC

    [18 lines not shown]
DeltaFile
+135-2mlir/cmake/modules/AddMLIR.cmake
+7-4mlir/lib/CMakeLists.txt
+5-0mlir/lib/Tools/PDLL/ODS/CMakeLists.txt
+5-0mlir/lib/Tools/PDLL/AST/CMakeLists.txt
+1-0mlir/unittests/CMakeLists.txt
+153-65 files

LLVM/project 6b98f82cmake/Modules GetTripleCMakeSystemName.cmake, llvm/include/llvm/TargetParser TripleName.def

cmake: Derive CMake system name from a triple via new mechanism (#208773)
DeltaFile
+118-110llvm/include/llvm/TargetParser/TripleName.def
+206-0llvm/test/tools/TargetParser/get_triple_system_name_test.py
+148-0llvm/utils/get_triple_system_name.py
+40-0cmake/Modules/GetTripleCMakeSystemName.cmake
+4-4llvm/lib/TargetParser/Triple.cpp
+6-0llvm/test/tools/TargetParser/get-triple-system-name.test
+522-1146 files