LLVM/project 0a57feellvm/test/CodeGen/AMDGPU dagcombine-fmul-sel.ll, llvm/test/CodeGen/AMDGPU/GlobalISel fma.bf16.ll legalize-fcanonicalize.mir

AMDGPU/GlobalISel: Legalize BF16 for FP math opcodes (#214059)

Make the BF16 form of G_FCONSTANT legal.

Widen BF16 G_FADD, G_FMUL, G_FMA, and G_FCANONICALIZE to F32.
DeltaFile
+1,459-966llvm/test/CodeGen/AMDGPU/dagcombine-fmul-sel.ll
+1,256-66llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fma.mir
+1,224-57llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fadd.mir
+969-113llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fmul.mir
+523-47llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fcanonicalize.mir
+555-0llvm/test/CodeGen/AMDGPU/GlobalISel/fma.bf16.ll
+5,986-1,2496 files not shown
+7,617-1,52712 files

LLVM/project e2336e6llvm/test/Transforms/LoopVectorize vplan-based-stride-mv-btc.ll

Update CHECKs after merge
DeltaFile
+16-16llvm/test/Transforms/LoopVectorize/vplan-based-stride-mv-btc.ll
+16-161 files

LLVM/project 21386d3clang/docs ClangFormatStyleOptions.rst ClangFormatStyleOptions.md, libc/test/shared CMakeLists.txt

Merge remote-tracking branch 'origin/main' into stride-mv-vscale-test
DeltaFile
+8,221-0clang/docs/ClangFormatStyleOptions.md
+0-8,043clang/docs/ClangFormatStyleOptions.rst
+2,087-1,967llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+2,999-0llvm/test/Analysis/CostModel/AArch64/load_store.ll
+904-909llvm/test/Analysis/CostModel/RISCV/rvv-extractelement.ll
+820-820libc/test/shared/CMakeLists.txt
+15,031-11,7391,424 files not shown
+56,641-38,7981,430 files

LLVM/project e16ea17llvm/test/Transforms/LoopVectorize vplan-based-stride-mv-btc.ll

Add `vscale_range` and force tail-folded RUN lines
DeltaFile
+1,104-210llvm/test/Transforms/LoopVectorize/vplan-based-stride-mv-btc.ll
+1,104-2101 files

LLVM/project 371f042clang-tools-extra/docs/clang-tidy Contributing.rst

[clang-tidy][docs] Note MISRA/AUTOSAR checks are not accepted (#214661)

Checks that directly reference MISRA/AUTOSAR are not accepted for
legal/license reasons. Generic overlapping checks without such links
remain fine.

Fixes #160940
DeltaFile
+6-0clang-tools-extra/docs/clang-tidy/Contributing.rst
+6-01 files

LLVM/project 26f2348offload/plugins-nextgen/amdgpu/src rtl.cpp, offload/plugins-nextgen/common/include PluginInterface.h

[offload] Use pinned memory for KLE

Reduce kernel launch latency by using the fast path "pinned host memory
-> device memory" for submitting the kernel launch environment to the
device.

Claude assisted with this patch.
DeltaFile
+71-0offload/test/offloading/kernel_launch_environment.c
+47-2offload/plugins-nextgen/common/src/PluginInterface.cpp
+14-0offload/plugins-nextgen/common/include/PluginInterface.h
+2-0offload/plugins-nextgen/amdgpu/src/rtl.cpp
+134-24 files

LLVM/project 9ecc43doffload/plugins-nextgen/amdgpu/src rtl.cpp, offload/plugins-nextgen/common/include MemoryManager.h PluginInterface.h

[offload] Pool host and shared allocations

Route them through a memory manager, like the device allocations. Also,
move the registration as pinned memory to the plugin site since only the
plugin knows if the corresponding host/shared memory is pinned.
Improves performance of affected allocations by ballpark 1,000x.
DeltaFile
+29-40offload/plugins-nextgen/common/src/PluginInterface.cpp
+14-6offload/plugins-nextgen/common/include/MemoryManager.h
+19-1offload/plugins-nextgen/common/include/PluginInterface.h
+12-0offload/plugins-nextgen/amdgpu/src/rtl.cpp
+6-5openmp/docs/design/Runtimes.rst
+80-525 files

LLVM/project a014f56offload/include/Shared APITypes.h, offload/plugins-nextgen/common/include PluginInterface.h

[offload] Thread allocation kind through async info

Claude assisted with this patch.
DeltaFile
+37-7offload/plugins-nextgen/common/src/PluginInterface.cpp
+5-2offload/include/Shared/APITypes.h
+2-2offload/plugins-nextgen/common/include/PluginInterface.h
+44-113 files

LLVM/project d2098e6offload/plugins-nextgen/amdgpu/src rtl.cpp, offload/plugins-nextgen/common/include MemoryManager.h

[offload] Respect alignment in memory manager (#214753)

Also fix alignment comparison in AMDGPU rtl.cpp.
DeltaFile
+7-2offload/plugins-nextgen/common/include/MemoryManager.h
+1-1offload/plugins-nextgen/amdgpu/src/rtl.cpp
+8-32 files

LLVM/project 8a9c075llvm/lib/Target/AMDGPU GCNSchedStrategy.cpp, llvm/test/CodeGen/AMDGPU rem_i128.ll machine-scheduler-sink-trivial-remats.mir

[AMDGPU][CodeGen] Allow remat with multiple users in same region (#214725)

This relaxes one of the constraints on rematerialization candidates in
the scheduler's `PreRARematStage`. The current implementation only
allows rematerializing a register if it has a single user. This allows
it when a register has multiple users in the same region.

In such cases the register is rematerialized once just before the first
user in program order. The cost model for assessing rematerialization
opportunities stays unchanged since a register is only ever
rematerialized to a single location.
DeltaFile
+599-599llvm/test/CodeGen/AMDGPU/sched_mfma_rewrite_copies.mir
+295-298llvm/test/CodeGen/AMDGPU/div_v2i128.ll
+98-98llvm/test/CodeGen/AMDGPU/div_i128.ll
+17-12llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp
+14-14llvm/test/CodeGen/AMDGPU/machine-scheduler-sink-trivial-remats.mir
+13-13llvm/test/CodeGen/AMDGPU/rem_i128.ll
+1,036-1,0346 files

LLVM/project 879a2e6llvm/test/CodeGen/X86 vector-popcnt-512-ult-ugt.ll vector-popcnt-256-ult-ugt.ll

[X86] Always use 128-bit V_SET0/AVX512_128_SET0 patterns, along with SUBREG_TO_REG for extension to 256/512-bit vectors (#212950)

We often end up with duplicate "all zero" registers as they are
represented by different psuedos for 128/256/512-bit types. Whilst they
are nearly always free/cheap to rematerialize, its a waste of
instructions and registers to needlessly do this.

This patch only uses 128-bit SET0 calls and makes use of AVX's implicit
zeroing of the upper elements (via SUBREG_TO_REG). AVX512F-only targets
still use 512-bit VPXORDZrr instructions if they need to zero
xmm16-xmm31, otherwise they fallback to VXORPSrr like regular AVX.
DeltaFile
+265-273llvm/test/CodeGen/X86/bit-manip-i512.ll
+256-252llvm/test/CodeGen/X86/vector-interleaved-load-i16-stride-4.ll
+215-222llvm/test/CodeGen/X86/zero_extend_vector_inreg_of_broadcast_from_memory.ll
+202-202llvm/test/CodeGen/X86/vector-lzcnt-256.ll
+180-180llvm/test/CodeGen/X86/vector-popcnt-512-ult-ugt.ll
+180-180llvm/test/CodeGen/X86/vector-popcnt-256-ult-ugt.ll
+1,298-1,30994 files not shown
+2,552-2,553100 files

LLVM/project df1543aoffload/plugins-nextgen/amdgpu/src rtl.cpp, offload/plugins-nextgen/common/include PluginInterface.h

[offload] Use pinned memory for KLE

Reduce kernel launch latency by using the fast path "pinned host memory
-> device memory" for submitting the kernel launch environment to the
device.

Claude assisted with this patch.
DeltaFile
+71-0offload/test/offloading/kernel_launch_environment.c
+47-2offload/plugins-nextgen/common/src/PluginInterface.cpp
+14-0offload/plugins-nextgen/common/include/PluginInterface.h
+2-0offload/plugins-nextgen/amdgpu/src/rtl.cpp
+134-24 files

LLVM/project 80b25ceoffload/include/Shared APITypes.h, offload/plugins-nextgen/common/include PluginInterface.h

[offload] Thread allocation kind through async info

Claude assisted with this patch.
DeltaFile
+37-7offload/plugins-nextgen/common/src/PluginInterface.cpp
+5-2offload/include/Shared/APITypes.h
+2-2offload/plugins-nextgen/common/include/PluginInterface.h
+44-113 files

LLVM/project 1680d45offload/plugins-nextgen/amdgpu/src rtl.cpp, offload/plugins-nextgen/common/include MemoryManager.h PluginInterface.h

[offload] Pool host and shared allocations

Route them through a memory manager, like the device allocations. Also,
move the registration as pinned memory to the plugin site since only the
plugin knows if the corresponding host/shared memory is pinned.
Improves performance of affected allocations by ballpark 1,000x.
DeltaFile
+29-40offload/plugins-nextgen/common/src/PluginInterface.cpp
+14-6offload/plugins-nextgen/common/include/MemoryManager.h
+19-1offload/plugins-nextgen/common/include/PluginInterface.h
+12-0offload/plugins-nextgen/amdgpu/src/rtl.cpp
+6-5openmp/docs/design/Runtimes.rst
+80-525 files

LLVM/project fe78ec1offload/plugins-nextgen/amdgpu/src rtl.cpp, offload/plugins-nextgen/common/include MemoryManager.h

[offload] Respect alignment in memory manager

Also fix alignment comparison in AMDGPU rtl.cpp.
DeltaFile
+7-2offload/plugins-nextgen/common/include/MemoryManager.h
+1-1offload/plugins-nextgen/amdgpu/src/rtl.cpp
+8-32 files

LLVM/project 0a18f5aoffload/plugins-nextgen/common/src PluginInterface.cpp

[offload] Do not pool memory while allocation traces are requested (#214752)

Would otherwise hide use-after-free because memory stays valid if it's
in the pool.
DeltaFile
+4-2offload/plugins-nextgen/common/src/PluginInterface.cpp
+4-21 files

LLVM/project bf5e5b8mlir/test/Dialect/MemRef elide-reinterpret-cast-load.mlir elide-reinterpret-cast-copy.mlir

[MemRef] Split elide-reinterpret-cast tests (#213026)

Narrow the scope of test files by separating them by the patterns they
exercise, for readability.
DeltaFile
+0-1,041mlir/test/Dialect/MemRef/elide-reinterpret-cast.mlir
+711-0mlir/test/Dialect/MemRef/elide-reinterpret-cast-copy.mlir
+334-0mlir/test/Dialect/MemRef/elide-reinterpret-cast-load.mlir
+1,045-1,0413 files

LLVM/project 18cb8f1llvm/test/CodeGen/AMDGPU lds-limit-diagnostics-gfx13.ll

undef -> poison
DeltaFile
+1-1llvm/test/CodeGen/AMDGPU/lds-limit-diagnostics-gfx13.ll
+1-11 files

LLVM/project 84c6723lldb/test/API/api/multiple-debuggers multi-process-driver.cpp, lldb/test/API/api/multiple-targets main.cpp

[lldb][NFC] Don't use LLDB.h in multiple-targets/debuggers tests (#210981)

LLDB.h is a header that includes (nearly) every SB API header
indirectly. This patch replaces the use of this header in some .cpp
tests by instead directly including the needed headers. This is mainly
to reduce compilation times of these files as they are recompiled on
each test run.
DeltaFile
+10-2lldb/test/API/api/multiple-debuggers/multi-process-driver.cpp
+1-1lldb/test/API/api/multiple-targets/main.cpp
+11-32 files

LLVM/project 6a3f956offload/plugins-nextgen/amdgpu/src rtl.cpp, offload/plugins-nextgen/common/include PluginInterface.h

[offload] Use pinned memory for KLE

Reduce kernel launch latency by using the fast path "pinned host memory
-> device memory" for submitting the kernel launch environment to the
device.

Claude assisted with this patch.
DeltaFile
+71-0offload/test/offloading/kernel_launch_environment.c
+47-2offload/plugins-nextgen/common/src/PluginInterface.cpp
+14-0offload/plugins-nextgen/common/include/PluginInterface.h
+2-0offload/plugins-nextgen/amdgpu/src/rtl.cpp
+134-24 files

LLVM/project cb8a864offload/include/Shared APITypes.h, offload/plugins-nextgen/common/include PluginInterface.h

[offload] Thread allocation kind through async info

Claude assisted with this patch.
DeltaFile
+37-7offload/plugins-nextgen/common/src/PluginInterface.cpp
+5-2offload/include/Shared/APITypes.h
+2-2offload/plugins-nextgen/common/include/PluginInterface.h
+44-113 files

LLVM/project 6abd271offload/plugins-nextgen/amdgpu/src rtl.cpp, offload/plugins-nextgen/common/include MemoryManager.h

[offload] Respect alignment in memory manager

Also fix alignment comparison in AMDGPU rtl.cpp.
DeltaFile
+7-2offload/plugins-nextgen/common/include/MemoryManager.h
+1-1offload/plugins-nextgen/amdgpu/src/rtl.cpp
+8-32 files

LLVM/project d524baboffload/plugins-nextgen/amdgpu/src rtl.cpp, offload/plugins-nextgen/common/include MemoryManager.h PluginInterface.h

[offload] Pool host and shared allocations

Route them through a memory manager, like the device allocations. Also,
move the registration as pinned memory to the plugin site since only the
plugin knows if the corresponding host/shared memory is pinned.
Improves performance of affected allocations by ballpark 1,000x.
DeltaFile
+29-40offload/plugins-nextgen/common/src/PluginInterface.cpp
+14-6offload/plugins-nextgen/common/include/MemoryManager.h
+19-1offload/plugins-nextgen/common/include/PluginInterface.h
+12-0offload/plugins-nextgen/amdgpu/src/rtl.cpp
+6-5openmp/docs/design/Runtimes.rst
+80-525 files

LLVM/project f20a754offload/plugins-nextgen/common/src PluginInterface.cpp

reduce comment
DeltaFile
+3-5offload/plugins-nextgen/common/src/PluginInterface.cpp
+3-51 files

LLVM/project 2e3553dllvm/test/CodeGen/X86 masked-urem.ll div-rem-pair-recomposition-signed.ll

[X86] Lower vector integer division and remainder through float division (#205263)

x86 has no vector integer divide instruction so a vector `udiv` by a
variable divisor scalarizes into N scalar divides. Since there is no
vector idiv to fall back on, lowering through vector float division is
better.

This is implemented as a new DAG combine (combineIntDivRem in
X86ISelLowering.cpp) that runs before legalization and rewrites the
vector divide before it scalarizes. Handles udiv, sdiv, urem and srem.

- <=32-bit elements (i8/i16/i32): a single float divide (f32 for
<=16-bit, f64 for 32-bit) recovers the exact quotient because the
operands fit the mantissa
(https://lemire.me/blog/2017/11/16/fast-exact-integer-divisions-using-floating-point-operations/).
  Enabled from SSE2.

Part of #201319.
DeltaFile
+702-277llvm/test/CodeGen/X86/vector-idiv-sdiv-128.ll
+216-688llvm/test/CodeGen/X86/masked-sdiv.ll
+163-669llvm/test/CodeGen/X86/masked-srem.ll
+791-0llvm/test/CodeGen/X86/vector-idiv-udiv-128.ll
+162-412llvm/test/CodeGen/X86/div-rem-pair-recomposition-signed.ll
+116-432llvm/test/CodeGen/X86/masked-urem.ll
+2,150-2,47818 files not shown
+3,520-4,06224 files

LLVM/project ac646b5mlir/lib/Dialect/Vector/IR VectorOps.cpp, mlir/test/Dialect/Vector invalid.mlir

[mlir][vector] Verify non-unit strides on `masked/expand/compress` ops  (#210952)

Closes the stride-verification gap left open by #204611 and #205869.

`vector.maskedload`/`maskedstore`/`expandload`/`compressstore` lower to
LLVM masked intrinsics that read/write N *consecutive* elements from a
single pointer (see [LangRef](https://llvm.org/docs/LangRef.htm)), but
none of them verified the memref's minor-dim stride, so `strided<[2]>`
verified successfully and silently miscompiled.

This PR rejects statically-known non-unit and dynamic strides.

**Stacked on #211004**

---------

Signed-off-by: Federico Bruzzone <federico.bruzzone.i at gmail.com>
DeltaFile
+107-0mlir/test/Dialect/Vector/invalid.mlir
+24-0mlir/lib/Dialect/Vector/IR/VectorOps.cpp
+131-02 files

LLVM/project b5bd0cdoffload/plugins-nextgen/amdgpu/src rtl.cpp, offload/plugins-nextgen/common/include PluginInterface.h

[offload] Use pinned memory for KLE

Reduce kernel launch latency by using the fast path "pinned host memory
-> device memory" for submitting the kernel launch environment to the
device.

Claude assisted with this patch.
DeltaFile
+71-0offload/test/offloading/kernel_launch_environment.c
+47-2offload/plugins-nextgen/common/src/PluginInterface.cpp
+14-0offload/plugins-nextgen/common/include/PluginInterface.h
+2-0offload/plugins-nextgen/amdgpu/src/rtl.cpp
+134-24 files

LLVM/project 458cb2dclang/lib/Headers opencl-c-base.h

[Clang][OpenCL] Make FP_ILOGBNAN configurable (#214535)

The OpenCL C spec allows the implementation to choose the value of the
`FP_ILOGBNAN` macro between `INT_MIN` and `INT_MAX`. This patch makes
the
value configurable by introducing a new macro
`__OPENCL_FP_ILOGBNAN_MIN`.
The default value is unchanged and is set to `INT_MAX`. If the new macro
is defined, the value of `FP_ILOGBNAN` will be set to `INT_MIN`.

This change makes the OpenCL C headers similar to the LLVM `libc`, that
also has the `FP_ILOGBNAN` macro configurable.
DeltaFile
+9-0clang/lib/Headers/opencl-c-base.h
+9-01 files

LLVM/project e61498b.github/workflows release-documentation.yml

Fix and debug
DeltaFile
+1-0.github/workflows/release-documentation.yml
+1-01 files

LLVM/project 807c9e8.github/workflows release-documentation.yml

Fix
DeltaFile
+1-2.github/workflows/release-documentation.yml
+1-21 files