LLVM/project 38a4eefllvm/lib/Target/AMDGPU SIFrameLowering.cpp, llvm/test/CodeGen/AMDGPU whole-wave-functions.ll whole-wave-functions-pei.mir

[AMDGPU] Save entry EXEC in whole-wave prologue with no WWM spills (#207924)

PR #207781 replaced the prologue S_XOR_SAVEEXEC (which set EXEC to
~entryEXEC) with a plain S_MOV EXEC, -1, but dropped the save of the
entry EXEC that the return restores from, leaving an undefined register
read

se S_OR_SAVEEXEC to both save entry EXEC and set EXEC to -1
DeltaFile
+5-5llvm/test/CodeGen/AMDGPU/whole-wave-functions.ll
+6-2llvm/lib/Target/AMDGPU/SIFrameLowering.cpp
+1-1llvm/test/CodeGen/AMDGPU/whole-wave-functions-pei.mir
+12-83 files

LLVM/project 7b4fd87libcxx/docs/Status Cxx23Issues.csv

[libc++] Mark LWG3585 as resolved (#207717)

- Close: https://github.com/llvm/llvm-project/issues/104934.
- Commit:
https://github.com/llvm/llvm-project/commit/0d3d8de014f1012dd0b2c2c077099cf6face44e5
- Test:
https://github.com/llvm/llvm-project/blob/52271a5c11f6abde1fa1221db304212b5eb8ec7c/libcxx/test/std/utilities/variant/variant.variant/variant.assign/copy.pass.cpp#L29-L34
DeltaFile
+1-1libcxx/docs/Status/Cxx23Issues.csv
+1-11 files

LLVM/project baddc8flldb/test/API/tools/lldb-dap/launch TestDAP_launch_extra_launch_commands.py TestDAP_launch_commands.py

[lldb-dap] Migrate DAP launch tests (#207023)

Migrate all the tests in `lldb-dap/launch` base directory only. Fixes
any grammar if needed.
DeltaFile
+49-52lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_extra_launch_commands.py
+47-41lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_commands.py
+30-28lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_environment_with_object.py
+30-25lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_failing_launch_commands.py
+27-21lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_debuggerRoot.py
+25-22lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_environment_with_array.py
+208-18917 files not shown
+498-39623 files

LLVM/project 98a83daflang/lib/Optimizer/Transforms FIRToMemRef.cpp, flang/test/Transforms/FIRToMemRef emboxed-slice-non-unit-stride-non-unit-lb.mlir emboxed-slice-rank-reduction-nonprefix.mlir

Review comments: non-unit stride
DeltaFile
+63-40flang/lib/Optimizer/Transforms/FIRToMemRef.cpp
+69-0flang/test/Transforms/FIRToMemRef/emboxed-slice-non-unit-stride-non-unit-lb.mlir
+58-0flang/test/Transforms/FIRToMemRef/emboxed-slice-rank-reduction-nonprefix.mlir
+10-7flang/test/Transforms/FIRToMemRef/emboxed-slice-rank-reduction.mlir
+8-4flang/test/Transforms/FIRToMemRef/emboxed-slice-array-coor.mlir
+8-4flang/test/Transforms/FIRToMemRef/emboxed-slice-stride.mlir
+216-556 files

LLVM/project ac60c83llvm/test/tools/llvm-mca/AArch64/Cortex C1Ultra-sve-sme-instructions.s C1Ultra-streaming-cme-instructions.s, llvm/test/tools/llvm-mca/AArch64/Inputs sve-sme-instructions.s streaming-cme-instructions.s

[AArch64] llvm-mca C1-Ultra tests: SVE instructions added by SME when not streaming [NFC] (#207948)

In the C1-Ultra llvm-mca test, moves some instructions that were
incorrectly in the test file for "Instructions available with no SME but
will be sent to CME when in streaming SVE mode" into a file specifically
for instruction that are "SVE instructions added by SME and available
when not in Streaming SVE mode".

This is in preparation for forthcoming C1-Nano SME support to the
scheduling model that currently has no information about these
instruction due to lack of information in the C1-Nano SWOG.

This change is currently NFC because the C1-Ultra is still running the
the same tests, just from different test files.
DeltaFile
+71-0llvm/test/tools/llvm-mca/AArch64/Cortex/C1Ultra-sve-sme-instructions.s
+2-14llvm/test/tools/llvm-mca/AArch64/Cortex/C1Ultra-streaming-cme-instructions.s
+5-0llvm/test/tools/llvm-mca/AArch64/Inputs/sve-sme-instructions.s
+0-3llvm/test/tools/llvm-mca/AArch64/Inputs/streaming-cme-instructions.s
+78-174 files

LLVM/project f569fbdllvm/test/CodeGen/AMDGPU target-cpu.ll

AMDGPU: Rewrite target-cpu test for new subarches

The function subtargets should now be a valid subtarget for
the top-level subarch.
DeltaFile
+52-74llvm/test/CodeGen/AMDGPU/target-cpu.ll
+52-741 files

LLVM/project f606415llvm/unittests/CodeGen AMDGPUMetadataTest.cpp, llvm/unittests/CodeGen/GlobalISel GISelMITest.cpp

AMDGPU: Migrate unittests to subarch triples

Replace specifying a processor name with the triple
subarch.

The register-limit helpers in AMDGPUUnitTests.cpp that enumerate every
valid CPU via fillValidArchListAMDGCN still pass the CPU explicitly, as
does the MC Disassembler smoke test (its C disassembler API derives the
subtarget from the CPU, not the triple subarch).

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+6-6llvm/unittests/MC/AMDGPU/DwarfRegMappings.cpp
+6-6llvm/unittests/Target/AMDGPU/DwarfRegMappings.cpp
+3-3llvm/unittests/CodeGen/AMDGPUMetadataTest.cpp
+2-2llvm/unittests/MIR/MachineMetadata.cpp
+2-2llvm/unittests/Target/AMDGPU/AMDGPUUnitTests.cpp
+2-2llvm/unittests/CodeGen/GlobalISel/GISelMITest.cpp
+21-2110 files not shown
+33-3316 files

LLVM/project 60cda03clang/lib/Basic OffloadArch.cpp, clang/lib/Driver Driver.cpp

clang: Start using new amdgpu subarch triples

Fixup invocations using --target=amdgcn + -mcpu to introduce
the subarch in the triple.

For offload toolchains, a single toolchain is constructed for the
top level amdgpu architecture, and the effective triple is used for
target specific tool invocations.

The specifics of the resource directory layout are tbd. This does
try to find resources in the subarch named directory. The paths
are searched at toolchain creation time, so that does not work
when there are multiple subarches.

Fixes #154925
DeltaFile
+234-2clang/lib/Basic/OffloadArch.cpp
+59-59clang/test/Driver/offload-arch-translation-amdgpu.cu
+43-43clang/test/Driver/hip-phases.hip
+33-33clang/test/Driver/hip-binding.hip
+49-15clang/lib/Driver/ToolChains/CommonArgs.cpp
+43-12clang/lib/Driver/Driver.cpp
+461-164103 files not shown
+1,251-491109 files

LLVM/project 130138aclang/lib/Basic/Targets AMDGPU.h AMDGPU.cpp, clang/test/Misc/target-invalid-cpu-note amdgcn.c

clang/AMDGPU: Validate -target-cpu in cc1 is valid for the subarch

Restrict the reported list of valid target-cpus based on the triple's
subarch. This is more consistent with how other targets validate the
target CPU name. Currently we have split handling validating the target
name for the triple in both the driver and here. The driver based diagnostic
seems to be an amdgpu-ism in 2 different places (though there is one arm
validation emitting the same diagnostic). In the future we could probably
drop those.
DeltaFile
+55-0clang/test/Misc/target-invalid-cpu-note/amdgcn.c
+6-5clang/lib/Basic/Targets/AMDGPU.h
+1-1clang/lib/Basic/Targets/AMDGPU.cpp
+62-63 files

LLVM/project 0aece84llvm/test/CodeGen/AMDGPU directive-amdgcn-target-legacy-triples.ll directive-amdgcn-target.ll

AMDGPU: Migrate target id tests to use new subarch triples
DeltaFile
+239-0llvm/test/CodeGen/AMDGPU/directive-amdgcn-target-legacy-triples.ll
+0-239llvm/test/CodeGen/AMDGPU/directive-amdgcn-target.ll
+11-11llvm/test/CodeGen/AMDGPU/tid-mul-func-xnack-all-off.ll
+12-10llvm/test/CodeGen/AMDGPU/target-id-xnack-always-on.ll
+11-11llvm/test/CodeGen/AMDGPU/tid-mul-func-xnack-all-any.ll
+11-11llvm/test/CodeGen/AMDGPU/tid-mul-func-xnack-all-not-supported.ll
+284-2829 files not shown
+380-37815 files

LLVM/project dcc3cd2clang/lib/Driver/ToolChains CommonArgs.cpp, clang/test/Driver amdgpu-mcpu.cl hip-sanitize-options.hip

clang/AMDGPU: Stop passing redundant -target-cpu to cc1

Now that the exact target is encoded in the triple's subarch field,
-target-cpu is redundant. This avoids polluting the resultant IR with
unwanted "target-cpu" attributes. The net result is the desired codegen
when compiling libraries for a major subarch and linking it into a
program compiled for a specific arch. e.g., compiling for "gfx9-generic"
would pollute the IR with "target-cpu"="gfx9-generic", so codegen
would ultimately be performed for the generic target even after
linking into the concrete gfx9 cpu. The specialization will now be
achieved by merging the triples without the linker or optimization
passes needing to fixup function attributes.
DeltaFile
+62-62clang/test/Driver/amdgpu-mcpu.cl
+26-26clang/test/Driver/hip-sanitize-options.hip
+20-10clang/lib/Driver/ToolChains/CommonArgs.cpp
+12-16clang/test/Driver/hip-rdc-device-only.hip
+24-0clang/test/Preprocessor/amdgpu-subarch-cc1-target-cpu.cl
+10-10clang/test/Driver/amdgpu-xnack-sramecc-flags.c
+154-12427 files not shown
+214-21133 files

LLVM/project 0af9c8bllvm/docs AMDGPUUsage.rst

move table
DeltaFile
+119-118llvm/docs/AMDGPUUsage.rst
+119-1181 files

LLVM/project 081fb14llvm/docs AMDGPUUsage.rst, llvm/lib/TargetParser AMDGPUTargetParser.cpp Triple.cpp

AMDGPU: Introduce amdgpu triple arch

Move towards using the triple for representing incompatible
ISA changes. Use the subarch field to represent the various
incompatible cases. Previously we pretended a single triple arch
was universally compatible, and only distinguished by function
level subtargets. Move towards using distinct triples to enable
more sophisticated toolchain handling in the future, like proper
runtime library linking.

Introduce a new subarch per unique ISA, but also introduce
"major subarches" which are compatible by a set of covered
minor ISA versions. These map to the existing generic targets.
There are a few placeholder subarch entries, which currently
have missing backing generic arches for codegen.

This should be the preferred triple arch name going forward,
but is treated as an alias of amdgcn. This does not yet change
clang to emit the new triples.

    [2 lines not shown]
DeltaFile
+560-440llvm/docs/AMDGPUUsage.rst
+427-0llvm/unittests/TargetParser/TargetParserTest.cpp
+241-11llvm/lib/TargetParser/AMDGPUTargetParser.cpp
+200-12llvm/unittests/TargetParser/TripleTest.cpp
+177-0llvm/test/CodeGen/AMDGPU/target-id-from-triple.ll
+147-15llvm/lib/TargetParser/Triple.cpp
+1,752-47875 files not shown
+2,595-69481 files

LLVM/project bc5d5f3clang-tools-extra/clang-tidy/misc ThrowByValueCatchByReferenceCheck.cpp, clang-tools-extra/docs/clang-tidy/checks/bugprone throwing-static-initialization.rst unchecked-string-to-number-conversion.rst

[clang-tidy][docs] Update CERT links to current SEI URLs. NFC. (#207893)
DeltaFile
+1-3clang-tools-extra/clang-tidy/misc/ThrowByValueCatchByReferenceCheck.cpp
+1-1clang-tools-extra/docs/clang-tidy/checks/bugprone/throwing-static-initialization.rst
+1-1clang-tools-extra/docs/clang-tidy/checks/bugprone/unchecked-string-to-number-conversion.rst
+1-1clang-tools-extra/docs/clang-tidy/checks/cert/dcl50-cpp.rst
+1-1clang-tools-extra/docs/clang-tidy/checks/cert/dcl58-cpp.rst
+1-1clang-tools-extra/docs/clang-tidy/checks/cert/env33-c.rst
+6-812 files not shown
+18-2018 files

LLVM/project 9ccf5efllvm/test/CodeGen/AMDGPU strict_fsub.f64.ll llvm.amdgcn.image.dim.gfx90a.ll

[NFC][AMDGPU] Fix orphaned SDAG/GISEL check prefixes in tests
DeltaFile
+49-21llvm/test/CodeGen/AMDGPU/strict_fsub.f64.ll
+26-3llvm/test/CodeGen/AMDGPU/llvm.amdgcn.image.dim.gfx90a.ll
+5-2llvm/test/CodeGen/AMDGPU/invalid-addrspacecast.ll
+80-263 files

LLVM/project d4cf0c3llvm/test/CodeGen/AArch64/GlobalISel uaddo-8-16-bits.mir store-merging.mir

[AArch64][GlobalISel] Update some tests to use concrete types. NFC (#207960)
DeltaFile
+334-334llvm/test/CodeGen/AArch64/GlobalISel/uaddo-8-16-bits.mir
+271-271llvm/test/CodeGen/AArch64/GlobalISel/store-merging.mir
+24-24llvm/test/CodeGen/AArch64/GlobalISel/xro-addressing-mode-constant.mir
+17-17llvm/test/CodeGen/AArch64/GlobalISel/store-wro-addressing-modes.mir
+15-15llvm/test/CodeGen/AArch64/GlobalISel/widen-narrow-tbz-tbnz.mir
+14-14llvm/test/CodeGen/AArch64/GlobalISel/subreg-copy.mir
+675-6751 files not shown
+679-6797 files

LLVM/project 5aa3f7dllvm/lib/Transforms/Scalar LoopLoadElimination.cpp LoopDistribute.cpp, llvm/lib/Transforms/Utils LoopVersioning.cpp

[LLE][LoopDistribution][LoopVersioning] Form LCSSA at Caller Invoking LoopVersioning Utility (#202296)

LoopVersioning utility `versionLoop()` expects the input form to be
LCSSA. However, passes like Loop distribution, Loop-load-elimination,
may invoke versioning with a non-LCSSA IR. Versioning updates exit-block
PHIs to handle both the original loop and the cloned loop. However, a
raw non-LCSSA use in the exit block (such as `switch i1 %C`) still
points to the original loop’s `%C`. On the cloned-loop path, control
reaches the exit block without executing the original `%C`, resulting in
error: `Instruction does not dominate all uses!`.

The fix is to form LCSSA at the caller pass.
DeltaFile
+240-0llvm/test/Transforms/LoopDistribute/non-lcssa-input.ll
+193-0llvm/test/Transforms/LoopLoadElim/non-lcssa-input.ll
+7-2llvm/lib/Transforms/Utils/LoopVersioning.cpp
+5-0llvm/lib/Transforms/Scalar/LoopLoadElimination.cpp
+3-0llvm/lib/Transforms/Scalar/LoopDistribute.cpp
+448-25 files

LLVM/project 3f3276ellvm/lib/Target/SPIRV SPIRVBuiltins.cpp SPIRVUtils.cpp

[NFC][SPIRV] Use `StringRef` by value (no `const`, no `&`) (#207940)

A `StringRef` is non-modifiable and it acts as a reference, so there is
no need to declare it as `const` nor `&`.

---------

Co-authored-by: Arseniy Obolenskiy <arseniy.obolenskiy at amd.com>
DeltaFile
+11-11llvm/lib/Target/SPIRV/SPIRVBuiltins.cpp
+8-10llvm/lib/Target/SPIRV/SPIRVUtils.cpp
+5-5llvm/lib/Target/SPIRV/SPIRVBuiltins.h
+4-5llvm/lib/Target/SPIRV/SPIRVUtils.h
+1-1llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.cpp
+1-1llvm/lib/Target/SPIRV/SPIRVMetadata.cpp
+30-336 files

LLVM/project d8bc450lldb/source/Plugins/Process/Utility LinuxSignals.cpp

[lldb][Linux] Show si_addr for SIGBUS signals (#207718)

The general rule is if si_addr is the same as the PC, we don't show it
because it doesn't add any new information.

SIGBUS signals are caused by an instruction trying to do something, but
si_addr is not the address of the instruction. It's some virtual
address, which is the important bit so add it to the description.

https://man7.org/linux/man-pages/man7/signal.7.html
> SIGBUS <...> Bus error (bad memory access)

Before:
```
* thread #1, name = 'test.o', stop reason = signal SIGBUS: illegal address
  * frame #0: 0x0000aaaaaaaa0b80 test.o`main at test.c:42:13
```
After:
```

    [7 lines not shown]
DeltaFile
+3-3lldb/source/Plugins/Process/Utility/LinuxSignals.cpp
+3-31 files

LLVM/project 3c2de78llvm/lib/Target/SPIRV SPIRVUtils.cpp SPIRVUtils.h

[NFC][SPIRV] Make `getVacantFunctionName` static

The function is only used inside `SPIRVUtils.cpp`.
DeltaFile
+1-1llvm/lib/Target/SPIRV/SPIRVUtils.cpp
+0-2llvm/lib/Target/SPIRV/SPIRVUtils.h
+1-32 files

LLVM/project fcd02aemlir/lib/Conversion/SPIRVToLLVM SPIRVToLLVM.cpp, mlir/test/Conversion/SPIRVToLLVM control-flow-ops-to-llvm.mlir

[mlir][SPIRVToLLVM] Add spirv.Unreachable to llvm.unreachable conversion (#207762)
DeltaFile
+18-0mlir/test/Conversion/SPIRVToLLVM/control-flow-ops-to-llvm.mlir
+15-0mlir/lib/Conversion/SPIRVToLLVM/SPIRVToLLVM.cpp
+33-02 files

LLVM/project d9c133dllvm/lib/Target/SPIRV SPIRVUtils.cpp SPIRVUtils.h

[NFC][SPIRV] Remove dead helper `buildOpMemberDecorate(Register, MachineInstr &, ...)`
DeltaFile
+0-12llvm/lib/Target/SPIRV/SPIRVUtils.cpp
+0-4llvm/lib/Target/SPIRV/SPIRVUtils.h
+0-162 files

LLVM/project 6e0de1clibsycl/include/sycl/__impl queue.hpp, libsycl/include/sycl/__impl/detail obj_utils.hpp

[libsycl] Implement memcpy API (#205369)
DeltaFile
+88-30libsycl/src/detail/queue_impl.cpp
+115-0libsycl/test/usm/memcpy.cpp
+85-0libsycl/unittests/queue/memcpy.cpp
+44-9libsycl/unittests/mock/helpers.cpp
+37-0libsycl/include/sycl/__impl/queue.hpp
+21-0libsycl/include/sycl/__impl/detail/obj_utils.hpp
+390-399 files not shown
+445-4815 files

LLVM/project 5318bd4libc/include elf.yaml CMakeLists.txt, libc/include/llvm-libc-macros sys-auxv-macros.h

[libc] Add auxiliary vector and note macros to elf.h (#207914)

Added missing macros to elf.h:

* sys-auxv-macros.h: Added AT_RSEQ_FEATURE_SIZE and AT_RSEQ_ALIGN.
* elf.yaml: Added PT_AARCH64_MEMTAG_MTE, PN_XNUM, ELFCLASSNUM, EV_NUM,
and AT_* macros (via sys-auxv-macros.h). Also added NN_* and NT_* note
macros (including NT_FPREGSET and NT_SIGINFO) to match system headers.
* CMakeLists.txt: Added sys_auxv_macros dependency to elf target.

Assisted-by: Automated tooling, human reviewed.
DeltaFile
+92-0libc/include/elf.yaml
+2-0libc/include/llvm-libc-macros/sys-auxv-macros.h
+1-0libc/include/CMakeLists.txt
+95-03 files

LLVM/project 62cb33ellvm/lib/Target/RISCV RISCVTargetTransformInfo.h

[RISCV] Enumerate all RecurKind cases in isLegalToVectorizeReduction. nfc (#207932)
DeltaFile
+12-1llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h
+12-11 files

LLVM/project ee2f864llvm/lib/Target/RISCV RISCVTargetTransformInfo.cpp, llvm/test/Transforms/LoopVectorize/RISCV interleaved-accesses-i64-rv32.ll strided-accesses-i64-rv32.ll

[RISCV] Fix interleaved + strided costs for e64 elements on rv32 (#207927)

This is the same fix as #176105 for interleaved + strided memory op
costs.

We currently compute the cost of interleaved + strided ops as N *
scalar element memory ops, but on rv32 the scalar memory access will
be on an illegal type for 64 bit elements, even with zve64x. Prevent
it from overcosting by just using TCC_Basic.
DeltaFile
+55-0llvm/test/Transforms/LoopVectorize/RISCV/interleaved-accesses-i64-rv32.ll
+52-0llvm/test/Transforms/LoopVectorize/RISCV/strided-accesses-i64-rv32.ll
+2-15llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
+6-10llvm/test/Transforms/LoopVectorize/RISCV/early-exit-live-out.ll
+115-254 files

LLVM/project be450c7llvm/include/llvm/IR Instructions.h IRBuilder.h, llvm/lib/IR Instructions.cpp

Update for comments
DeltaFile
+12-0llvm/lib/IR/Instructions.cpp
+9-3llvm/include/llvm/IR/Instructions.h
+2-5llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
+2-5llvm/include/llvm/IR/IRBuilder.h
+25-134 files

LLVM/project 7fc9724llvm/lib/Target/SPIRV SPIRVUtils.cpp

Apply suggestion from @aobolensk

Co-authored-by: Arseniy Obolenskiy <arseniy.obolenskiy at amd.com>
DeltaFile
+0-1llvm/lib/Target/SPIRV/SPIRVUtils.cpp
+0-11 files

LLVM/project aa0d6a1llvm/lib/Target/SPIRV SPIRVBuiltins.cpp SPIRVUtils.cpp

[NFC][SPIRV] Correct misuses of `StringRef`

A `StringRef` is non-modifiable and it acts as a reference, so there is
no need to declare it as `const` or `&`.
DeltaFile
+11-11llvm/lib/Target/SPIRV/SPIRVBuiltins.cpp
+9-10llvm/lib/Target/SPIRV/SPIRVUtils.cpp
+5-5llvm/lib/Target/SPIRV/SPIRVBuiltins.h
+4-5llvm/lib/Target/SPIRV/SPIRVUtils.h
+1-1llvm/lib/Target/SPIRV/SPIRVMetadata.cpp
+1-1llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.cpp
+31-336 files

LLVM/project d6a4a97llvm/lib/Target/SPIRV SPIRVUtils.cpp SPIRVUtils.h

[NFC][SPIRV] Remove dead helper `addStringImm(const StringRef &Str, IRBuilder<> &B, std::vector<Value *> &Args)` (#207923)

The helper was unused.
DeltaFile
+0-9llvm/lib/Target/SPIRV/SPIRVUtils.cpp
+0-2llvm/lib/Target/SPIRV/SPIRVUtils.h
+0-112 files