LLVM/project dc34267llvm/lib/Frontend/Offloading OffloadWrapper.cpp

[OffloadWrapper] Remove unnecessary zero-index GEPs (#181632)

These are no-ops.
DeltaFile
+2-12llvm/lib/Frontend/Offloading/OffloadWrapper.cpp
+2-121 files

LLVM/project 37adb1dllvm/lib/Transforms/Instrumentation GCOVProfiling.cpp

[GCOVProfiling] Remove unnecessary zero-index GEPs

These are no-ops.
DeltaFile
+3-14llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
+3-141 files

LLVM/project 2c194a1llvm/test/CodeGen/X86 broadcast-elm-cross-splat-vec.ll

[X86] broadcast-elm-cross-splat-vec.ll - cleanup check prefixes and regnerate (#181631)

The file had missing checks due to collisions and a lot of redundancy between x86/x64 and isa levels
DeltaFile
+962-1,464llvm/test/CodeGen/X86/broadcast-elm-cross-splat-vec.ll
+962-1,4641 files

LLVM/project ef86449llvm/tools/obj2yaml dwarf2yaml.cpp

`dwarf2yaml.cpp` optimizations (#179048)

DWARF to YAML optimizations: Add a lot of vector reserves & moves.

See also https://github.com/WebAssembly/binaryen/pull/8257

---------

Co-authored-by: stevenwdv <stevenwdv at users.noreply.github.com>
DeltaFile
+25-10llvm/tools/obj2yaml/dwarf2yaml.cpp
+25-101 files

LLVM/project 339e200llvm/test/CodeGen/SPIRV/llvm-intrinsics constrained-arithmetic.ll constrained-fmuladd.ll

[NFC][SPIRV] Disable spirv-val in tests for constrained intrinsics (#181516)

Currently it errors out due to FPRoundingMode misplacement.
DeltaFile
+2-1llvm/test/CodeGen/SPIRV/llvm-intrinsics/constrained-arithmetic.ll
+2-1llvm/test/CodeGen/SPIRV/llvm-intrinsics/constrained-fmuladd.ll
+4-22 files

LLVM/project a591a44clang/docs ThreadSanitizer.rst, compiler-rt/lib/tsan/rtl tsan_adaptive_delay.cpp tsan_adaptive_delay.h

[tsan] Introduce Adaptive Delay Scheduling to TSAN (#178836)

This commit introduces an "adaptive delay" feature to the
ThreadSanitizer runtime to improve race detection by perturbing thread
schedules. At various synchronization points (atomic operations,
mutexes, and thread lifecycle events), the runtime may inject small
delays (spin loops, yields, or sleeps) to explore different thread
interleavings and expose data races that would otherwise occur only in
rare execution orders.

This change is inspired by prior work, which is discussed in more detail
on

https://discourse.llvm.org/t/rfc-tsan-implementing-a-fuzz-scheduler-for-tsan/80969.
In short, https://reviews.llvm.org/D65383 was an earlier unmerged
attempt at adding a random delays. Feedback on the RFC led to the
version in this commit, aiming to limit the amount of delay.

The adaptive delay feature uses a configurable time budget and tiered

    [50 lines not shown]
DeltaFile
+431-0compiler-rt/lib/tsan/rtl/tsan_adaptive_delay.cpp
+175-0compiler-rt/lib/tsan/rtl/tsan_adaptive_delay.h
+152-0compiler-rt/lib/tsan/tests/unit/tsan_percent_test.cpp
+120-0clang/docs/ThreadSanitizer.rst
+27-0compiler-rt/lib/tsan/rtl/tsan_flags.inc
+22-0compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp
+927-09 files not shown
+966-1115 files

LLVM/project aa31013llvm/lib/Target/SPIRV SPIRVBuiltins.cpp

[SPIRV] Rounding Mode decorations in OpenCL builtins only make sense when floating point types are involved (#181208)

The backend was adding fp-rounding mode flags to
`uchar convert_uchar_rte(uint)`. These builtins are equivalent to `uchar
convert_uchar(uint)` which simply truncates its input, since there is no
floating-point value involved.

Related to https://github.com/llvm/llvm-project/issues/180936

This is consistent with what was implemented in the translator in
https://github.com/KhronosGroup/SPIRV-LLVM-Translator/pull/3120 and
https://github.com/KhronosGroup/SPIRV-LLVM-Translator/pull/3128
DeltaFile
+15-4llvm/lib/Target/SPIRV/SPIRVBuiltins.cpp
+15-41 files

LLVM/project 4e75f9bclang/test/Driver aarch64-v96a.c, llvm/lib/Target/AArch64 AArch64InstrInfo.td AArch64SystemOperands.td

[AArch64][llvm] Remove +pcdphint gating

Remove gating of `stshh` since this is an instruction from the
HINT space, and therefore is a NOP on cores that don't implement
it, so gating is superfluous. gcc doesn't gate this, so remove
for better compatibility.
DeltaFile
+5-13llvm/test/MC/AArch64/armv9.6a-pcdphint.s
+1-5llvm/lib/Target/AArch64/AArch64InstrInfo.td
+2-4llvm/lib/Target/AArch64/AArch64SystemOperands.td
+1-3llvm/unittests/TargetParser/TargetParserTest.cpp
+0-4clang/test/Driver/aarch64-v96a.c
+2-2llvm/test/CodeGen/AArch64/arm64-prefetch-ir.ll
+11-313 files not shown
+11-369 files

LLVM/project 1f65d4dclang/docs ReleaseNotes.rst, clang/lib/Sema SemaTypeTraits.cpp

[Clang] make most enums trivially equality comparable (#169079)

std::equal(std::byte) currently has sub-optimal codegen due to enum
types not being recognized as trivially equality comparable. In order to
fix this we make them trivially comparable. In the process I factored
out into a standalone function EqualityComparisonIsDefaulted and
refactored the test cases.

Enum types cannot have operator== which is a hidden friend.

Fixes #132672
DeltaFile
+51-66clang/test/SemaCXX/type-traits.cpp
+50-33clang/lib/Sema/SemaTypeTraits.cpp
+2-0clang/docs/ReleaseNotes.rst
+103-993 files

LLVM/project b205396llvm/include/llvm/IR Constants.h, llvm/lib/Analysis ConstantFolding.cpp

[IR] Add ConstantExpr::getPtrAdd() (#181365)

Add a ConstantExpr::getPtrAdd() API that creates a getelementptr i8
constant expression, similar to IRBuilder::CreatePtrAdd(). In the future
this will create a ptradd expression.
DeltaFile
+10-0llvm/include/llvm/IR/Constants.h
+2-3llvm/lib/Analysis/ConstantFolding.cpp
+2-2llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp
+2-2llvm/lib/Transforms/IPO/GlobalSplit.cpp
+2-2llvm/lib/Transforms/IPO/LowerTypeTests.cpp
+1-2llvm/unittests/IR/PatternMatch.cpp
+19-113 files not shown
+22-159 files

LLVM/project c9fa742clang/test/CodeGenObjC attr-no-outline.m

[clang][test] Set triple explicitly for attr-no-outline.m test (#181621)

The test fails on targets that have a different LLVM IR lowering (e.g.
RISC-V which produces `signext i32` for the return type). Rather than
complicate the test with more complex patterns, just set the triple
explicitly to x86-64 (as various other generic clang/test/CodeGen* tests
do).

Test was introduced by #163666.

This fixes RISC-V CI.
DeltaFile
+2-2clang/test/CodeGenObjC/attr-no-outline.m
+2-21 files

LLVM/project 3272ba7polly/lib/Pass PhaseManager.cpp

[Polly] Honor 'scops' phase being disabled (#180380)

`opt -passes=polly-custom<detect>`, or `stopafter=detect` would still
run the ScopInfo analysis even though it should run when explicitly
enabled or required by another phase.
DeltaFile
+4-0polly/lib/Pass/PhaseManager.cpp
+4-01 files

LLVM/project 2b7c1f9llvm/lib/Transforms/Vectorize VPlanRecipes.cpp, llvm/test/Transforms/LoopVectorize iv-select-cmp-decreasing.ll

[VPlan] Directly unroll VectorEndPointerRecipe (#172372)

Directly unroll VectorEndPointerRecipe following 0636225b ([VPlan]
Directly unroll VectorPointerRecipe, #168886). It allows us to leverage
existing VPlan simplifications to optimize.

Co-authored-by: Luke Lau <luke at igalia.com>
Co-authored-by: Florian Hahn <flo at fhahn.com>
DeltaFile
+68-172llvm/test/Transforms/LoopVectorize/RISCV/riscv-vector-reverse.ll
+46-70llvm/test/Transforms/LoopVectorize/X86/masked_load_store.ll
+32-76llvm/test/Transforms/LoopVectorize/RISCV/tail-folding-reverse-load-store.ll
+26-52llvm/test/Transforms/LoopVectorize/iv-select-cmp-decreasing.ll
+35-22llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
+18-36llvm/test/Transforms/LoopVectorize/PowerPC/optimal-epilog-vectorization.ll
+225-42837 files not shown
+449-69443 files

LLVM/project 054021dlibc/shared/math sinpif16.h, libc/src/__support/math sinpif16.h CMakeLists.txt

[libc][math] Refactor sinpif16 to header only. (#178503)

Closes #176476
Part of #147386
DeltaFile
+94-0libc/src/__support/math/sinpif16.h
+2-67libc/src/math/generic/sinpif16.cpp
+29-0libc/shared/math/sinpif16.h
+21-3utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+19-0libc/src/__support/math/CMakeLists.txt
+1-8libc/src/math/generic/CMakeLists.txt
+166-783 files not shown
+169-789 files

LLVM/project deedc7bflang/include/flang/Optimizer/OpenMP Passes.td, flang/lib/Optimizer/OpenMP DeleteUnreachableTargets.cpp FunctionFiltering.cpp

[Flang][OpenMP] Don't generate code for unreachable target regions. (#178937)

When a target region is placed inside a constant false condition (e.g.,
`if (.false.)`), the dead code gets eliminated on the host side,
removing the `omp.target` operation entirely. However, the device-side
compilation pipeline is unaware of this elimination and attempts to
generate kernel code. Since the host never created offload metadata for
the eliminated target, the device-side kernel function lacks the
"kernel" attribute, causing `OpenMPOpt` to fail with an assertion when
it expects all outlined kernels to have this attribute. The problem can
be seen with the following code:

```fortran
program cele
  implicit none
  real :: V
  integer :: i
  if (.false.) then
    !$omp target teams distribute parallel do

    [16 lines not shown]
DeltaFile
+322-0flang/test/Transforms/OpenMP/delete-unreachable-targets.mlir
+88-0flang/test/Lower/OpenMP/target-dead-code.f90
+79-0flang/lib/Optimizer/OpenMP/DeleteUnreachableTargets.cpp
+12-0flang/include/flang/Optimizer/OpenMP/Passes.td
+3-2flang/lib/Optimizer/OpenMP/FunctionFiltering.cpp
+5-0flang/lib/Optimizer/Passes/Pipelines.cpp
+509-22 files not shown
+511-28 files

LLVM/project 3f0f834flang/lib/Optimizer/CodeGen CodeGen.cpp, flang/test/Fir select.fir

[flang] fix codegen of fir.select with only default case (#181373)

The case where fir.select only has a "unit" block target (i.e., it is a
switch with only the default case) was not handled correctly in codegen.
DeltaFile
+14-0flang/test/Fir/select.fir
+8-0flang/lib/Optimizer/CodeGen/CodeGen.cpp
+22-02 files

LLVM/project e6fdcf3libc/shared/math canonicalizef128.h, libc/src/__support/math CMakeLists.txt canonicalizef16.h

[libc][math] Refactor canonicalize function family to header-only (#181467)

closes: #181466
DeltaFile
+87-5utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+57-0libc/src/__support/math/CMakeLists.txt
+40-1libc/test/shared/shared_math_test.cpp
+32-0libc/src/__support/math/canonicalizef16.h
+32-0libc/src/__support/math/canonicalizef128.h
+29-0libc/shared/math/canonicalizef128.h
+277-618 files not shown
+533-4324 files

LLVM/project bde3ef4llvm/test/CodeGen/Thumb2 mve-strict-round.ll, llvm/test/CodeGen/Thumb2/mve-intrinsics strict-round.ll

[ARM] Move MVE test into the correct place. NFC
DeltaFile
+154-0llvm/test/CodeGen/Thumb2/mve-strict-round.ll
+0-154llvm/test/CodeGen/Thumb2/mve-intrinsics/strict-round.ll
+154-1542 files

LLVM/project 7ed486fllvm/lib/Target/AMDGPU DSDIRInstructions.td, llvm/test/MC/AMDGPU gfx13_asm_vdsdir.s gfx13_asm_vdsdir_alias.s

[AMDGPU] Add VDSDIR encoding to gfx13
DeltaFile
+39-0llvm/test/MC/AMDGPU/gfx13_asm_vdsdir.s
+14-10llvm/lib/Target/AMDGPU/DSDIRInstructions.td
+9-0llvm/test/MC/AMDGPU/gfx13_asm_vdsdir_alias.s
+62-103 files

LLVM/project 8153f78libc/src/__support wctype_utils.h CMakeLists.txt, libc/test/src/__support wctype_utils_test.cpp CMakeLists.txt

[libc][wctype] Reland internal UTF8 wctype classification functions (#181468)

Reland #174607

#174607 broke libc++ because the LIBC_CONF_WCTYPE_MODE macro wasn't
defined when called from libc++. Defaulted LIBC_CONF_WCTYPE_MODE to
LIBC_WCTYPE_MODE_ASCII when not configured
(https://github.com/llvm/llvm-project/commit/ffd355b0879066adc9889593570af8f0df85f1a8)
DeltaFile
+536-0libc/test/src/__support/wctype_utils_test.cpp
+361-145libc/src/__support/wctype_utils.h
+12-0libc/test/src/__support/CMakeLists.txt
+11-1libc/src/__support/CMakeLists.txt
+920-1464 files

LLVM/project e316ea1libc/utils/docgen wctype.yaml

[libc][wctype] Add missing functions to wctype docs (#181478)

#170525

Adds missing wctype.h functions to docs.
DeltaFile
+56-1libc/utils/docgen/wctype.yaml
+56-11 files

LLVM/project e698d03llvm/lib/Analysis ScalarEvolutionDivision.cpp, llvm/test/Analysis/Delinearization wraps.ll multidim_ivs_and_integer_offsets_nts_3d.ll

[SCEVDivision] Prevent propagating nowrap flags when numerator is an addrec (#154745)

In ScalarEvolutionDivision, when the numerator is an addrec, its nowrap
flags are unconditionally propagated to the quotient and remainder.
However, this is not always correct.
This pass is only used by Delinearization, and just dropping these flags
doesn't affect Delinearization's accuracy in almost all cases.
Therefore, this patch conservatively stop propagating the nowrap flags
from the numerator to the quotient and remainder.

Fix #152566
DeltaFile
+145-0llvm/test/Analysis/Delinearization/wraps.ll
+7-7llvm/test/Analysis/ScalarEvolutionDivision/sdiv.ll
+3-2llvm/lib/Analysis/ScalarEvolutionDivision.cpp
+1-1llvm/test/Analysis/Delinearization/multidim_ivs_and_integer_offsets_nts_3d.ll
+1-1llvm/test/Analysis/Delinearization/a.ll
+1-1llvm/test/Analysis/Delinearization/divide_by_one.ll
+158-122 files not shown
+161-138 files

LLVM/project 2bb9885libcxx/docs index.rst, libcxx/docs/ReleaseNotes 22.rst

[libc++] Increase the minimum deployment target on macOS to 11.0 (#176094)

#166172 moved the effective minimum deployment target on macOS to 10.15
(because `aligned_alloc` is not defined before that in the C stdlib),
and indeed, it was mentioned in that PR that libc++ only supports macOS
11 and later.

This PR rectifies the documentation and the code to reflect the actually
supported deployment targets on macOS. See [1] for additional discussion
about this.

[1]: https://discourse.llvm.org/t/minimum-macos-deployment-target-increases-to-11-0-in-v22-1-visibility-discussion-on-update-policy

(cherry picked from commit d4854177dd0513a07e3f2d8b1b5642f8226cead5)
DeltaFile
+3-3libcxx/include/__configuration/availability.h
+1-1libcxx/docs/index.rst
+2-0libcxx/docs/ReleaseNotes/22.rst
+6-43 files

LLVM/project 1b246e0lldb/packages/Python/lldbsuite/test/tools/lldb-dap dap_server.py, lldb/test/API/tools/lldb-dap/unknown TestDAP_unknownRequest.py main.c

[lldb-dap] Add unknown request handler (#181109)

Added unknown request handler to avoid crash. Returning error in this
case looks better than stopping entire debug session.

(cherry picked from commit b447f5d9763010f8c6806c578533291aef2bd484)
DeltaFile
+35-0lldb/test/API/tools/lldb-dap/unknown/TestDAP_unknownRequest.py
+19-0lldb/tools/lldb-dap/Handler/UnknownRequestHandler.cpp
+4-6lldb/tools/lldb-dap/DAP.cpp
+9-0lldb/tools/lldb-dap/Handler/RequestHandler.h
+8-0lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py
+6-0lldb/test/API/tools/lldb-dap/unknown/main.c
+81-64 files not shown
+91-610 files

LLVM/project f152625llvm/unittests/Support FormatVariadicTest.cpp

[Support] Fixup for formatting hex on 32 bit (#181338)

Without the `PRIx64`, the test won't work on 32 bit architectures.

See this comment:
https://github.com/llvm/llvm-project/pull/180498#issuecomment-3891979182

The issue is that `PRIx64` expands differently depending on the
architecture. In the original code modified in #180498 the [macro was
used](https://github.com/llvm/llvm-project/pull/180498/changes#diff-5dcf6451d2bf9e9e3a8d28b0212263a8db576045b1d4eab80cca1bfd13a3bb76L356):

```diff
-  OS << format("0x%*.*" PRIx64, HexDigits, HexDigits, Address);
+  OS << formatv("0x{0:x-}",
+                fmt_align(Address, AlignStyle::Right, HexDigits, '0'));
```

I simply didn't use it in my test because on my architecture the
`PRIx64` wasn't necessary.

    [3 lines not shown]
DeltaFile
+3-2llvm/unittests/Support/FormatVariadicTest.cpp
+3-21 files

LLVM/project 8ebd354.github/workflows release-binaries.yml

workflows/release-binaries: Pass missing release-version input to upload-release-artifact (#180879)

This was causing the 22.1.0-rc3 uploads to fail.

(cherry picked from commit 127d77f7abe0b9c54562ee37ce474d99effa09c1)
DeltaFile
+1-0.github/workflows/release-binaries.yml
+1-01 files

LLVM/project e4564bb.github/workflows release-tasks.yml release-documentation.yml

workflows/release-documentation: Add release environment (#181063)

This way we can limit access to the secrets to the main and release
branches.

This is a partial re-commit of b6ee085068972a41f3b2735a9f7e3ca48eab0f00

(cherry picked from commit d0ff94fdeb0732124e163a68f821a8fe2e81013e)
DeltaFile
+0-4.github/workflows/release-tasks.yml
+1-0.github/workflows/release-documentation.yml
+1-42 files

LLVM/project 0211065mlir/lib/Target/LLVMIR/Dialect/OpenMP OpenMPToLLVMIRTranslation.cpp, mlir/test/Target/LLVMIR openmp-teams.mlir openmp-todo.mlir

[OpenMP][MLIR] Add thread_limit mlir->llvm lowering
DeltaFile
+82-49mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
+36-0mlir/test/Target/LLVMIR/openmp-teams.mlir
+3-3mlir/test/Target/LLVMIR/openmp-todo.mlir
+3-3mlir/test/Target/LLVMIR/openmp-target-launch-host.mlir
+124-554 files

LLVM/project 2350d0fflang/include/flang/Optimizer/Transforms Passes.td, flang/lib/Optimizer/Passes Pipelines.cpp

[flang] Fix -fno-omit-frame-pointer (#180507)

The PR #163775 added `FramePointerKind::NonLeafNoReserve`. However it
seems it forgot to update some codes in Flang. By this bug,
`frame-pointer` attribute in IR was not set even if
`-fno-omit-frame-pointer` is specified.

Fixes #180118

(cherry picked from commit e2297da21660a0c9f3db90c3effd18f6c17e38e9)
DeltaFile
+5-0flang/test/Driver/func-attr.f90
+3-0flang/lib/Optimizer/Passes/Pipelines.cpp
+2-1flang/include/flang/Optimizer/Transforms/Passes.td
+10-13 files

LLVM/project 9254010clang/lib/Parse ParseTentative.cpp, clang/test/Interpreter access.cpp disambiguate-decl-stmt.cpp

[clang-repl] Fix disambiguation of out-of-line member with private types (#178842)

This patch fixes a bug in clang-repl where out-of-line member function
definitions were incorrectly identified as statements when they involved
private type aliases.

The issue occurred because `isCXXDeclarationStatement` would trigger
immediate access checks during tentative parsing. Since the context of
an out-of-line definition isn't fully established during this phase,
Sema would incorrectly flag private members as inaccessible, causing
the parser to fail the declaration check and fall back to statement
parsing.

Changes:
- In `isCXXDeclarationStatement`, use `TentativeParsingAction` to
  ensure the token stream is fully restored.
- Use `SuppressAccessChecks` during the tentative disambiguation phase
  to prevent premature access errors.
- Ensure that formal access verification still occurs during the

    [8 lines not shown]
DeltaFile
+16-0clang/lib/Parse/ParseTentative.cpp
+15-0clang/test/Interpreter/access.cpp
+2-3clang/test/Interpreter/disambiguate-decl-stmt.cpp
+33-33 files