LLVM/project c2a28dallvm/lib/Target/AMDGPU AMDGPULowerVGPREncoding.cpp, llvm/test/CodeGen/AMDGPU vgpr-set-msb-coissue.mir

[AMDGPU] Fix hoist location for s_set_vgpr_msb past SALU program state instructions (#176206)

If we exit the loop at a non SALU state instruction we have to return
the next instruction because we will insert before the instruction we
return. The check before the loop already did this for cases we start on
a non SALU state instruction by returning `I`. This is now done
afterwards.
DeltaFile
+23-1llvm/test/CodeGen/AMDGPU/vgpr-set-msb-coissue.mir
+7-11llvm/lib/Target/AMDGPU/AMDGPULowerVGPREncoding.cpp
+30-122 files

LLVM/project 295256fllvm/lib/Analysis InstructionSimplify.cpp, llvm/test/Transforms/InstSimplify fcmp.ll

[InstSimplify] Fall back to the rest of the logic if folding of the consts isn't successfull when simplifying fcmp (#176159)

Fixes #175949.
DeltaFile
+34-0llvm/test/Transforms/InstSimplify/fcmp.ll
+10-7llvm/lib/Analysis/InstructionSimplify.cpp
+44-72 files

LLVM/project 3fb914dllvm/include/llvm/Analysis ScalarEvolutionExpressions.h, llvm/lib/Analysis ScalarEvolution.cpp

[SCEV] Add initial support for ptrtoaddr. (#158032)

Add initial support for PtrToAddr to SCEV, including a new
SCEVPtrToAddrExpr and SCEV expansion support for it.

PR: https://github.com/llvm/llvm-project/pull/158032
DeltaFile
+75-8llvm/lib/Analysis/ScalarEvolution.cpp
+47-0llvm/test/Transforms/LoopVectorize/expand-ptrtoaddr.ll
+24-2llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h
+11-0llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
+5-5llvm/test/Analysis/ScalarEvolution/ptrtoaddr-i32-index-width.ll
+5-5llvm/test/Analysis/ScalarEvolution/ptrtoaddr.ll
+167-208 files not shown
+186-2014 files

LLVM/project e83021allvm/lib/CodeGen/SelectionDAG TargetLowering.cpp, llvm/lib/Target/X86 X86ISelLowering.cpp

[SelectionDAG][InlineAsm] Check VT isSimple before getSimpleVT (#176323)

Fixes: #170024
DeltaFile
+6-6llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+6-6llvm/lib/Target/X86/X86ISelLowering.cpp
+8-0llvm/test/CodeGen/X86/asm-reject-reg-type-mismatch.ll
+20-123 files

LLVM/project e9952a6lld/COFF Writer.cpp

[lld][COFF][NFC] Fix warnings on 32-bit asserts builds (#176178)

Fixes #130934 (Wsign-compare warnings reported for Wasm Emscripten
builds). I ran into this when building for 32-bit RISC-V.
DeltaFile
+5-3lld/COFF/Writer.cpp
+5-31 files

LLVM/project 823f701llvm/utils/gn/secondary/llvm/tools/llvm-dwarfdump BUILD.gn

[gn build] Port c838756e2d63
DeltaFile
+1-0llvm/utils/gn/secondary/llvm/tools/llvm-dwarfdump/BUILD.gn
+1-01 files

LLVM/project c838756llvm/docs/CommandGuide llvm-dwarfdump.rst, llvm/test/tools/llvm-dwarfdump/X86 coverage.test

[llvm-dwarfdump][LineCov 1/3] Add variable coverage metrics (#169646)

Patch 1 of 3 to add to llvm-dwarfdump the ability to measure DWARF
coverage of local variables in terms of source lines, as discussed in
this RFC:

https://discourse.llvm.org/t/rfc-debug-info-coverage-tool-v2/83266)

This patch adds the basic variable coverage implementation. By default,
inlined instances are shown separately (displaying the full inlining
chain). Alternatively, a combined view that averages across all inlined
instances can be returned using `--combine-instances`.

In this patch, we simply print a count of source lines over which each
variable is covered. Later patches in the series will add the comparison
against a baseline.
DeltaFile
+241-0llvm/tools/llvm-dwarfdump/Coverage.cpp
+180-0llvm/test/tools/llvm-dwarfdump/X86/Inputs/coverage.ll
+148-0llvm/test/tools/llvm-dwarfdump/X86/Inputs/coverage-opt.ll
+39-0llvm/docs/CommandGuide/llvm-dwarfdump.rst
+26-0llvm/test/tools/llvm-dwarfdump/X86/coverage.test
+20-1llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
+654-12 files not shown
+657-18 files

LLVM/project 3e286c2llvm/test/CodeGen/X86 clmul-x86.ll

[X86] clmul-x86.ll - add i64 test coverage to check for crashes (#176342)

DeltaFile
+455-1llvm/test/CodeGen/X86/clmul-x86.ll
+455-11 files

LLVM/project 0456bcdllvm/lib/CodeGen CodeGenPrepare.cpp

[CGP] Refactor tail call eligibility checks in `dupRetToEnableTailCallOpts` (NFC)

Tail call eligibility and profitability checks have been combined
into a single helper to reduce code duplication.
DeltaFile
+10-9llvm/lib/CodeGen/CodeGenPrepare.cpp
+10-91 files

LLVM/project 66bf4e0lldb/docs dil-expr-lang.ebnf, lldb/source/ValueObject DILLexer.cpp DILParser.cpp

[lldb] Change bitfield range character from '-' to ':' in DIL (#173410)

Change the bitfield extraction range character from '-' to a more common
':'. Add a deprecation error when '-' is used.
DeltaFile
+22-17lldb/test/API/commands/frame/var-dil/basics/BitFieldExtraction/TestFrameVarDILBitFieldExtraction.py
+6-4lldb/source/ValueObject/DILLexer.cpp
+6-2lldb/source/ValueObject/DILParser.cpp
+2-2lldb/source/ValueObject/DILEval.cpp
+1-1lldb/test/API/commands/frame/var-dil/basics/ArraySubscript/TestFrameVarDILArraySubscript.py
+1-1lldb/docs/dil-expr-lang.ebnf
+38-271 files not shown
+39-277 files

LLVM/project 370eeefllvm/lib/Transforms/Vectorize VPlanPatternMatch.h VPlanUnroll.cpp

[VPlan] Add matchers for reduction result VPInstructions (NFC).

Add dedicated matchers for reduction result VPInstructions, to be
re-used in follow-up patches, including
https://github.com/llvm/llvm-project/pull/167851.
DeltaFile
+22-0llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h
+5-6llvm/lib/Transforms/Vectorize/VPlanUnroll.cpp
+27-62 files

LLVM/project d528686llvm/lib/Transforms/Vectorize VPlanRecipes.cpp VPlanValue.h

[VPlan] Add VPConstantInt for VPIRValues wrapping ConstantInts (NFC) (#175458)

Follow-up to https://github.com/llvm/llvm-project/pull/174282: Introduce
a new VPConstantInt overlay for VPIRValue, to make it easier to check
and access constant int IR values.

PR: https://github.com/llvm/llvm-project/pull/175458
DeltaFile
+12-23llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
+24-0llvm/lib/Transforms/Vectorize/VPlanValue.h
+4-12llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h
+8-4llvm/lib/Transforms/Vectorize/VPlan.h
+2-2llvm/lib/Transforms/Vectorize/VPlanAnalysis.cpp
+1-2llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+51-436 files

LLVM/project fc472ddlibclc/opencl/include/clc/opencl utils.h, libclc/opencl/include/clc/opencl/synchronization utils.h

[libclc][NFC] Don't include 'clc/internal/clc.h' in OpenCL library (#176336)

The file is meant for internal use within the CLC library.
DeltaFile
+1-1libclc/opencl/include/clc/opencl/synchronization/utils.h
+1-1libclc/opencl/include/clc/opencl/utils.h
+2-22 files

LLVM/project 01a1c37llvm/include/llvm/IR RuntimeLibcalls.td, llvm/lib/Target/SystemZ SystemZISelLowering.h

SystemZ: Remove override of insertSSPDeclarations

Remove __stack_chk_guard from the SystemZ system library.
Previously the availability was assumed to match
__stack_chk_fail, but these appear to be differen for SystemZ.
I'm assuming this isn't available for systemz based on the
existing behavior.

Once the runtime library does not add a SYSTEM_CHECK_GUARD
implementation the default will be a no-op if the symbol
isn't added to the system.

Also extend the test to make sure the declaration is not emitted.
DeltaFile
+12-1llvm/test/CodeGen/SystemZ/stack-guard.ll
+5-1llvm/include/llvm/IR/RuntimeLibcalls.td
+0-2llvm/lib/Target/SystemZ/SystemZISelLowering.h
+17-43 files

LLVM/project e515529clang/lib/CIR/CodeGen CIRGenBuiltin.cpp CIRGenExpr.cpp, clang/test/CIR/CodeGen atomic.c

[CIR] Add __sync_<OP>_and_fetch builtins (#168347)

Adds support for several `__sync_<OP>_and_fetch` builtins, and several helper methods for emitting atomic fetch + arithmetic operations.

---------

Co-authored-by: Andy Kaylor <akaylor at nvidia.com>
DeltaFile
+747-0clang/test/CIR/CodeGen/atomic.c
+137-2clang/lib/CIR/CodeGen/CIRGenBuiltin.cpp
+23-3clang/lib/CIR/CodeGen/CIRGenExpr.cpp
+21-3clang/lib/CIR/CodeGen/Address.h
+4-0clang/lib/CIR/CodeGen/CIRGenFunction.h
+1-0clang/lib/CIR/CodeGen/CIRGenTypes.cpp
+933-86 files

LLVM/project f646b91llvm/utils/git ids-check-helper.py

[ci][ids] Fix pattern prefix check (#176334)

The prefix check did not include the trailing /, so llvm-c headers were
treated like llvm headers, resulting in incorrect suggestions to use
LLVM_ABI where LLVM_C_ABI was already present.

See
https://github.com/llvm/llvm-project/pull/176309#issuecomment-3757987748
for an example.
DeltaFile
+2-2llvm/utils/git/ids-check-helper.py
+2-21 files

LLVM/project 6934c36llvm/include/llvm/Analysis DependenceAnalysis.h, llvm/lib/Analysis DependenceAnalysis.cpp

[DA] Use ScalarEvolution::isKnownPredicate (#170919)

DA uses `DependenceInfo::isKnownPredicate` instead of
`ScalarEvolution::isKnownPredicate` in several places. The former is
intended to be a "wrapper" for the later. Specifically, it performs the
following processes:

- Replace `zext(X) cmp zext(Y)` with `X cmp Y`.
- Replace `X >=s Y` with `X - Y >=s 0`
- Replace `X <=s Y` with `X - Y <=s 0`
- Replace `X >s Y` with `X - Y >s 0`
- Replace `X <s Y` with `X - Y <s 0`

The first one can return an incorrect result when the most significant
bit of `X` and `Y` are different. Everything other than the first one
can be incorrect when `X - Y` overflows. Actually, when a `SCEVUnknown`
is involved (e.g., `%n <s %n + 1` will be `0 <s 1`), this function often
returns a result that ignore the possibility of overflow.


    [4 lines not shown]
DeltaFile
+21-72llvm/lib/Analysis/DependenceAnalysis.cpp
+13-27llvm/test/Analysis/DependenceAnalysis/StrongSIV.ll
+7-7llvm/test/Analysis/DependenceAnalysis/SymbolicRDIV.ll
+6-6llvm/test/Analysis/DependenceAnalysis/SymbolicSIV.ll
+0-7llvm/include/llvm/Analysis/DependenceAnalysis.h
+1-4llvm/test/Analysis/DependenceAnalysis/infer_affine_domain_ovlf.ll
+48-1231 files not shown
+50-1257 files

LLVM/project 4ae7ad6llvm/lib/Target/AMDGPU SIInsertWaitcnts.cpp

review: address suggestions
DeltaFile
+27-35llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
+27-351 files

LLVM/project e672360flang/lib/Lower/OpenMP Clauses.cpp ClauseProcessor.cpp, flang/test/Lower/OpenMP thread-limit-dims.f90

[Flang] Add lowering for flang to mlir for thread_limit
DeltaFile
+62-0flang/test/Lower/OpenMP/thread-limit-dims.f90
+10-3flang/lib/Lower/OpenMP/Clauses.cpp
+5-3flang/lib/Lower/OpenMP/ClauseProcessor.cpp
+3-1llvm/include/llvm/Frontend/OpenMP/ClauseT.h
+80-74 files

LLVM/project 301c0d9.github/workflows release-binaries.yml, llvm/utils/release build_llvm_release.bat

[lldb][windows] switch to Python 3.11 for the non ARM64 release builds (#175796)

This patch is a follow up to
[RFC#89434](https://discourse.llvm.org/t/rfc-sync-python-versions-on-windows/89434).

Python 3.11 is the first official Python.org release to have an arm64
installer on Windows, which is why it's the version used to build the
toolchain on arm64 Windows. The x86 and x64 variants of the toolchain
both use Python 3.10 which can be confusing for users who get different
install dependencies based on their architectures.

This patch syncs all the required Pythons to install the toolchain, by
bumping the requirements to 3.11 for x86, x64 and arm64 Windows.
DeltaFile
+3-3llvm/utils/release/build_llvm_release.bat
+2-2.github/workflows/release-binaries.yml
+5-52 files

LLVM/project 11c0fd4libcxx/test/std/algorithms/alg.nonmodifying/alg.find find_if_not.pass.cpp find_if.pass.cpp

[libc++][test] Fix `constexpr` stdver. for tests for `find_if(_not)` (#176303)

Until C++20, `std::find_if(_not)` were not `constexpr`, so uses of
`TEST_CONSTEXPR_CXX17` make the test functions ill-formed, no diagnostic
required in C++17 mode.

The uses were introduced in 2b4b26ea84fd9c95d0ff25ce338c15ea5e74a4e4,
while the transformation looked incorrect - `TEST_CONSTEXPR_CXX20`
should be used instead.

Drive-by changes: Fix comments in both changed test files to match the
actually standardized wording.
DeltaFile
+5-6libcxx/test/std/algorithms/alg.nonmodifying/alg.find/find_if_not.pass.cpp
+4-6libcxx/test/std/algorithms/alg.nonmodifying/alg.find/find_if.pass.cpp
+9-122 files

LLVM/project 10863e2clang/docs/analyzer checkers.rst, clang/lib/StaticAnalyzer/Checkers BlockInCriticalSectionChecker.cpp

[analyzer] Teach `unix.BlockInCriticalSection` about `std::scoped_lock` (#176134)

The checker knows that `std::lock_guard` and `std::unique_lock`
introduce critical sections, but doesn't know about the newer
`std::scoped_lock`.
DeltaFile
+19-0clang/test/Analysis/block-in-critical-section.cpp
+3-2clang/lib/StaticAnalyzer/Checkers/BlockInCriticalSectionChecker.cpp
+1-1clang/docs/analyzer/checkers.rst
+23-33 files

LLVM/project 8779cffllvm/test/tools/llvm-strings stdin.test

[LIT][LLVM-STRINGS]Make stdin tests shell-consistent (#176139)

The fix updates the llvm-strings stdin lit tests to use `printf` instead
of `echo -n` when generating input via stdin.
The behavior of `echo -n` is not portable and varies across shells and
platforms, particularly on AIX where `/bin/sh` handles `-n` and escape
processing differently from GNU-compatible shells. This causes the tests
to fail despite correct llvm-strings functionality.

In contrast, `printf` has well-defined, POSIX-specified semantics and
provides consistent handling of newlines, escape sequences, and
non-printable characters. Using `printf` eliminates the dependency on
shell-specific `echo` behavior and makes the tests deterministic.
DeltaFile
+3-5llvm/test/tools/llvm-strings/stdin.test
+3-51 files

LLVM/project 0a26d90clang/test/Tooling clang-extdef-mapping.cpp clang-extdef-mapping-no-args.cpp, clang/tools/clang-extdef-mapping ClangExtDefMapGen.cpp

[clang] Fix options handling in ClangExtDefMapGen.cpp (#176116)

Also, remove some unused includes.

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

Now, running `clang-extdef-mapping` with no options results in the
following error message:

```sh
error: clang-extdef-mapping: Not enough positional command line arguments specified!
Must specify at least 1 positional argument: See: ./build/Debug/bin/clang-extdef-mapping --help
```
DeltaFile
+3-4clang/tools/clang-extdef-mapping/ClangExtDefMapGen.cpp
+4-0clang/test/Tooling/clang-extdef-mapping.cpp
+3-0clang/test/Tooling/clang-extdef-mapping-no-args.cpp
+10-43 files

LLVM/project 04baf11llvm/lib/Analysis VectorUtils.cpp, llvm/lib/Transforms/Vectorize VPlanRecipes.cpp

[LoopVectorize] Support vectorization of overflow intrinsics (#174835)

Enables support for marking overflow intrinsics `uadd`, `sadd`, `usub`,
`ssub`, `umul` and `smul` as trivially vectorizable.

Fixes #174617

---------

Signed-off-by: vishruth-thimmaiah <vishruththimmaiah at gmail.com>
DeltaFile
+469-1llvm/test/Transforms/LoopVectorize/multiple-result-intrinsics.ll
+73-1llvm/test/Transforms/LoopVectorize/AArch64/multiple-result-intrinsics.ll
+18-15llvm/test/Transforms/LoopVectorize/struct-return.ll
+6-9llvm/lib/Analysis/VectorUtils.cpp
+6-1llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
+572-275 files

LLVM/project e85e61cmlir/lib/Dialect/Shard/Transforms Partition.cpp, mlir/test/Dialect/Arith shard-partition.mlir

[MLIR][shard] checking for correct&full sharding annotations (#176000)

Before trying to partition a block or operation, check that it is fully
annotated with `shard.shard` ops. This gives useful error messages
instead of random errors later on.
DeltaFile
+81-0mlir/lib/Dialect/Shard/Transforms/Partition.cpp
+54-0mlir/test/Dialect/Shard/invalid_annotated.mlir
+8-5mlir/test/Dialect/Shard/partition.mlir
+2-1mlir/test/Dialect/Arith/shard-partition.mlir
+145-64 files

LLVM/project 9309436llvm/docs AMDGPUUsage.rst

[AMDGPU] Update documentation for wave reduction intrinsics
DeltaFile
+70-4llvm/docs/AMDGPUUsage.rst
+70-41 files

LLVM/project cc98eb0clang/lib/CIR/Dialect/IR CIRDialect.cpp, mlir/lib/Dialect/EmitC/IR EmitC.cpp

[mlir] Fix build after #175815 (#176332)

Fix this build error, which is reported by some compilers after #175815:

```
error: operands to ?: have different types ‘mlir::Operation::result_range {aka mlir::ResultRange}’ and ‘mlir::ValueRange’
   return successor.isParent() ? getOperation()->getResults() : ValueRange();
```
DeltaFile
+14-7clang/lib/CIR/Dialect/IR/CIRDialect.cpp
+6-3mlir/lib/Dialect/SCF/IR/SCF.cpp
+4-2mlir/unittests/Interfaces/ControlFlowInterfacesTest.cpp
+2-1mlir/lib/Dialect/Transform/TuneExtension/TuneExtensionOps.cpp
+2-1mlir/lib/Dialect/EmitC/IR/EmitC.cpp
+1-1mlir/lib/Dialect/Shape/IR/Shape.cpp
+29-154 files not shown
+33-1910 files

LLVM/project 5b3d64fclang/lib/CIR/Dialect/IR CIRDialect.cpp, mlir/lib/Dialect/EmitC/IR EmitC.cpp

[mlir] Fix build after #175815
DeltaFile
+14-7clang/lib/CIR/Dialect/IR/CIRDialect.cpp
+6-3mlir/lib/Dialect/SCF/IR/SCF.cpp
+4-2mlir/unittests/Interfaces/ControlFlowInterfacesTest.cpp
+2-1mlir/lib/Dialect/Transform/TuneExtension/TuneExtensionOps.cpp
+2-1mlir/lib/Dialect/EmitC/IR/EmitC.cpp
+1-1mlir/lib/Dialect/Shape/IR/Shape.cpp
+29-154 files not shown
+33-1910 files

LLVM/project 2f11913llvm/lib/ExecutionEngine/Orc/TargetProcess ExecutorResolver.cpp, llvm/unittests/Support ProgramStackTest.cpp

Add missing newlines at EOF; NFC (#176192)

DeltaFile
+1-1llvm/lib/ExecutionEngine/Orc/TargetProcess/ExecutorResolver.cpp
+1-1llvm/unittests/Support/ProgramStackTest.cpp
+1-1mlir/include/mlir/Dialect/Func/Utils/Utils.h
+1-1mlir/include/mlir/Dialect/LLVMIR/BasicPtxBuilderInterface.td
+1-1mlir/lib/Dialect/Affine/Transforms/SuperVectorize.cpp
+1-1mlir/lib/Dialect/Tensor/Extensions/CMakeLists.txt
+6-66 files