LLVM/project 6da24e4clang/test/OffloadTools/clang-sycl-linker options.ll basic.ll, clang/tools/clang-sycl-linker ClangSYCLLinker.cpp

[clang-sycl-linker] Improve --spirv-dump-device-code and harden CLI handling (#200096)

Several small fixes and improvements to `clang-sycl-linker`'s
command-line
handling, plus completing the `--spirv-dump-device-code` option:

- **`--version`**: now exits with `EXIT_SUCCESS` after printing, instead
of
  falling through into the rest of `main`.
- **Empty input**: report a clear "No input files provided" error from
`getInput` rather than triggering an assertion deep inside
`linkDeviceCode`.
- **`--spirv-dump-device-code`**: previously parsed but ignored — now
actually
  copies each generated `.spv` file into the requested directory. The
  directory is created up-front (`mkdir -p` semantics) so a missing path
  produces a friendly diagnostic instead of a low-level copy errno.


Co-Authored-By: Claude Sonnet 4.6 <noreply at anthropic.com>
DeltaFile
+37-21clang/tools/clang-sycl-linker/ClangSYCLLinker.cpp
+35-0clang/test/OffloadTools/clang-sycl-linker/options.ll
+18-0clang/test/OffloadTools/clang-sycl-linker/basic.ll
+90-213 files

LLVM/project 2d1ef05bolt/include/bolt/Profile DataAggregator.h, bolt/lib/Profile DataAggregator.cpp

[𝘀𝗽𝗿] initial version

Created using spr 1.3.8-beta.1
DeltaFile
+228-148bolt/lib/Profile/DataAggregator.cpp
+35-34bolt/include/bolt/Profile/DataAggregator.h
+10-9bolt/lib/Utils/CommandLineOpts.cpp
+16-0bolt/test/perf2bolt/perf_test.test
+12-0bolt/test/perf2bolt/perf_brstack.test
+8-1bolt/test/perf2bolt/lit.local.cfg
+309-1927 files not shown
+338-20013 files

LLVM/project 061bd50bolt/include/bolt/Profile DataAggregator.h, bolt/lib/Profile DataAggregator.cpp

[𝘀𝗽𝗿] changes to main this commit is based on

Created using spr 1.3.8-beta.1

[skip ci]
DeltaFile
+81-7bolt/lib/Profile/DataAggregator.cpp
+18-20bolt/include/bolt/Profile/DataAggregator.h
+10-9bolt/lib/Utils/CommandLineOpts.cpp
+16-0bolt/test/perf2bolt/perf_test.test
+12-0bolt/test/perf2bolt/perf_brstack.test
+8-1bolt/test/perf2bolt/lit.local.cfg
+145-376 files not shown
+172-4312 files

LLVM/project d5abd9cllvm/lib/CodeGen ExpandIRInsts.cpp

[ExpandIRInsts] Avoid redundant dyn_cast after #175864 (#200475)

CreateCondBr always returns an Instruction, so no need to dyn_cast back
to an instruction after downcasting to a Value.
DeltaFile
+2-4llvm/lib/CodeGen/ExpandIRInsts.cpp
+2-41 files

LLVM/project 3aed319llvm/lib/Target/SPIRV SPIRVPrepareFunctions.cpp, llvm/test/CodeGen/SPIRV declarations-only-module.ll

[SPIR-V] Insert service function when module has only declarations (#199964)

A declarations-only module produces no `MachineFunction` at all,
`SPIRVModuleAnalysis` is freed before `AsmPrinter::doFinalization` and
`outputModuleSections` asserts in `getAnalysis<SPIRVModuleAnalysis>()`
which causes a failure
DeltaFile
+10-0llvm/test/CodeGen/SPIRV/declarations-only-module.ll
+2-2llvm/lib/Target/SPIRV/SPIRVPrepareFunctions.cpp
+12-22 files

LLVM/project 5e7c841llvm/lib/Analysis ModuleSummaryAnalysis.cpp, llvm/lib/Transforms/IPO FunctionImport.cpp

[ThinLTO][AIX] Teach ModuleSummaryAnalysis to include globals
referenced via !implicit.ref metadata as explicit reference edges in the ThinLTO
module summary via a new helper findImplicitRefEdges. Add imported
implicit ref strings (available_externally GVs) to llvm.compiler.used during thinLTO interaction with pragma comment copyright.
DeltaFile
+60-38llvm/test/LTO/PowerPC/pragma-comment-copyright-lto.ll
+67-0llvm/test/LTO/PowerPC/pragma-comment-copyright-thinlto.ll
+39-0llvm/test/Analysis/ModuleSummaryAnalysis/implicit-ref-edges.ll
+34-0llvm/lib/Transforms/IPO/FunctionImport.cpp
+18-12llvm/lib/Transforms/Utils/LowerCommentStringPass.cpp
+24-0llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
+242-502 files not shown
+256-608 files

LLVM/project 5945eaclibclc/test/math cos.cl

[libclc][test] Update math/cos.cl check lines after #199981 revert (#200353)

The libclc lit test 'math/cos.cl' (introduced by #197151 with
auto-generated FileCheck assertions) started failing on the staging
buildbot after the revert in #199981 of the AMDGPU ABI coercion change
(#185083). The revert restores the older codegen path, which produces a
slightly different IR shape for the select instruction inside the cos()
implementation:

  - the select's 'contract' fast-math flag is no longer present, and
  - the result is named %.v.i.i instead of a numbered SSA temporary.

Regenerate the AMDGCN CHECK lines with
libclc/test/update_libclc_tests.py to reflect the post-revert IR. After
this change, all 10 libclc tests in check-libclc-amdgcn-amd-amdhsa-llvm
pass.

Note: running update_libclc_tests.py also produces a purely cosmetic
diff in math/rsqrt.cl (it renames a few FileCheck capture names like

    [4 lines not shown]
DeltaFile
+5-5libclc/test/math/cos.cl
+5-51 files

LLVM/project 1aec637llvm/include/llvm/IR DerivedTypes.h Type.h, llvm/lib/IR Type.cpp

[spr] initial version

Created using spr 1.3.8-wip
DeltaFile
+4-0llvm/include/llvm/IR/DerivedTypes.h
+0-4llvm/lib/IR/Type.cpp
+1-1llvm/include/llvm/IR/Type.h
+5-53 files

LLVM/project 849e7ccllvm/lib/IR Constants.cpp

original ConstantFP check

Created using spr 1.3.8-wip
DeltaFile
+3-1llvm/lib/IR/Constants.cpp
+3-11 files

LLVM/project 3e3871dclang/lib/CodeGen CGHLSLBuiltins.cpp, clang/lib/Headers/hlsl hlsl_intrinsics.h

[HLSL] Adding matrix support to splitdouble (#200257)

This patch modifies existing splitdouble lowering to handle matrix
types.
Fix: https://github.com/llvm/llvm-project/issues/199069
DeltaFile
+496-0llvm/test/CodeGen/DirectX/splitdouble_mat.ll
+72-0clang/test/CodeGenHLSL/builtins/splitdouble_mat.hlsl
+6-5clang/lib/Sema/SemaHLSL.cpp
+9-0clang/lib/CodeGen/CGHLSLBuiltins.cpp
+3-3clang/test/SemaHLSL/BuiltIns/splitdouble-errors.hlsl
+4-1clang/lib/Headers/hlsl/hlsl_intrinsics.h
+590-92 files not shown
+592-98 files

LLVM/project 0746ad4llvm/lib/Target/PowerPC PPCISelLowering.cpp

Fix formatting
DeltaFile
+9-7llvm/lib/Target/PowerPC/PPCISelLowering.cpp
+9-71 files

LLVM/project db7d01cllvm/lib/Target/PowerPC PPCISelLowering.cpp PPCInstrInfo.td, llvm/test/CodeGen/PowerPC all-atomics.ll

[PowerPC] Add patterns for atomic load with immediates

Adds pattern to use the immediate form of and, or, and xor for
atomic loads. The matching is limited to 16-bit immediates, which
seems to be the most used ones.
DeltaFile
+612-613llvm/test/CodeGen/PowerPC/all-atomics.ll
+44-34llvm/lib/Target/PowerPC/PPCISelLowering.cpp
+19-3llvm/lib/Target/PowerPC/PPCInstrInfo.td
+1-1llvm/lib/Target/PowerPC/PPCInstr64Bit.td
+676-6514 files

LLVM/project 91f3d8dllvm/docs DeveloperPolicy.rst

[Docs] Fix build (#200467)

5047ae21b426452b3ee753574be45404d15111cb left out some whitespace that
is necessary for sphinx to work.
DeltaFile
+1-1llvm/docs/DeveloperPolicy.rst
+1-11 files

LLVM/project 7f9a6c5llvm/lib/Target/NVPTX NVPTXLowerAggrCopies.cpp, llvm/test/CodeGen/NVPTX lower-aggr-copies-shared.ll

[NVPTX][FIX] Ensure memmove are kept if not lowered to loops

Memmove lowering can fail, so we cannot unconditionally remove the
intrinsic.

Issue found by Robert Imschweiler <robert.imschweiler at amd.com>
DeltaFile
+4-2llvm/lib/Target/NVPTX/NVPTXLowerAggrCopies.cpp
+2-0llvm/test/CodeGen/NVPTX/lower-aggr-copies-shared.ll
+6-22 files

LLVM/project 2772d7ellvm/test/CodeGen/NVPTX lower-aggr-copies-shared.ll

[NVPTX][NFC] Precommit test showing memmove removal

The memmoves are removed, not lowered into loops, because of the AS
mismatch.
DeltaFile
+35-0llvm/test/CodeGen/NVPTX/lower-aggr-copies-shared.ll
+35-01 files

LLVM/project 36264ecllvm/utils/lit/lit TestingConfig.py

[lit] Remove redundant f.close() in TestingConfig (#200459)

[This
commit](https://github.com/llvm/llvm-project/commit/5536348d060066e875c9bf9e056447ece59c783d)
moved the config file `open()` into a `with` context manager but left
the trailing `f.close()` call behind. Since the context manager already
closes the file, the call is redundant. It is also outside the `with`
block, so `f` is unbound on the `except OSError` path. This removes it.
No change in behavior.

Signed-off-by: Prasoon Kumar <prasoonkumar054 at gmail.com>
DeltaFile
+0-1llvm/utils/lit/lit/TestingConfig.py
+0-11 files

LLVM/project 5463475clang/docs ReleaseNotes.rst, clang/include/clang/Basic DiagnosticCommonKinds.td

[Clang] [C++26] Expansion Statements (Part 11)
DeltaFile
+113-0clang/test/AST/ast-print-expansion-stmts.cpp
+54-0clang/test/AST/ast-dump-expansion-stmt.cpp
+7-1clang/www/cxx_status.html
+0-4clang/include/clang/Basic/DiagnosticCommonKinds.td
+2-0clang/docs/ReleaseNotes.rst
+176-55 files

LLVM/project a45da7eclang/include/clang/Basic DiagnosticSemaKinds.td LangOptions.def, clang/include/clang/Options Options.td

[Clang] [C++26] Expansion Statements (Part 10)
DeltaFile
+73-0clang/test/SemaCXX/cxx2c-expansion-stmts-limit.cpp
+18-0clang/lib/Sema/SemaExpand.cpp
+9-0clang/test/SemaCXX/cxx2c-fexpansion-statements.cpp
+4-0clang/include/clang/Basic/DiagnosticSemaKinds.td
+4-0clang/include/clang/Options/Options.td
+1-0clang/include/clang/Basic/LangOptions.def
+109-01 files not shown
+110-07 files

LLVM/project 928995dclang/include/clang/Basic DiagnosticSemaKinds.td, clang/include/clang/Sema ScopeInfo.h

[Clang] [C++26] Expansion Statements (Part 9)
DeltaFile
+135-0clang/test/SemaCXX/cxx2c-expansion-stmts-control-flow.cpp
+38-9clang/lib/Sema/SemaLookup.cpp
+28-2clang/lib/Sema/SemaStmt.cpp
+9-2clang/lib/Parse/ParseStmt.cpp
+5-1clang/include/clang/Sema/ScopeInfo.h
+6-0clang/include/clang/Basic/DiagnosticSemaKinds.td
+221-141 files not shown
+223-157 files

LLVM/project 9208a01clang/lib/AST ExprConstant.cpp, clang/lib/AST/ByteCode Compiler.cpp Compiler.h

[Clang] [C++26] Expansion Statements (Part 7)
DeltaFile
+1,506-0clang/test/SemaCXX/cxx2c-expansion-stmts.cpp
+42-0clang/lib/AST/ByteCode/Compiler.cpp
+40-0clang/lib/AST/ExprConstant.cpp
+2-1clang/lib/AST/ByteCode/Compiler.h
+3-0clang/lib/Sema/SemaDeclCXX.cpp
+1,593-15 files

LLVM/project 0fad924clang/test/CodeGenCXX cxx2c-enumerating-expansion-statements.cpp cxx2c-iterating-expansion-stmt.cpp

[Clang] [C++26] Expansion Statements (Part 8)
DeltaFile
+1,518-0clang/test/CodeGenCXX/cxx2c-enumerating-expansion-statements.cpp
+551-0clang/test/CodeGenCXX/cxx2c-iterating-expansion-stmt.cpp
+493-0clang/test/CodeGenCXX/cxx2c-destructuring-expansion-stmt.cpp
+430-0clang/test/CodeGenCXX/cxx2c-expansion-stmts-control-flow.cpp
+208-0clang/test/CodeGenCXX/cxx2c-expansion-stmts-templates.cpp
+134-0clang/test/CodeGenCXX/cxx2c-expansion-stmts-mangling.cpp
+3,334-03 files not shown
+3,375-39 files

LLVM/project a10ca8ellvm/tools/llvm-gpu-loader llvm-gpu-loader.cpp, offload/plugins-nextgen/amdgpu/src rtl.cpp

[offload] use argument pointer array in olLaunchKernel (#194333)

This PR changes olLaunchKernel to accept an array of pointers to
arguments:
```
  void *ArgPtrs[] = {&A, &B, &C};
  size_t ArgSizes[] = {sizeof(A), sizeof(B), sizeof(C)};

  olLaunchKernel(Queue, Device, Kernel, &LaunchArgs, std::size(ArgPtrs), ArgPtrs, ArgSizes);
```

The newly proposed interface is implementable by existing and
anticipated
backends, is familiar to CUDA programmers, eliminates the extraneous
construction of a contiguous arguments buffer, replacing it with
constructing
an array of pointers, sidesteps the alignment requirements, does not
require reading program image metadata where it's impractical, and
enables

    [34 lines not shown]
DeltaFile
+123-62offload/unittests/OffloadAPI/kernel/olLaunchKernel.cpp
+80-49offload/plugins-nextgen/level_zero/src/L0Kernel.cpp
+50-24offload/plugins-nextgen/amdgpu/src/rtl.cpp
+17-29llvm/tools/llvm-gpu-loader/llvm-gpu-loader.cpp
+18-21offload/unittests/OffloadAPI/queue/olWaitEvents.cpp
+0-27offload/unittests/Conformance/include/mathtest/Support.hpp
+288-21220 files not shown
+439-27926 files

LLVM/project bd5c724clang/lib/CIR/CodeGen CIRGenBuiltin.cpp, clang/test/CIR/CodeGenBuiltins builtin-sync_synchronize.c

[CIR] Implement __sync_synchronize builtin (#200423)

This showed up on a spec test, but is a very simple system-sequentially
consistent fence instruction.
DeltaFile
+16-1clang/lib/CIR/CodeGen/CIRGenBuiltin.cpp
+9-0clang/test/CIR/CodeGenBuiltins/builtin-sync_synchronize.c
+25-12 files

LLVM/project ddef3a8llvm/docs LangRef.rst

LangRef: Clarify that unnamed_addr constants can be duplicated.

It has always been the intent that it was possible to duplicate
unnamed_addr constants, and LTO takes advantage of it. The current LangRef
wording allows it, but it was not explicitly spelled out, which led Clang
developers to add an optimization that assumed that it wasn't possible.

We are considering changing the semantics of unnamed_addr, but for now,
just make the current state explicit.

Reviewers:
teresajohnson, zygoloid, rjmccall, ChuanqiXu9, efriedma-quic, ojhunt

Pull Request: https://github.com/llvm/llvm-project/pull/199251
DeltaFile
+18-6llvm/docs/LangRef.rst
+18-61 files

LLVM/project 8918dd8clang/test/Driver freebsd.c

[Clang][test] Fix space in ld path (#200012)

The driver resolves the path to the linker ("ld") to the absolute path.
Microsoft Visual Studio comes with its own instance of `ld.lld` which it
installs under

"c:\\program files\\microsoft visual studio\\2022\\community\\vc\\tools\\llvm\\x64\\bin\\ld.lld.exe"

In the developer command prompt, this path is added to PATH where the
Clang driver finds it. However, this path does not match regular
expression `"{{[^" ]*}}ld{{[^" ]*}}"` used by the MIPS test because the
path contains spaces.

Fix the test failure by matching only the the trailing component after
`ld`. Matching the prefix of the path is unique to the MIPS test, this
is not done with tests for other platforms.
DeltaFile
+4-4clang/test/Driver/freebsd.c
+4-41 files

LLVM/project 2c5dca5llvm/docs/CommandGuide llvm-objdump.rst, llvm/test/tools/llvm-objdump/X86 disassemble-functions.test

llvm-objdump: Support --disassemble= option.

This is compatible with GNU, as well as being shorter and allowing users
to specify symbol names with commas in them.

Note that this is distinct from the existing --disassemble which has
existed for a long time and disassembles all symbols. This change adds
a near-alias for the existing LLVM-specific --disassemble-symbols=.

Reviewers: jh7370, MaskRay

Pull Request: https://github.com/llvm/llvm-project/pull/196594
DeltaFile
+5-0llvm/tools/llvm-objdump/ObjdumpOpts.td
+2-0llvm/test/tools/llvm-objdump/X86/disassemble-functions.test
+2-0llvm/docs/CommandGuide/llvm-objdump.rst
+2-0llvm/tools/llvm-objdump/llvm-objdump.cpp
+11-04 files

LLVM/project 00ad4cdclang/lib/CodeGen CGOpenMPRuntime.cpp, openmp/runtime/test/taskgraph taskgraph_replayable_saved_stack_depth_taskloop.cpp taskgraph_replayable_saved_stack_depth.cpp

run clang-format/rebase

Created using spr 1.3.5
DeltaFile
+14-17clang/lib/CodeGen/CGOpenMPRuntime.cpp
+15-11openmp/runtime/test/taskgraph/taskgraph_replayable_saved_stack_depth_taskloop.cpp
+15-11openmp/runtime/test/taskgraph/taskgraph_replayable_saved_stack_depth.cpp
+15-11openmp/runtime/test/taskgraph/taskgraph_replayable_nonlexical_shared_fails_2.cpp
+13-12openmp/runtime/test/taskgraph/taskgraph_shared_stack_depth.cpp
+12-11openmp/runtime/test/taskgraph/taskgraph_firstprivate_stack_depth.cpp
+84-7329 files not shown
+244-18835 files

LLVM/project 4298059clang/lib/CodeGen CGOpenMPRuntime.cpp, openmp/runtime/test/taskgraph taskgraph_replayable_nonlexical_shared_fails_2.cpp taskgraph_replayable_saved_stack_depth_taskloop.cpp

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.5

[skip ci]
DeltaFile
+14-17clang/lib/CodeGen/CGOpenMPRuntime.cpp
+15-11openmp/runtime/test/taskgraph/taskgraph_replayable_nonlexical_shared_fails_2.cpp
+15-11openmp/runtime/test/taskgraph/taskgraph_replayable_saved_stack_depth_taskloop.cpp
+15-11openmp/runtime/test/taskgraph/taskgraph_replayable_saved_stack_depth.cpp
+13-12openmp/runtime/test/taskgraph/taskgraph_shared_stack_depth.cpp
+12-11openmp/runtime/test/taskgraph/taskgraph_firstprivate_stack_depth.cpp
+84-7329 files not shown
+244-18835 files

LLVM/project 7314636clang/lib/CodeGen CGOpenMPRuntime.cpp, openmp/runtime/test/taskgraph taskgraph_replayable_saved_stack_depth_taskloop.cpp taskgraph_replayable_nonlexical_shared_fails_2.cpp

run clang-format/rebase

Created using spr 1.3.5
DeltaFile
+14-17clang/lib/CodeGen/CGOpenMPRuntime.cpp
+15-11openmp/runtime/test/taskgraph/taskgraph_replayable_saved_stack_depth_taskloop.cpp
+15-11openmp/runtime/test/taskgraph/taskgraph_replayable_nonlexical_shared_fails_2.cpp
+15-11openmp/runtime/test/taskgraph/taskgraph_replayable_saved_stack_depth.cpp
+13-12openmp/runtime/test/taskgraph/taskgraph_shared_stack_depth.cpp
+12-11openmp/runtime/test/taskgraph/taskgraph_firstprivate_stack_depth.cpp
+84-7329 files not shown
+244-18835 files

LLVM/project e0eae88openmp/runtime/src kmp_tasking.cpp, openmp/runtime/test/taskgraph taskgraph_replayable_saved_stack_depth_taskloop.cpp taskgraph_replayable_saved_stack_depth.cpp

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.5

[skip ci]
DeltaFile
+15-11openmp/runtime/test/taskgraph/taskgraph_replayable_saved_stack_depth_taskloop.cpp
+15-11openmp/runtime/test/taskgraph/taskgraph_replayable_saved_stack_depth.cpp
+15-11openmp/runtime/test/taskgraph/taskgraph_replayable_nonlexical_shared_fails_2.cpp
+13-12openmp/runtime/test/taskgraph/taskgraph_shared_stack_depth.cpp
+12-11openmp/runtime/test/taskgraph/taskgraph_firstprivate_stack_depth.cpp
+10-13openmp/runtime/src/kmp_tasking.cpp
+80-6926 files not shown
+229-17032 files