LLVM/project bb315b7llvm/test/CodeGen/X86 phaddsub-undef.ll haddsub-undef.ll

[X86] Update (p)haddsub undef element tests to match the output IR from the middle-end (#207244)

Use the vectorised output from the PhaseOrdering/X86 hadd.ll tests -
I've added test coverage for multiple SSE/AVX levels for cases where the
middle-end output is different for any level.

This exposes a number of regressions that have been there for some time
but we'd missed as we'd assumed the backend would still be receiving
non-vectorised IR, but there's been plenty of changes to SLP,
InstCombine and VectorCombine since then - end2end tests would have been
very useful here :(

Looking at fixes next before finally removing the (dead) scalar hadd
matching code for #143000
DeltaFile
+202-155llvm/test/CodeGen/X86/phaddsub-undef.ll
+112-207llvm/test/CodeGen/X86/haddsub-undef.ll
+314-3622 files

LLVM/project 59362e4lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/vbool main.cpp TestDataFormatterStdVBool.py

[lldb][test] Modernize and expand data-formatter-stl/generic/vbool (#206955)

This fixes several issues with this test:
* We use modern test utils for setting up the process.
* We get rid of the state-reset code which is no longer necessary these
days.
* Expand the test to also cover an empty and sub-word-size vector of
bool.

assisted-by: claude
DeltaFile
+85-95lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/vbool/main.cpp
+42-71lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/vbool/TestDataFormatterStdVBool.py
+127-1662 files

LLVM/project 47e3ac2lldb/packages/Python/lldbsuite/test lldbtest.py

[lldb][test] Truncate unexpectedly long test outputs (#206967)

A bug in LLDB could make our tests to produce giant ValueObjects with
millions of children. The same goes for most commands that print out
test data. While our test system can handle this amount of output, the
resulting log output will most likely break the storage capacity of our
build bots.

This patch adds truncation to the various expect* methods that avoids
spamming the output in the (unlikely) case this happens.

See also #206444
DeltaFile
+43-3lldb/packages/Python/lldbsuite/test/lldbtest.py
+43-31 files

LLVM/project c657906llvm/include/llvm/DebugInfo/DWARF DWARFVerifier.h, llvm/lib/DebugInfo/DWARF DWARFVerifier.cpp

[DebugInfo] Avoid std::function in DWARF verifier internals (#202866)

This changes `OutputCategoryAggregator`'s synchronous callback
parameters from `std::function` to `function_ref`, avoiding type-erased
callback construction at 75 `DWARFVerifier` diagnostic sites.

On an arm64 Release build, standalone llvm-dwarfdump decreases by
133,680 bytes raw and 17,040 bytes stripped, `DWARFVerifier.cpp.o`
decreases by 174,464 bytes, and linked fixups decrease by 546.

Work towards #202616

AI tool disclosure: Co-authored with OpenAI Codex.
DeltaFile
+8-9llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
+5-6llvm/include/llvm/DebugInfo/DWARF/DWARFVerifier.h
+13-152 files

LLVM/project a4df89bllvm/include/llvm/Target TargetPfmCounters.td, llvm/test/TableGen ExegesisRawPfmCounters.td

[llvm-exegesis] Add raw PMU encoding in TargetPfmCounters tablegen (#201228)

Adds optional EventSelect and UMask fields to PfmCounter in
TargetPfmCounters.td. EventSelect defaults to -1 (no raw encoding).
When set, ExegesisEmitter outputs raw hex values instead of a libpfm
symbolic name, allowing per-CPU .td entries to bypass
pfm_get_os_event_encoding for counters that are undocumented or
unsupported in libpfm.

Extends PfmCountersInfo with CycleCounterEventSelect, CycleCounterUMask,
UopsCounterEventSelect, and UopsCounterUMask fields. PerfHelper wiring
in a subsequent patch.

Towards #187930
DeltaFile
+39-8llvm/utils/TableGen/ExegesisEmitter.cpp
+32-0llvm/test/TableGen/ExegesisRawPfmCounters.td
+8-0llvm/tools/llvm-exegesis/lib/Target.h
+6-2llvm/tools/llvm-exegesis/lib/Target.cpp
+5-0llvm/include/llvm/Target/TargetPfmCounters.td
+90-105 files

LLVM/project 3824108mlir/lib/Dialect/Linalg/Transforms TilingInterfaceImpl.cpp, mlir/test/Dialect/Linalg scalable-pack-consumer-fusion.mlir scalable-unpack-producer-fusion.mlir

[mlir][linalg/scf/transform] scalable tiling and fusion for pack/unpack ops (#204007)

# Inner tile alignment hints for scalable `linalg.pack`/`linalg.unpack`
tiling and fusion

## Overview

Tiling and fusing `linalg.pack`/`linalg.unpack` produces a clean result
only when the tiling implementation can tell how a loop tile size
relates to the op's inner tile size. When both are statically known this
is decided by comparing the constants. But with **scalable** (and, more
generally, dynamic) sizes, e.g. a loop tile of `8 * vscale` against an
inner tile of `8 * vscale`, that relationship is symbolic and cannot
cleanly be recovered from the IR, so the implementation conservatively
falls back to a dynamic, over-allocated tile. See #150185 for more
details.

This PR adds an optional **inner tile alignment hint**: a per-dimension
caller assertion about that relationship, threaded from the transform-op

    [169 lines not shown]
DeltaFile
+373-0mlir/test/Dialect/Linalg/scalable-pack-consumer-fusion.mlir
+364-0mlir/test/Dialect/Linalg/scalable-unpack-producer-fusion.mlir
+201-33mlir/lib/Dialect/Linalg/Transforms/TilingInterfaceImpl.cpp
+209-0mlir/test/Dialect/Linalg/scalable-unpack-consumer-fusion.mlir
+122-0mlir/test/Dialect/Linalg/scalable-unpack-tiling.mlir
+111-0mlir/test/Dialect/Linalg/scalable-pack-producer-fusion.mlir
+1,380-3319 files not shown
+2,006-8325 files

LLVM/project 253d6f2.ci compute_projects_test.py compute_projects.py

[CI][flang][OpenMP] Build OpenMP runtime mod files for flang tests (#206517)

Some flang openmp lit tests require mod files (a bit like C header
files, except they are compiler generated) from the openmp runtime. As
the openmp runtime is not currently built in this configuration, these
71 flang tests get skipped and a warning is emitted.

Here I enable openmp as a dependency for flang but add
-DLIBOMP_FORTRAN_MODULES_ONLY=ON so that only the required mod files are
built and not the whole of the openmp runtime.

This only effects linux bots: Windows and MacOS explicitly exclude
openmp so it will still not be enabled there.

Assited-by: Codex
DeltaFile
+2-2.ci/compute_projects_test.py
+1-0.ci/compute_projects.py
+3-22 files

LLVM/project aded530clang/test/CodeGen attr-counted-by.c attr-counted-by-with-sanitizers.c

[Clang][tests][NFC] Split __counted_by attribute testcases into two (#207144)

Splitting the testcase file makes it easier to review the generated
code. The only changes are cosmetic:

  - Renaming functions and structs to be more descriptive, and
  - Removing a duplicate test.
DeltaFile
+0-2,755clang/test/CodeGen/attr-counted-by.c
+1,736-0clang/test/CodeGen/attr-counted-by-with-sanitizers.c
+1,387-0clang/test/CodeGen/attr-counted-by-without-sanitizers.c
+3,123-2,7553 files

LLVM/project 234960eclang/lib/Sema SemaLifetimeSafety.h, clang/test/Sema/LifetimeSafety misplaced-lifetimebound-intra-tu.cpp annotation-suggestions-fixits.cpp

[LifetimeSafety] Point annotation suggestion location to fix-it insertion point (#207345)
DeltaFile
+29-29clang/test/Sema/LifetimeSafety/misplaced-lifetimebound-intra-tu.cpp
+18-18clang/test/Sema/LifetimeSafety/annotation-suggestions-fixits.cpp
+9-9clang/test/Sema/LifetimeSafety/misplaced-lifetimebound-cross-tu.cpp
+2-2clang/lib/Sema/SemaLifetimeSafety.h
+58-584 files

LLVM/project ba8e423lldb/packages/Python/lldbsuite/test lldbutil.py, lldb/test/API/commands/platform/connect TestPlatformConnect.py

[lldb][test] Add a function to spawn lldb-server platforms (#205083)

I will be doing this in a future test and we already have a few copies of this code in various tests.
DeltaFile
+5-24lldb/test/API/commands/platform/connect/TestPlatformConnect.py
+3-22lldb/test/API/commands/target/auto-install-main-executable/TestAutoInstallMainExecutable.py
+1-22lldb/test/API/commands/platform/launchgdbserver/TestPlatformLaunchGDBServer.py
+21-0lldb/packages/Python/lldbsuite/test/lldbutil.py
+30-684 files

LLVM/project 11438bcllvm/lib/Target/AArch64 AArch64ISelLowering.cpp, llvm/test/CodeGen/AArch64 sve-masked-gather-64b-unscaled.ll sve-masked-gather.ll

[AArch64] Combine undef UZP and NVCAST away. (#204623)

These are used to lower insert_subvec nodes quite early in SDAG. After
DAG combines run, it's possible that the inputs to these AArch64 nodes
become UNDEF.
DeltaFile
+17-5llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+3-6llvm/test/CodeGen/AArch64/sve-masked-gather-64b-unscaled.ll
+3-6llvm/test/CodeGen/AArch64/sve-masked-gather.ll
+1-2llvm/test/CodeGen/AArch64/sve-masked-gather-legalize.ll
+24-194 files

LLVM/project 499eba6llvm/lib/Target/AArch64 AArch64ISelLowering.cpp, llvm/test/CodeGen/AArch64 sve2p1-while-pn-folds.ll

[SDAG][AArch64] Fold extract from pext to use status flags (#206443)

This folds extracting the first bit from the first segment of a
predicate-as-counter to use the "first active" status. E.g.:

```
%pn:aarch64svcount, %flags:FlagsVT = WHILELO_PRED_COUNTER(a, b, VLx4)
%first_pred:nxv4i1 = pext(%pn, 0)
%more:i1 = extractelement(%first_pred, 0)
```
->
```
%pn:aarch64svcount, %flags:FlagsVT = WHILELO_PRED_COUNTER(a, b, VLx4)
%more = CSET(%flags, FIRST_ACTIVE)
```

Assisted-by: Codex (adding test variations)
DeltaFile
+207-0llvm/test/CodeGen/AArch64/sve2p1-while-pn-folds.ll
+58-0llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+265-02 files

LLVM/project 4d46b7aclang/utils/TableGen ClangOpcodesEmitter.cpp

[clang][bytecode][NFC] Report error if HasGroup is set without types (#207334)

Setting `HasGroup = 1` in tablegen without the types being non-empty
causes problems later, so diagnose it.
DeltaFile
+5-0clang/utils/TableGen/ClangOpcodesEmitter.cpp
+5-01 files

LLVM/project 15b3882llvm/test/CodeGen/AArch64 arm64-fast-isel-conversion.ll

[AArch64][FastISel] Update arm64-fast-isel-conversion.ll check lines (NFC) (#207159)

Before fixing relevant bugs and extending the existing tests,
auto-generate CHECKs.

Note that some of the existing CHECKs actually check for buggy isel.
Those will be fixed separately, after adding more tests in a separate
PR. This PR just runs `update_llc_test_checks.py`.
DeltaFile
+218-128llvm/test/CodeGen/AArch64/arm64-fast-isel-conversion.ll
+218-1281 files

LLVM/project 9338665llvm/test/CodeGen/AArch64/Atomics aarch64_be-atomicrmw-lse2.ll aarch64_be-atomicrmw-rcpc3.ll

Merge branch 'main' into users/usx95/07-03-annotation-suggestion-loc
DeltaFile
+315-315llvm/test/CodeGen/AArch64/Atomics/aarch64_be-atomicrmw-lse2.ll
+315-315llvm/test/CodeGen/AArch64/Atomics/aarch64_be-atomicrmw-rcpc3.ll
+315-315llvm/test/CodeGen/AArch64/Atomics/aarch64_be-atomicrmw-rcpc.ll
+315-315llvm/test/CodeGen/AArch64/Atomics/aarch64_be-atomicrmw-v8a.ll
+180-180llvm/test/CodeGen/AArch64/Atomics/aarch64_be-cmpxchg-rcpc3.ll
+180-180llvm/test/CodeGen/AArch64/Atomics/aarch64_be-cmpxchg-lse2.ll
+1,620-1,620255 files not shown
+3,264-2,659261 files

LLVM/project efcfff7libcxx/test/libcxx/strings/basic.string/string.modifiers assert.append.pass.cpp assert.assign.pass.cpp

[libc++] Add assert test for string assign/append (#207164)

Fixes
https://github.com/llvm/llvm-project/pull/206320#discussion_r3507502638.
DeltaFile
+40-0libcxx/test/libcxx/strings/basic.string/string.modifiers/assert.append.pass.cpp
+40-0libcxx/test/libcxx/strings/basic.string/string.modifiers/assert.assign.pass.cpp
+80-02 files

LLVM/project 409705allvm/include/llvm/MC MCSubtargetInfo.h, llvm/lib/CodeGen TargetSubtargetInfo.cpp

[spr] initial version

Created using spr 1.3.8-wip
DeltaFile
+20-14llvm/utils/TableGen/SubtargetEmitter.cpp
+8-8llvm/lib/MC/MCSubtargetInfo.cpp
+6-6llvm/include/llvm/MC/MCSubtargetInfo.h
+6-5llvm/lib/CodeGen/TargetSubtargetInfo.cpp
+3-2llvm/unittests/CodeGen/MFCommon.inc
+2-2llvm/utils/TableGen/Common/CodeGenSchedule.h
+45-374 files not shown
+51-4110 files

LLVM/project 243211allvm/docs ReleaseNotes.md

[ReleaseNotes] Remove leftover conflict marker (#207348)
DeltaFile
+0-1llvm/docs/ReleaseNotes.md
+0-11 files

LLVM/project c2c75b1llvm/lib/Support UnicodeNameToCodepointGenerated.cpp, llvm/test/CodeGen/AMDGPU amdgcn.bitcast.1024bit.ll

Merge remote-tracking branch 'origin/main' into gbossu.nxv1.gather.scatter.2
DeltaFile
+24,053-23,916llvm/lib/Support/UnicodeNameToCodepointGenerated.cpp
+19,967-19,033llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+13,779-6,871llvm/test/tools/llvm-mca/AArch64/Cortex/C1Ultra-sve-instructions.s
+10,260-9,388llvm/test/MC/AMDGPU/gfx11_asm_vopc.s
+12,991-3,310llvm/test/MC/AMDGPU/gfx13_asm_vop3_dpp16.s
+11,856-3,719llvm/test/MC/AMDGPU/gfx12_asm_vop3_dpp16.s
+92,906-66,2379,528 files not shown
+619,839-376,3049,534 files

LLVM/project cd709e7llvm/lib/Target/AArch64 AArch64ISelLowering.cpp

Comments
DeltaFile
+3-3llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+3-31 files

LLVM/project 67d7dfcllvm/test/CodeGen/AArch64/Atomics aarch64_be-atomicrmw-lse2.ll aarch64_be-atomicrmw-rcpc3.ll

[AArch64] Fix reversed values in big-endian 128-bit atomics (#205760)

When AArch64TargetLowering expands a load-linked or a store-conditional
during the atomic-expand pass, it made the fixed assumption that the
64-bit value stored first in memory was the low-order half of the
128-bit value, instead of checking the SubtargetInfo's endianness. The
same was true of the code that expands CMP_SWAP_128 pseudoinstructions.
So in each case, if you compiled 128-bit atomic code big-endian, you'd
get back a 128-bit integer with the top and bottom half swapped.

This was found by compiler-rt's existing tests when we ran them for a
big-endian AArch64 target in Arm Toolchain.

Most of the test changes here are `update_llc_test_checks` churn: there
were already many tests of AArch64 atomics in big-endian mode, and
apparently they all simply had the reversed registers in their expected
output.

The one new test, `aarch64_i128_endianness.ll`, directly demonstrates

    [4 lines not shown]
DeltaFile
+315-315llvm/test/CodeGen/AArch64/Atomics/aarch64_be-atomicrmw-lse2.ll
+315-315llvm/test/CodeGen/AArch64/Atomics/aarch64_be-atomicrmw-rcpc3.ll
+315-315llvm/test/CodeGen/AArch64/Atomics/aarch64_be-atomicrmw-v8a.ll
+315-315llvm/test/CodeGen/AArch64/Atomics/aarch64_be-atomicrmw-rcpc.ll
+180-180llvm/test/CodeGen/AArch64/Atomics/aarch64_be-cmpxchg-rcpc.ll
+180-180llvm/test/CodeGen/AArch64/Atomics/aarch64_be-cmpxchg-v8a.ll
+1,620-1,62012 files not shown
+2,312-2,25518 files

LLVM/project 17e7497cross-project-tests/debuginfo-tests/dexter-tests optnone-fastmath.cpp optnone-simple-functions.cpp, cross-project-tests/debuginfo-tests/dexter/dex/debugger/visualstudio VisualStudio.py

[Dexter] Switch to using script-mode by default (#204369)

This patch changes the default mode of Dexter from heuristic-mode to
script-mode. The --use-script argument is replaced with --use-heuristic,
some comments/docs/error messages are updated accordingly, and tests
have their flags switched accordingly.
DeltaFile
+2-6cross-project-tests/debuginfo-tests/dexter/dex/debugger/visualstudio/VisualStudio.py
+3-4cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/view.cpp
+3-3cross-project-tests/debuginfo-tests/dexter/dex/tools/test/Tool.py
+2-2cross-project-tests/debuginfo-tests/dexter/dex/tools/TestToolBase.py
+2-2cross-project-tests/debuginfo-tests/dexter-tests/optnone-fastmath.cpp
+2-2cross-project-tests/debuginfo-tests/dexter-tests/optnone-simple-functions.cpp
+14-19168 files not shown
+190-207174 files

LLVM/project d528cd2clang/lib/Sema SemaLifetimeSafety.h, clang/test/Sema/LifetimeSafety misplaced-lifetimebound-intra-tu.cpp annotation-suggestions-fixits.cpp

annotation-suggestion-loc
DeltaFile
+29-29clang/test/Sema/LifetimeSafety/misplaced-lifetimebound-intra-tu.cpp
+18-18clang/test/Sema/LifetimeSafety/annotation-suggestions-fixits.cpp
+9-9clang/test/Sema/LifetimeSafety/misplaced-lifetimebound-cross-tu.cpp
+2-2clang/lib/Sema/SemaLifetimeSafety.h
+58-584 files

LLVM/project 73e1c53libc/startup/baremetal/arm start.cpp

[libc][ARM] Defend banked SP setup against register allocator (#206757)

The startup code for bare-metal AArch32 A/R shifts the CPU through all
the different modes which have their own copies of SP, updating all the
stack pointers to the same value. But it does it using C intrinsics,
leaving the register allocation to the compiler – so it's possible that
the register allocator happens to use one of the _other_ banked
registers, such as LR.

For example, when I built this code today, it happened that LR was used
to hold one of the constants written into CPSR_c to change mode. That
constant was written into the SVC mode LR before any mode changes, but
the MSR instruction that tried to use it was run in a different mode, so
it copied from _that_ mode's LR, which contained uninitialised nonsense
in place of the desired constant, triggering a boot-time crash.

I think it's safer to use a single asm statement for the whole job,
guaranteeing which registers it uses.
DeltaFile
+21-11libc/startup/baremetal/arm/start.cpp
+21-111 files

LLVM/project 473b0a3clang/unittests/Basic DiagnosticTest.cpp CMakeLists.txt

Fix MSVC build after #206326 (again) (#207335)

Adding /utf-8 is bigger endeavor than I hoped, just disable the
problematic test case for now
DeltaFile
+2-1clang/unittests/Basic/DiagnosticTest.cpp
+0-1clang/unittests/Basic/CMakeLists.txt
+2-22 files

LLVM/project 0341dd5llvm/include/llvm/IR Module.h, llvm/lib/AsmParser LLParser.cpp

[IR] Explicitly specify target feature for module asm (#204548)

Support specifying additional properties on module-level inline
assembly. In particular, the target features and target CPU can now be
specified as follows:

    module asm(target_features: "+foo", target_cpu: "bar")
        "asm line 1"
        "asm line 2"

There may be multiple module inline assembly blocks with different
properties.

This is intended to fix the long standing issue where in LTO scenarios
we don't know what target features to use for parsing the module-level
inline assembly. Now they can be faithfully preserved, even when merging
inline assembly from different modules with different features.

If target_features and target_cpu are empty, we fall back to the old

    [4 lines not shown]
DeltaFile
+85-11llvm/include/llvm/IR/Module.h
+38-36llvm/lib/Object/ModuleSymbolTable.cpp
+29-12llvm/lib/IR/AsmWriter.cpp
+36-3llvm/lib/AsmParser/LLParser.cpp
+29-0llvm/test/Bitcode/module-asm.ll
+22-6llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+239-6853 files not shown
+561-18059 files

LLVM/project b0c9d8allvm/lib/Target/AArch64 AArch64TargetTransformInfo.cpp

[AArch64][InstCombine] Tidy [su]adalp combine (NFC) (#207219)

I missed some comments in the #204796 PR.
DeltaFile
+4-3llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
+4-31 files

LLVM/project 448e7feclang/lib/Analysis/LifetimeSafety FactsGenerator.cpp, clang/test/Sema/LifetimeSafety safety.cpp

[LifetimeSafety] Track unary plus on a pointer (#207243)

Unary plus on a pointer is the identity (+p == p), so the result carries
the operand's loans -- but UO_Plus fell through VisitUnaryOperator's
default and left the result origin empty, dropping the borrow (e.g. p =
+&local was a silently-missed use-after-scope). Handle it by flowing the
operand's rvalue origins.

Assisted-by: Claude Opus 4.8

Co-authored-by: Gabor Horvath <gaborh at apple.com>
DeltaFile
+47-0clang/test/Sema/LifetimeSafety/safety.cpp
+11-0clang/lib/Analysis/LifetimeSafety/FactsGenerator.cpp
+58-02 files

LLVM/project 4d6387dcross-project-tests/debuginfo-tests/dexter Script.md, cross-project-tests/debuginfo-tests/dexter-tests global-constant.cpp

review comments
DeltaFile
+2-1cross-project-tests/debuginfo-tests/dexter-tests/global-constant.cpp
+2-0cross-project-tests/debuginfo-tests/dexter/Script.md
+4-12 files

LLVM/project 5ec1127cross-project-tests/debuginfo-tests/dexter-tests optnone-vectors-and-functions.cpp optnone-struct-and-methods.cpp, cross-project-tests/debuginfo-tests/dexter/dex/debugger/visualstudio VisualStudio.py

[Dexter] Switch to using script-mode by default

This patch changes the default mode of Dexter from heuristic-mode to
script-mode. The --use-script argument is replaced with --use-heuristic,
some comments/docs/error messages are updated accordingly, and tests have
their flags switched accordingly.
DeltaFile
+2-6cross-project-tests/debuginfo-tests/dexter/dex/debugger/visualstudio/VisualStudio.py
+3-4cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/view.cpp
+3-3cross-project-tests/debuginfo-tests/dexter/dex/tools/test/Tool.py
+2-2cross-project-tests/debuginfo-tests/dexter-tests/optnone-vectors-and-functions.cpp
+2-2cross-project-tests/debuginfo-tests/dexter-tests/optnone-struct-and-methods.cpp
+2-2cross-project-tests/debuginfo-tests/dexter-tests/optnone-simple-functions.cpp
+14-19168 files not shown
+188-208174 files