LLVM/project 3bad592 — mlir/include/mlir/Dialect/Tosa/Transforms Passes.td, mlir/lib/Dialect/Tosa/Transforms TosaConvertIntegerTypesBitwidth.cpp

[mlir][tosa] Add integer bitwidth conversion pass (#232853)

Add tosa-convert-integer-types-bitwidth to convert i4 to i8 and/or i48
to i64. This is useful to facilitate lowering to backends that do not
support i4 and/or i48.

Add a host byte-order lit feature to gate tests with little-endian
resource data.

Assisted-by: Codex
DeltaFile
+332-0mlir/test/Dialect/Tosa/tosa-convert-integer-types-bitwidth.mlir
+229-0mlir/lib/Dialect/Tosa/Transforms/TosaConvertIntegerTypesBitwidth.cpp
+55-0mlir/test/Dialect/Tosa/tosa-convert-integer-types-bitwidth-invalid.mlir
+30-0mlir/include/mlir/Dialect/Tosa/Transforms/Passes.td
+28-0mlir/test/Dialect/Tosa/tosa-convert-integer-types-bitwidth-mappings.mlir
+22-0mlir/test/Dialect/Tosa/tosa-convert-integer-types-bitwidth-options.mlir
+696-03 files not shown
+701-49 files

LLVM/project 876883a — llvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/AArch64 store-chain-split-wide-stored-values.ll

[SLP] Freeze undef operand of shl X, 1 expanded to add X, X

add X, X reads X twice, so it does not refine shl X, 1 when X is
undef. Freeze the operand and blend the frozen lanes into the other
operand, unless X is proven not undef or undef X triggers UB.

Assisted-by: Cursor

Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/237207
DeltaFile
+139-0llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+16-15llvm/test/Transforms/SLPVectorizer/X86/entries-different-vf.ll
+18-11llvm/test/Transforms/SLPVectorizer/X86/shl-to-add-transformation5.ll
+6-2llvm/test/Transforms/SLPVectorizer/AArch64/store-chain-split-wide-stored-values.ll
+4-2llvm/test/Transforms/SLPVectorizer/X86/schedule-bundle-missing-for-expanded-binop-parent.ll
+3-2llvm/test/Transforms/SLPVectorizer/X86/splat-gather-operands.ll
+186-327 files not shown
+205-4013 files

LLVM/project 050a017 — clang/lib/CIR/Lowering/DirectToLLVM LowerToLLVMOffloadPrintf.cpp, clang/test/CIR/CodeGenHIP device-printf.hip

[CIR][AMDGPU] Lower cir.offload.printf to AMDGPU printf (#231563)

Add lowering for cir.offload.printf to the AMDGPU printf logic employed
by OGCG. Most of the functions added in
clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVMOffloadPrintf.cpp are CIR
equivalents to the functions in
llvm/lib/Transforms/Utils/AMDGPUEmitPrintf.cpp.

Assisted-by: Claude Opus 5.5

---------

Signed-off-by: Steffen Holst Larsen <sholstla at amd.com>
DeltaFile
+694-2clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVMOffloadPrintf.cpp
+299-0clang/test/CIR/CodeGenHIP/device-printf.hip
+134-0clang/test/CIR/Lowering/offload-printf-amdgpu.cir
+96-0llvm/lib/Support/AMDGPUPrintf.cpp
+11-81llvm/lib/Transforms/Utils/AMDGPUEmitPrintf.cpp
+53-0llvm/include/llvm/Support/AMDGPUPrintf.h
+1,287-833 files not shown
+1,307-919 files

LLVM/project 03cf122 — libcxx/include/__chrono exception.h, libcxx/include/__condition_variable condition_variable.h

[libc++] Add a few _LIBCPP_HIDE_FROM_ABI which have been accidentally removed in #201722 (#236733)

These annotations should have stayed, since the functions are in a spot
where explicit annotation are required.
DeltaFile
+16-12libcxx/include/__condition_variable/condition_variable.h
+10-10libcxx/include/__chrono/exception.h
+26-222 files

LLVM/project c4953a0 — libcxx/include __config, libcxx/include/__condition_variable condition_variable.h

[libc++][NFC] Move checks whether mutex/condition_variable are trivial to their headers (#236806)

The moved macros are only used as implementation details of `mutex` and
`condition_variable` aren't used widely within the library, so they can
be moved to be more local.
DeltaFile
+0-32libcxx/include/__config
+18-0libcxx/include/__mutex/mutex.h
+14-0libcxx/include/__condition_variable/condition_variable.h
+32-323 files

LLVM/project 5f3b535 — llvm Maintainers.md

[RISCV] Add myself to maintainers (#234055)
DeltaFile
+3-1llvm/Maintainers.md
+3-11 files

LLVM/project effd3a9 — llvm/test/CodeGen/AArch64 pr235665.ll, llvm/test/CodeGen/X86 pr235665.ll

[DAG] Add baseline test for #235665 (#237196)
DeltaFile
+58-0llvm/test/CodeGen/AArch64/pr235665.ll
+37-0llvm/test/CodeGen/X86/pr235665.ll
+95-02 files

LLVM/project 6dab3b6 — llvm/test/tools/llubi intr_mask_beforefirst.ll, llvm/tools/llubi/lib Interpreter.cpp

[llubi] Add support for llvm.mask.beforefirst (#237117)
DeltaFile
+41-0llvm/test/tools/llubi/intr_mask_beforefirst.ll
+19-0llvm/tools/llubi/lib/Interpreter.cpp
+60-02 files

LLVM/project 4c0d7fb — compiler-rt/lib/csan csan.cpp, compiler-rt/test/csan access-sizes.cpp

Use unaligned loads when snapshotting watched values
DeltaFile
+22-0compiler-rt/test/csan/access-sizes.cpp
+3-3compiler-rt/lib/csan/csan.cpp
+25-32 files

LLVM/project ef0f465 — compiler-rt/lib/csan csan_gpu.cpp csan.cpp, compiler-rt/test/csan volatile.cpp

Remove separate volatile entry points
DeltaFile
+49-0compiler-rt/test/csan/volatile.cpp
+22-0compiler-rt/test/csan/AMDGPU/volatile.hip
+0-4compiler-rt/lib/csan/csan_gpu.cpp
+0-4compiler-rt/lib/csan/csan.cpp
+71-84 files

LLVM/project 36f7415 — compiler-rt/lib/csan CMakeLists.txt, compiler-rt/lib/csan/offload csan_offload_preinit.cpp CMakeLists.txt

[compiler-rt] Remove dlsym interceptor and support `-shared-libsan` for CSan

Summary:
Follow the UBSan offload runtime. Offload now resolves HSA through the
global scope, so the `dlsym` interceptor is no longer needed. The real
HSA entry points are still taken from the loaded HSA library rather than
`RTLD_NEXT`, since every DSO with a static runtime exports the same
wrappers and they would otherwise chain back into each other.

Build `libclang_rt.csan.so` with the offload objects folded in. The
exported HSA wrappers report failure when HSA is absent and warn when HSA
was loaded ahead of the runtime. The preinit hook moves to a separate
`csan_offload-preinit` archive for executables.
DeltaFile
+34-98compiler-rt/lib/csan/offload/csan_offload_hsa_interceptors.cpp
+84-9compiler-rt/lib/csan/CMakeLists.txt
+35-0compiler-rt/test/csan/hsa-load-order.cpp
+22-4compiler-rt/lib/csan/offload/CMakeLists.txt
+24-0compiler-rt/test/csan/hsa-missing.cpp
+22-0compiler-rt/lib/csan/offload/csan_offload_preinit.cpp
+221-1115 files not shown
+241-11111 files

LLVM/project 046e366 — compiler-rt/cmake config-ix.cmake, compiler-rt/cmake/Modules AllSupportedArchDefs.cmake

comments
DeltaFile
+13-9compiler-rt/lib/csan/csan_gpu.cpp
+3-3compiler-rt/cmake/config-ix.cmake
+2-2compiler-rt/lib/csan/CMakeLists.txt
+1-1compiler-rt/test/csan/CMakeLists.txt
+1-1compiler-rt/lib/csan/offload/CMakeLists.txt
+1-0compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake
+21-166 files

LLVM/project bd86752 — compiler-rt/lib/csan csan_watch.h csan_report.cpp, compiler-rt/lib/csan/offload csan_offload_report.cpp csan_offload_hsa_interceptors.cpp

[compiler-rt] Add 'csan' library for the concurrency sanitizer

Summary:
Adds the runtime for the concurrency sanitizer, both CPU and GPU.
Fundamentally, this works using the following pseudocode:

```c
static u64 watchpoints[N]; // Hash-indexed, zero is empty.

// Emitted before the access, so we never trip on our own write.
void check_access(volatile void *addr, u32 size, u32 type) {
    // Every access probes. A read conflicts only with a watched write, a
    // write conflicts with either.
    if (u64 *wp = find_watchpoint(addr, size, type))
        consume(wp, this_pc()); // Hand our location to the owner.

    if (!should_sample()) // Wave-uniform, 1-in-N chance.
        return;


    [17 lines not shown]
DeltaFile
+456-0compiler-rt/lib/csan/csan_gpu.cpp
+370-0compiler-rt/lib/csan/offload/csan_offload_hsa_interceptors.cpp
+334-0compiler-rt/lib/csan/csan.cpp
+279-0compiler-rt/lib/csan/csan_report.cpp
+184-0compiler-rt/lib/csan/offload/csan_offload_report.cpp
+163-0compiler-rt/lib/csan/csan_watch.h
+1,786-044 files not shown
+2,940-250 files

LLVM/project 2df67cf — clang/docs ConcurrencySanitizer.md, clang/lib/CodeGen CodeGenFunction.cpp

[Clang] Add support for the `-fsanitize=concurrency` runtime

Summary:
Add the frontend sanitizer kind, function attributes, pass pipeline
integration, predefined macro, driver handling, and documentation for
ConcurrencySanitizer.
DeltaFile
+207-0clang/docs/ConcurrencySanitizer.md
+73-0clang/test/CodeGen/sanitize-concurrency.c
+32-8clang/lib/Driver/ToolChains/CommonArgs.cpp
+15-0clang/test/Driver/fsanitize.c
+10-4clang/lib/Driver/SanitizerArgs.cpp
+10-3clang/lib/CodeGen/CodeGenFunction.cpp
+347-1510 files not shown
+375-1616 files

LLVM/project 597ccd8 — clang/lib/Driver SanitizerArgs.cpp, clang/lib/Driver/ToolChains AMDGPU.cpp CommonArgs.cpp

Comments
DeltaFile
+48-0clang/test/Driver/fsanitize-concurrency-offload.c
+27-0clang/test/Driver/fsanitize.c
+16-7clang/lib/Driver/ToolChains/Clang.cpp
+11-4clang/lib/Driver/SanitizerArgs.cpp
+5-6clang/lib/Driver/ToolChains/CommonArgs.cpp
+3-2clang/lib/Driver/ToolChains/AMDGPU.cpp
+110-195 files not shown
+112-2111 files

LLVM/project d35442c — clang/lib/Driver/ToolChains CommonArgs.cpp, clang/test/Driver fsanitize.c fsanitize-concurrency-offload.c

[Clang] Support `-shared-libsan` for offload CSan

Summary:
Follow the UBSan handling. The shared runtime embeds the HSA
interceptors, so `csan_offload` is only linked with static runtimes and
executables pull in `csan_offload-preinit` to initialize early.
DeltaFile
+38-0clang/test/Driver/fsanitize-concurrency-offload.c
+9-4clang/lib/Driver/ToolChains/CommonArgs.cpp
+3-1clang/test/Driver/fsanitize.c
+50-53 files

LLVM/project 54817ca — clang/test/CodeGen sanitize-concurrency.c, clang/test/CodeGen/Inputs sanitize-concurrency-ignorelist.txt

ignore
DeltaFile
+29-0clang/test/CodeGen/sanitize-concurrency.c
+2-0clang/test/CodeGen/Inputs/sanitize-concurrency-ignorelist.txt
+31-02 files

LLVM/project 022e37a — clang/lib/AST/ByteCode InterpBuiltin.cpp

[clang][bytecode][NFC] Remove reflection indirection in builtins (#237106)

The additional indirection through InterpretReflectionBuiltin adds
nothing other than more complexity and a function call that returns
`false` for basically ALL cases.

Remove the call to InterpretReflectionBuiltin and just add the
reflection builtin to the existing switch. If this file gets to big, we
can still move the individual reflection functions in a different file.
DeltaFile
+4-14clang/lib/AST/ByteCode/InterpBuiltin.cpp
+4-141 files

LLVM/project 1e15ba8 — llvm/lib/Transforms/Instrumentation ConcurrencySanitizer.cpp, llvm/test/Instrumentation/ConcurrencySanitizer callbacks.ll

Keep distinguished volatile reads before a later write

A volatile write is reported as atomic, so it does not cover an earlier
plain read. A smaller write or an intervening acquire still drops the
read, matching ThreadSanitizer.
DeltaFile
+30-0llvm/test/Instrumentation/ConcurrencySanitizer/callbacks.ll
+15-6llvm/lib/Transforms/Instrumentation/ConcurrencySanitizer.cpp
+45-62 files

LLVM/project b2837fa — llvm/test/MC/AMDGPU misaligned-vgpr-tuples-err.s

[AMDGPU] Add tests for misaligned AGPR tuples in memory-op operands, NFC (#236205)

Pre-commit test: on gfx90a, misaligned AGPR tuples in DS/FLAT/global
atomics are currently rejected by the generic validateVGPRAlign scan
("invalid register class: vgpr tuples must be 64 bit aligned"), unlike
their VGPR counterparts which are rejected by the operand register class
("invalid operand for instruction"). A following change routes the AGPR
memory-op operands through the aligned operand class to match.

---------

Co-authored-by: Claude <noreply at anthropic.com>
DeltaFile
+45-0llvm/test/MC/AMDGPU/misaligned-vgpr-tuples-err.s
+45-01 files

LLVM/project 988026e — llvm/test/MC/AMDGPU gfx1251_err.s

[AMDGPU] Add tests for misaligned packed-f64 source operands, NFC (#236872)

Pre-commit test: cover the remaining source positions of the packed
64-bit VALU instructions with a misaligned VGPR tuple -- src1 of
v_pk_add_f64 and src2 of v_pk_fma_f64 / v_pk_lshl_add_u64. Like the
existing cases, these are currently rejected only by the generic
validateVGPRAlign scan, because the assembler operand predicates for
VSrc_v2f64 / VSrc_v2b64 use the plain VS_128 class.

Co-authored-by: Claude <noreply at anthropic.com>
DeltaFile
+12-0llvm/test/MC/AMDGPU/gfx1251_err.s
+12-01 files

LLVM/project 3d42332 — offload/libompaccsupport device.cpp

use submitDataSync
DeltaFile
+4-5offload/libompaccsupport/device.cpp
+4-51 files

LLVM/project 6f57e7d — offload/libompaccsupport device.cpp, offload/test/offloading kernel_launch_environment.c

[offload] Copy the kernel launch environment with a direct-write memcpy

Claude assisted with this patch.
DeltaFile
+76-0offload/test/offloading/kernel_launch_environment.c
+15-5offload/libompaccsupport/device.cpp
+91-52 files

LLVM/project 5236bce — offload/libompaccsupport device.cpp

only use sync copy on AMDGPU; improve logging
DeltaFile
+13-10offload/libompaccsupport/device.cpp
+13-101 files

LLVM/project cd6b369 — offload/plugins-nextgen/amdgpu/dynamic_hsa hsa_ext_amd.h, offload/plugins-nextgen/amdgpu/src rtl.cpp

[offload] Add direct-write memcpys to liboffload and implement them on AMDGPU (#231922)

Let olMemcpy transparently use direct H2D writes. These are unordered
with respect to currently enqueued operations, so only employ them if no
queue is given. The direct transfers are not unordered with respect to
operations that get enqueued afterwards, since they will be completed
upon completion of the corresponding olMemcpy call.

The AMDGPU implementation is a transfer of the ROCr/HIP implementation.
It more or less boils down to a std::memcpy with fences around it.

Claude assisted with this patch.
DeltaFile
+120-0offload/plugins-nextgen/amdgpu/src/rtl.cpp
+76-0offload/unittests/OffloadAPI/memory/olMemcpy.cpp
+22-0offload/plugins-nextgen/amdgpu/dynamic_hsa/hsa_ext_amd.h
+4-0offload/plugins-nextgen/common/include/PluginInterface.h
+222-04 files

LLVM/project e9ad585 — llvm/lib/Target/AMDGPU SIShrinkInstructions.cpp

[AMDGPU] Remove a redundant "if". NFC. (#237193)

This was already checked a few lines earlier.
DeltaFile
+3-6llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp
+3-61 files

LLVM/project 8f5d9c2 — offload/libompaccsupport device.cpp

only use sync copy on AMDGPU; improve logging
DeltaFile
+13-10offload/libompaccsupport/device.cpp
+13-101 files

LLVM/project 7dcb0c0 — offload/libompaccsupport device.cpp, offload/test/offloading kernel_launch_environment.c

[offload] Copy the kernel launch environment with a direct-write memcpy

Claude assisted with this patch.
DeltaFile
+76-0offload/test/offloading/kernel_launch_environment.c
+15-5offload/libompaccsupport/device.cpp
+91-52 files

LLVM/project 44c4e84 — offload/libompaccsupport device.cpp

use submitDataSync
DeltaFile
+4-5offload/libompaccsupport/device.cpp
+4-51 files

LLVM/project 6a22c4d — offload/plugins-nextgen/amdgpu/src rtl.cpp

make comment more precise
DeltaFile
+2-1offload/plugins-nextgen/amdgpu/src/rtl.cpp
+2-11 files