LLVM/project c8df856llvm/lib/Target/ARM ARMBaseInstrInfo.cpp

[ARM] Fix instruction sizes for PATCHABLE opcodes (#220949)

Report the size of the xray sled instead of zero.

Part of enabling instruction size verification by default.
DeltaFile
+5-0llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
+5-01 files

LLVM/project 739a15allvm/lib/Target/AArch64 AArch64PerfectShuffle.h AArch64ISelLowering.cpp, llvm/lib/Target/AArch64/GISel AArch64PostLegalizerLowering.cpp

[AArch64][GlobalISel] Add support for shuffle(v, undef) -> trn(v, v) transformation (#220914)

Stacked PR: 3/3. Preceded by
https://github.com/llvm/llvm-project/pull/220535.

In SDAG, the aarch64-isel phase checks if vector shuffles can be
expressed as trns. To do this, it checks shuffles of type shuffle(v, v),
and shuffle(v, undefined).
GlobalISel previously only checked shuffles of type shuffle(v, v). Add a
check for the situation where one of the operands is undefined.

Notes:
A trn takes two vectors, places the even-indexed elements in the bottom
half, and the odd-indexed elements in the top half.
e.g: `trn <0, 1, 2, 3>, <4, 5, 6, 7> => <0, 4, 2, 6, 1, 5, 3, 7>`.
A trn1 takes the bottom half of the result (aka. the even-indexed
elements)
e.g: `trn1 <0, 1, 2, 3>, <4, 5, 6, 7> => <0, 4, 2, 6>`. 


    [8 lines not shown]
DeltaFile
+65-7llvm/test/CodeGen/AArch64/arm64-trn.ll
+3-19llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+16-0llvm/lib/Target/AArch64/AArch64PerfectShuffle.h
+4-3llvm/lib/Target/AArch64/GISel/AArch64PostLegalizerLowering.cpp
+88-294 files

LLVM/project eec6609libc/src/__support/math fminimum_mag_numf128.h fmaximum_mag_numf128.h, libc/test/shared shared_math_test.cpp shared_math_constexpr_test.cpp

fmax_mag_numf128 & fmin_mag_numf128
DeltaFile
+4-7libc/src/__support/math/fminimum_mag_numf128.h
+4-7libc/src/__support/math/fmaximum_mag_numf128.h
+2-6libc/test/shared/shared_math_constexpr_test.cpp
+6-2utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+2-4libc/test/shared/shared_math_test.cpp
+6-0utils/bazel/llvm-project-overlay/libc/test/src/math/smoke/BUILD.bazel
+24-2626 files not shown
+92-6032 files

LLVM/project 5428ad5llvm/lib/Analysis ScalarEvolution.cpp, llvm/test/Analysis/ScalarEvolution max-backedge-taken-count-guard-info-rewrite-expressions.ll max-backedge-taken-count-guard-info-operand-order.ll

[SCEV] Propagate a recurrence's nuw flag to its exit value. (#217378)

A recurrence's exit value is its closed form Start + BTC * Step. The sum
does not wrap, if the recurrence does not wrap: the recurrence reached
iteration BTC, so the value it computes there is the value the recurrence
had, and that did not wrap.

The flags are attached to the returned use, because they only apply to
this specific expression we evaluated for the exit value, no other,
equivalent SCEVs.

Alive2 Proof: https://alive2.llvm.org/ce/z/0vSRq-

This on its own has small impact on real world code (only retained some
additional flags in most cases): 
https://github.com/dtcxzyw/llvm-opt-benchmark-nightly/pull/962, but is
the first end-to-end use of SCEVUse.
DeltaFile
+379-0llvm/test/Transforms/IndVarSimplify/exit-value-nowrap-flags.ll
+324-0llvm/test/Analysis/ScalarEvolution/exit-value-nowrap-flags.ll
+69-29llvm/lib/Analysis/ScalarEvolution.cpp
+15-15llvm/test/Analysis/ScalarEvolution/max-backedge-taken-count-guard-info.ll
+12-12llvm/test/Analysis/ScalarEvolution/max-backedge-taken-count-guard-info-rewrite-expressions.ll
+12-12llvm/test/Analysis/ScalarEvolution/max-backedge-taken-count-guard-info-operand-order.ll
+811-6819 files not shown
+877-11625 files

LLVM/project dc54739libc/test/src/math/smoke CMakeLists.txt

order
DeltaFile
+2-2libc/test/src/math/smoke/CMakeLists.txt
+2-21 files

LLVM/project d07eb5dlibc/src/__support/math fminimum_magf128.h fmaximum_magf128.h, libc/test/shared shared_math_test.cpp shared_math_constexpr_test.cpp

clang-format
DeltaFile
+6-6libc/test/shared/shared_math_constexpr_test.cpp
+4-7libc/src/__support/math/fminimum_magf128.h
+4-7libc/src/__support/math/fmaximum_magf128.h
+4-4libc/test/shared/shared_math_test.cpp
+6-2utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+6-0utils/bazel/llvm-project-overlay/libc/test/src/math/smoke/BUILD.bazel
+30-2626 files not shown
+94-6032 files

LLVM/project fbfd687libc/test/shared shared_math_test.cpp shared_math_constexpr_test.cpp

nit
DeltaFile
+6-6libc/test/shared/shared_math_constexpr_test.cpp
+4-4libc/test/shared/shared_math_test.cpp
+10-102 files

LLVM/project 7976796libc/src/__support/math fminimum_numf128.h fmaximum_numf128.h, libc/test/shared shared_math_test.cpp shared_math_constexpr_test.cpp

[libc] Make fmaximum_num/fminimum_num functions use the emulated float128 type (#217409)
DeltaFile
+6-6libc/test/shared/shared_math_constexpr_test.cpp
+4-7libc/src/__support/math/fminimum_numf128.h
+4-7libc/src/__support/math/fmaximum_numf128.h
+4-4libc/test/shared/shared_math_test.cpp
+6-2utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+6-0utils/bazel/llvm-project-overlay/libc/test/src/math/smoke/BUILD.bazel
+30-2626 files not shown
+94-6032 files

LLVM/project 91865d6llvm/lib/Target/Mips MipsInstrInfo.cpp

[Mips] Fix instruction size for unfinalized bundles (#220953)

It looks like Mips uses unfinalized bundles (i.e. there is no leading
BUNDLE) for delay slots. While proper delay slots are covered by the
hasDelaySlot() case, things like forbidden slots and load delay slots
are not. Make sure we report the correct size for these.

Part of enabling instruction size verification by default.
DeltaFile
+3-0llvm/lib/Target/Mips/MipsInstrInfo.cpp
+3-01 files

LLVM/project 35b959allvm/lib/Transforms/Vectorize VPlanTransforms.cpp, llvm/test/Transforms/LoopVectorize iv_outside_user.ll

[LV] Enable the exit value optimization via SCEV for tail folding.  (#210928)

Extend optimizeLatchExitIVUserViaSCEV to also match the tail-folding
live-out extraction pattern. This lets the SCEV-based final-value
computation apply under tail folding as well, avoiding unnecessary
vector widening of induction variables that are only used outside the
loop.

Based on #195059
DeltaFile
+965-342llvm/test/Transforms/LoopVectorize/iv_outside_user.ll
+2-11llvm/test/Transforms/LoopVectorize/VPlan/buildvector-first-lane-only.ll
+3-1llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+970-3543 files

LLVM/project fbdfb33llvm/test/Transforms/LoopVectorize/RISCV partial-reduce-dot-product-costs.ll partial-reduce-dot-product.ll

[RISCV] Remove -tail-folding-policy=dont-fold-tail for partial reduction tests (#221159)

After #205741, partial reductions with EVL tail folding is now
supported.
DeltaFile
+154-369llvm/test/Transforms/LoopVectorize/RISCV/partial-reduce-dot-product.ll
+4-14llvm/test/Transforms/LoopVectorize/RISCV/partial-reduce-dot-product-costs.ll
+158-3832 files

LLVM/project 6410f94llvm/include/llvm/ADT FoldingSet.h, llvm/include/llvm/Analysis ScalarEvolution.h

[ADT] Remove the TempID parameter from FoldingSetTrait::Equals. NFC (#221144)

Let the default implementation declare its own local, so an override
that compares against the node's fields need not accept an unused
FoldingSetNodeID.

Aided by Opus 5
DeltaFile
+57-0llvm/unittests/ADT/FoldingSet.cpp
+9-14llvm/include/llvm/ADT/FoldingSet.h
+2-4llvm/include/llvm/Analysis/ScalarEvolution.h
+68-183 files

LLVM/project dcdd1bcclang/include/clang/Sema Sema.h, clang/lib/Sema SemaTemplate.cpp SemaDecl.cpp

[C++20] [Modules] Identify the tag redecl through Using (#221147)

Close https://github.com/llvm/llvm-project/issues/96423

We've already have some logics to merge the redecls. But if the previous
decls are found through using decl, we can't merge them right now. As
the reproducer shows. The using decl is common in modules as a common
method to wrap headers into a module.

The fix is simple too. If the existing check fails, we'll check if the
found one is a using decl, if yes, we will reuse the existing check with
the target decl for using decl.
DeltaFile
+41-0clang/test/Modules/pr96423.cppm
+14-2clang/lib/Sema/SemaDecl.cpp
+7-0clang/include/clang/Sema/Sema.h
+2-1clang/lib/Sema/SemaTemplate.cpp
+64-34 files

LLVM/project d3c583dlibc/test/src/math/smoke CMakeLists.txt

order
DeltaFile
+2-2libc/test/src/math/smoke/CMakeLists.txt
+2-21 files

LLVM/project 66922bblibc/src/pwd flat_file_db.h, libc/test/src/pwd CMakeLists.txt pwd_test_utils.h

undo unrelated

Created using spr 1.3.7
DeltaFile
+143-0libc/test/src/pwd/getpwnam_r_test.cpp
+136-0libc/test/src/pwd/getpwuid_r_test.cpp
+31-48libc/test/src/pwd/getpwent_test.cpp
+61-0libc/test/src/pwd/pwd_test_utils.h
+37-14libc/src/pwd/flat_file_db.h
+46-0libc/test/src/pwd/CMakeLists.txt
+454-6219 files not shown
+760-7825 files

LLVM/project 154d670libc/src/pwd flat_file_db.h, libc/test/src/pwd pwd_test_utils.h getpwent_test.cpp

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+143-0libc/test/src/pwd/getpwnam_r_test.cpp
+136-0libc/test/src/pwd/getpwuid_r_test.cpp
+31-48libc/test/src/pwd/getpwent_test.cpp
+61-0llvm/unittests/Transforms/IPO/LowerTypeTests.cpp
+61-0libc/test/src/pwd/pwd_test_utils.h
+37-14libc/src/pwd/flat_file_db.h
+469-6220 files not shown
+856-8326 files

LLVM/project 5e5dda1libc/src/pwd flat_file_db.h, libc/test/src/pwd CMakeLists.txt pwd_test_utils.h

undo unrelated

Created using spr 1.3.7
DeltaFile
+143-0libc/test/src/pwd/getpwnam_r_test.cpp
+136-0libc/test/src/pwd/getpwuid_r_test.cpp
+31-48libc/test/src/pwd/getpwent_test.cpp
+61-0libc/test/src/pwd/pwd_test_utils.h
+37-14libc/src/pwd/flat_file_db.h
+46-0libc/test/src/pwd/CMakeLists.txt
+454-6217 files not shown
+758-7623 files

LLVM/project 9d84c5allvm/lib/Analysis RegionPass.cpp, llvm/lib/CodeGen MachineFunctionPrinterPass.cpp

undo unrelated

Created using spr 1.3.7
DeltaFile
+1-1llvm/lib/CodeGen/MachineFunctionPrinterPass.cpp
+1-1llvm/lib/Analysis/RegionPass.cpp
+2-22 files

LLVM/project 5d6e449libc/test/shared shared_math_test.cpp shared_math_constexpr_test.cpp

nit
DeltaFile
+6-6libc/test/shared/shared_math_constexpr_test.cpp
+4-4libc/test/shared/shared_math_test.cpp
+10-102 files

LLVM/project 0a9c408libc/src/pwd flat_file_db.h, libc/test/src/pwd CMakeLists.txt pwd_test_utils.h

[libc] Add getpwnam_r and getpwuid_r entrypoints (#220833)

Added reentrant getpwnam_r and getpwuid_r functions using the
FlatFileDatabase lookup engine.

* Implemented getpwnam_r and getpwuid_r entrypoints
* Added find_by_name and find_by_uid lookups under namespace passwd
* Added function specifications to include/pwd.yaml
* Registered entrypoints in config/linux/*/entrypoints.txt
* Added unit tests in libc/test/src/pwd/getpwnam_r_test.cpp and
libc/test/src/pwd/getpwuid_r_test.cpp

Assisted-by: Automated tooling, human reviewed.
DeltaFile
+143-0libc/test/src/pwd/getpwnam_r_test.cpp
+136-0libc/test/src/pwd/getpwuid_r_test.cpp
+31-48libc/test/src/pwd/getpwent_test.cpp
+61-0libc/test/src/pwd/pwd_test_utils.h
+37-14libc/src/pwd/flat_file_db.h
+46-0libc/test/src/pwd/CMakeLists.txt
+454-6217 files not shown
+758-7623 files

LLVM/project 38f2b9dlibc/shared/math fmaximum_magf128.h, libc/src/__support/math fminimum_magf128.h fmaximum_magf128.h

clang-format
DeltaFile
+6-6libc/test/shared/shared_math_constexpr_test.cpp
+4-7libc/src/__support/math/fminimum_magf128.h
+4-7libc/src/__support/math/fmaximum_magf128.h
+4-4libc/test/shared/shared_math_test.cpp
+6-2utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+0-6libc/shared/math/fmaximum_magf128.h
+24-3226 files not shown
+94-6032 files

LLVM/project 1d17047flang/lib/Semantics compute-offsets.cpp, libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap pstl.is_heap_until.pass.cpp pstl.is_heap_until_comp.pass.cpp

rebase

Created using spr 1.3.7
DeltaFile
+1,068-0libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/pstl.is_heap_until_comp.pass.cpp
+1,064-0libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/pstl.is_heap_until.pass.cpp
+144-95llvm/test/Transforms/LoopVectorize/VPlan/RISCV/vplan-vp-intrinsics.ll
+218-0mlir/test/Dialect/Linalg/vectorization/contraction-interface.mlir
+188-13llvm/lib/IR/PrintPasses.cpp
+157-20flang/lib/Semantics/compute-offsets.cpp
+2,839-12893 files not shown
+5,221-56899 files

LLVM/project c3c4e73flang/lib/Semantics compute-offsets.cpp, libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap pstl.is_heap_until.pass.cpp pstl.is_heap_until_comp.pass.cpp

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+1,068-0libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/pstl.is_heap_until_comp.pass.cpp
+1,064-0libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/pstl.is_heap_until.pass.cpp
+144-95llvm/test/Transforms/LoopVectorize/VPlan/RISCV/vplan-vp-intrinsics.ll
+218-0mlir/test/Dialect/Linalg/vectorization/contraction-interface.mlir
+188-13llvm/lib/IR/PrintPasses.cpp
+157-20flang/lib/Semantics/compute-offsets.cpp
+2,839-12893 files not shown
+5,221-56899 files

LLVM/project ce9a865flang/lib/Semantics compute-offsets.cpp, libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap pstl.is_heap_until.pass.cpp pstl.is_heap_until_comp.pass.cpp

rebase

Created using spr 1.3.7
DeltaFile
+1,068-0libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/pstl.is_heap_until_comp.pass.cpp
+1,064-0libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/pstl.is_heap_until.pass.cpp
+144-95llvm/test/Transforms/LoopVectorize/VPlan/RISCV/vplan-vp-intrinsics.ll
+218-0mlir/test/Dialect/Linalg/vectorization/contraction-interface.mlir
+188-13llvm/lib/IR/PrintPasses.cpp
+157-20flang/lib/Semantics/compute-offsets.cpp
+2,839-12893 files not shown
+5,221-56899 files

LLVM/project 5dc81b7flang/lib/Semantics compute-offsets.cpp, libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap pstl.is_heap_until.pass.cpp pstl.is_heap_until_comp.pass.cpp

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+1,068-0libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/pstl.is_heap_until_comp.pass.cpp
+1,064-0libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/pstl.is_heap_until.pass.cpp
+144-95llvm/test/Transforms/LoopVectorize/VPlan/RISCV/vplan-vp-intrinsics.ll
+218-0mlir/test/Dialect/Linalg/vectorization/contraction-interface.mlir
+188-13llvm/lib/IR/PrintPasses.cpp
+157-20flang/lib/Semantics/compute-offsets.cpp
+2,839-12893 files not shown
+5,221-56899 files

LLVM/project 258507fllvm/test/Transforms/LowerTypeTests cfi-jumptable-hotness-summary.ll cfi-jumptable-hotness.ll

[NFC][LowerTypeTests] Add tests for CFI jump table hotness ordering (#221045)

Add pre-commit test coverage establishing the baseline CFI jump table
layout before implementing hotness-based reordering in
https://github.com/llvm/llvm-project/pull/221046:
- cfi-jumptable-hotness.ll: checks jump table entry layout with IR
  function attributes (hot/cold) and entry count profile metadata.
- cfi-jumptable-hotness-summary.ll: checks jump table entry layout
  with ThinLTO module summary call edge hotness types (using text
  summary IR and split-file).

These tests verify the baseline declaration-order layout where functions
within each strict type are placed without hotness consideration, making
the subsequent reordering diff explicit and easy to review.

PR Stack:
* https://github.com/llvm/llvm-project/pull/220776
* https://github.com/llvm/llvm-project/pull/221043
* https://github.com/llvm/llvm-project/pull/221044

    [3 lines not shown]
DeltaFile
+246-0llvm/test/Transforms/LowerTypeTests/cfi-jumptable-hotness.ll
+179-0llvm/test/Transforms/LowerTypeTests/cfi-jumptable-hotness-summary.ll
+425-02 files

LLVM/project c879c05clang/docs ThreadSanitizer.md AddressSanitizer.md

[clang][docs] Document compile-time sanitizer suppressions and options (#218793)

Document compile-time default suppressions
(`__<sanitizer>_default_suppressions`) and default options
(`__<sanitizer>_default_options`) across AddressSanitizer,
LeakSanitizer, and ThreadSanitizer. Document all supported suppression
types for ASan and TSan, programmatic leak checking interfaces for LSan,
and explain independent options evaluation when ASan runs with
integrated LSan/UBSan.

Fixes https://github.com/google/sanitizers/issues/1628

**AI tool usage:** An AI assistant was used to help research and draft
the documentation updates.
DeltaFile
+130-1clang/docs/LeakSanitizer.md
+64-16clang/docs/AddressSanitizer.md
+38-0clang/docs/ThreadSanitizer.md
+232-173 files

LLVM/project 5cf7ac6flang/lib/Semantics compute-offsets.cpp, flang/test/Semantics common-block-size.f90 oversized-storage-sequence.f90

[flang][Semantics] reject COMMON/EQUIVALENCE/derived types whose size does not fit in int64 (#219976)

Semantics was not enforcing the overall byte sizes when of
common block and equivalence storage when building the related symbols
and computing offsets for members. The size and offset silently
overflow, leading to computing inconsistent offsets in lowering and
aborting compilation with internal errors like "error: 'hlfir.declare'
op storage offset exceeds the storage size".

This patch limits the storage of such objects to what can fit a signed
64 bit integer (like gfortran/ifx/classic flang).

Assisted-by: AI
DeltaFile
+157-20flang/lib/Semantics/compute-offsets.cpp
+172-0flang/test/Semantics/oversized-storage-sequence.f90
+29-0flang/test/Semantics/common-block-size.f90
+358-203 files

LLVM/project 53d6bc6lldb/test/API/functionalities/breakpoint/breakpoint_on_lambda_capture TestBreakOnLambdaCapture.py

[lldb][test] Disable TestBreakOnLambdaCapture.py on Windows on Arm (#220944)

Something is wrong with the breakpoint handling which makes it flakey on
our bot.

https://github.com/llvm/llvm-project/issues/220942
DeltaFile
+2-0lldb/test/API/functionalities/breakpoint/breakpoint_on_lambda_capture/TestBreakOnLambdaCapture.py
+2-01 files

LLVM/project cd8701fclang/include/clang/CIR/Dialect/IR CIREnumAttr.td CIROps.td, clang/test/CIR/IR invalid-loop-cleanup.cir cleanup-scope.cir

[CIR] Give the cleanup kind a proper standalone attribute spelling

CleanupKindAttr overrode its assembly format to a bare `$value` so
`cir.cleanup.scope` would print `cleanup all`. The cost was that the
attribute had no readable standalone form, falling back to
`#cir<cleanup_kind all>`.

The `enum($attr)` operation directive removes the tradeoff. The attribute
keeps CIR_EnumAttr's bracketed default and now spells `#cir.cleanup<all>`,
while the operations ask for the bare keyword. The mnemonic drops the `_kind`
suffix the C++ class name carries.

Operation syntax is unchanged. invalid-loop-cleanup.cir now gets one
diagnostic from the enum parser instead of two.
DeltaFile
+21-0clang/test/CIR/IR/cleanup-scope.cir
+4-8clang/include/clang/CIR/Dialect/IR/CIROps.td
+2-4clang/test/CIR/IR/invalid-loop-cleanup.cir
+5-0clang/include/clang/CIR/Dialect/IR/CIREnumAttr.td
+32-124 files