LLVM/project 089b3ff — llvm/lib/Transforms/AggressiveInstCombine AggressiveInstCombine.cpp, llvm/test/Transforms/AggressiveInstCombine umulh_carry.ll umulh_carry4.ll

[AggressiveInstCombine] Extend MulHigh fold for `or disjoint` (#228897)

`foldMulHigh` is excecuted after another fold, which folds `add` into
`or disjoint`. This can make `foldMulHigh` miss chances to fold.

Replacing `m_Add` into `m_AddLike` extends `foldMulHigh` so it can fold
more cases in `-O3` mode.

Notice that there are more cases in `foldMulHigh`. They may need to
replace `m_Add` too.

Fixes #221257.
DeltaFile
+134-1llvm/test/Transforms/AggressiveInstCombine/umulh_carry4.ll
+27-0llvm/test/Transforms/AggressiveInstCombine/umulh_carry.ll
+9-9llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp
+170-103 files

LLVM/project 0ee7a19 — llvm/include/llvm/IR RuntimeLibcallsImpl.td RuntimeLibcalls.td, llvm/test/Transforms/Util/DeclareRuntimeLibcalls codegen-opt-flags.ll

RuntimeLibcalls: Add alignment to aligned memory helper arguments (#244724)

Add the alignment annotations to target specific memcpy-like functions.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+27-17llvm/include/llvm/IR/RuntimeLibcalls.td
+12-5llvm/test/Transforms/Util/DeclareRuntimeLibcalls/codegen-opt-flags.ll
+4-0llvm/include/llvm/IR/RuntimeLibcallsImpl.td
+43-223 files

LLVM/project 7b3e771 — llvm/utils/gn/secondary/libcxx/src BUILD.gn

[gn] port afdd331c00ec (#246020)
DeltaFile
+1-0llvm/utils/gn/secondary/libcxx/src/BUILD.gn
+1-01 files

LLVM/project 23efd53 — clang/include/clang/CIR/Dialect/IR CIROps.td, clang/test/CIR/Transforms complex-fenv-effects.cir

[CIR] Give complex FP add/sub the fenv memory effects

cir.complex.fadd and cir.complex.fsub were Pure even with a constrained
fenv attribute, so they could be speculated or erased like unconstrained
ops. Derive them from CIR_FenvOp, as the other fenv ops are: constrained
ops read and write the FP environment and are only conditionally
speculatable, unconstrained ops stay effect-free.

Assisted-by: Claude Code (Opus 5.5).
DeltaFile
+26-0clang/test/CIR/Transforms/complex-fenv-effects.cir
+3-4clang/include/clang/CIR/Dialect/IR/CIROps.td
+29-42 files

LLVM/project bb3c807 — clang/lib/CIR/Dialect/IR CIRDialect.cpp, clang/test/CIR/CodeGen vector-int128-fold.cpp

[CIR] Handle integers wider than 64 bits in the vector constant folders

`cir::IntAttr::getUInt()` and `getSInt()` assert when the value needs
more than 64 bits. The folders of `cir.vec.cmp`, `cir.vec.ternary` and
`cir.vec.shuffle.dynamic` read constant elements through them, so they
asserted on a vector of `__int128` with such an element. C++ reaches
all three at -O0. The verifier of `cir.vec.shuffle` read its indices the
same way and asserted while parsing an index wider than 64 bits.

They now work on the `APInt` values:

- `cir.vec.cmp` compares the elements at their full width.
- `cir.vec.ternary` tests whether the condition element is zero.
- `cir.vec.shuffle.dynamic` masks the index before narrowing it.
- `cir.vec.shuffle` recognizes the -1 index by all of its bits being
  set and range-checks the other indices without narrowing them.

Folds of integers up to 64 bits are unchanged.

Assisted-by: Claude Code (Fable 5.2).
DeltaFile
+129-0clang/test/CIR/Transforms/vector-cmp-fold.cir
+77-0clang/test/CIR/CodeGen/vector-int128-fold.cpp
+26-46clang/lib/CIR/Dialect/IR/CIRDialect.cpp
+34-0clang/test/CIR/IR/invalid-vector.cir
+27-0clang/test/CIR/Transforms/vector-shuffle-dynamic-fold.cir
+21-0clang/test/CIR/Transforms/vector-shuffle-fold.cir
+314-461 files not shown
+329-487 files

LLVM/project 757ffda — clang/lib/CIR/Lowering/DirectToLLVM LowerToLLVM.cpp, clang/test/CIR/CodeGen vector-shuffle-undef-index.cpp

[CIR] Lower constant vectors with undef, poison and zero elements

The `cir::ConstVectorAttr` verifier only checks the element types, so
`#cir.undef`, `#cir.poison` and `#cir.zero` are valid elements, and
`VecShuffleOp::fold` creates an undef element for a -1 index. The
lowering to the LLVM dialect handled int, float and bool elements and
hit an `llvm_unreachable` on anything else, so a
`__builtin_shufflevector` of two constant vectors with a -1 index
crashed `-fclangir -emit-llvm`.

A zero element is now a zero in the dense constant. An undef or poison
element also takes a zero there and is then replaced by an
`llvm.insertelement` of `llvm.mlir.undef` or `llvm.mlir.poison`.
`llvm.mlir.constant` cannot hold such an element itself: a dense
elements attribute holds only literals, and the translation to LLVM IR
accepts a per-element `LLVM::UndefAttr` or `LLVM::ZeroAttr` only in
struct and array constants and no `LLVM::PoisonAttr` at all. The
IRBuilder folds the insertions when the module is translated, in
function bodies and in global initializers, so the LLVM IR holds one

    [4 lines not shown]
DeltaFile
+140-0clang/test/CIR/Lowering/const-vector-undef-poison-zero.cir
+39-0clang/test/CIR/CodeGen/vector-shuffle-undef-index.cpp
+30-5clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+209-53 files

LLVM/project e032c85 — clang/include/clang/CIR/Dialect/IR CIROps.td

[CIR][NFC] Add a CIR_FenvOp base class (#245984)

Each operation with the fenv traits repeated them and the optional
`fenv` attribute in its own definition. This adds a `CIR_FenvOp` base
class that carries both, and the operations prepend their own arguments
to it. `CIR_FPBinaryOp` derives from `CIR_BinaryOp`, so it keeps the
traits and now appends its attributes to the `CIR_BinaryOp` arguments
instead of rebuilding the list. `cir.complex.fadd` and
`cir.complex.fsub` take the attribute without the traits and are not
changed here. The generated operation classes are unchanged.

Assisted-by: Claude Code (Fable 5.2).
DeltaFile
+40-50clang/include/clang/CIR/Dialect/IR/CIROps.td
+40-501 files

LLVM/project a14349f — clang/include/clang/CIR/Dialect/IR CIRAttrs.td, clang/lib/CIR/CodeGen CIRGenModule.cpp

[CIR] Mark LoweringPrepare init functions strictfp

Classic codegen's StartFunction makes a function that has no
FunctionDecl `strictfp` when the TU-wide default FP environment is
constrained: FP exceptions are not ignored or the rounding mode is
dynamic. That covers `_GLOBAL__sub_I_*`, `_GLOBAL__I_*`, the C++20
module initializer, `__cxx_global_var_init*`, `__cxx_global_array_dtor*`
and `__tls_init`. ClangIR marked only `__cxx_global_var_init*`, through
the `strictfp` attribute of its `cir.global`, so the other functions
and the calls in them were not `strictfp`.

LoweringPrepare creates these functions after CIRGen, so it reads the
TU-wide default from `#cir.lowering_options`. `no_trapping_math` already
records whether FP exceptions are ignored, and the new `rounding_math`
field mirrors `LangOptions::RoundingMath`. It is omitted when false, so
the module attribute prints as before without `-frounding-math`.
`buildRuntimeFunction` adds `strictfp` together with the other TU-wide
default function attributes. That needs no initializer to take the
attribute from, so it also covers a module initializer with nothing to

    [3 lines not shown]
DeltaFile
+92-0clang/test/CIR/CodeGen/global-init-fn-strictfp.cpp
+38-0clang/test/CIR/Transforms/lowering-prepare-strictfp.cir
+20-0clang/test/CIR/CodeGen/cxx20-module-initializer-strictfp.cppm
+14-1clang/lib/CIR/Dialect/Transforms/LoweringPrepare.cpp
+11-2clang/include/clang/CIR/Dialect/IR/CIRAttrs.td
+2-1clang/lib/CIR/CodeGen/CIRGenModule.cpp
+177-46 files

LLVM/project d037dca — clang/lib/CIR/Dialect/IR CIRDialect.cpp, clang/test/CIR/CodeGen complex.cpp

[CIR] Fix crashes in the complex constant folders

The folders of `cir.complex.real`, `cir.complex.imag` and
`cir.complex.create` asserted on constants that the `cir.const` verifier
accepts.

`cir.complex.real` and `cir.complex.imag` cast a constant operand to
`#cir.const_complex`. A complex constant can also be `#cir.zero`,
`#cir.undef` or `#cir.poison`. CIRGen emits `#cir.zero` for a
value-initialized complex, so clang crashed on `__real__ CI()`. A part
of `#cir.zero` now folds to the zero of the element type. The folders
leave an undef or poison operand alone.

`cir.complex.create` built a `#cir.const_complex` from any two constant
parts. The attribute holds int or float literals only, so its verifier
failed on a part that is undef, poison or a global view. The folder now
leaves such a create alone.

Assisted-by: Claude Code (Fable 5.2).
DeltaFile
+63-0clang/test/CIR/Transforms/complex-real-fold.cir
+63-0clang/test/CIR/Transforms/complex-imag-fold.cir
+48-0clang/test/CIR/Transforms/complex-create-fold.cir
+44-0clang/test/CIR/CodeGen/complex.cpp
+26-8clang/lib/CIR/Dialect/IR/CIRDialect.cpp
+244-85 files

LLVM/project 926515d — lldb/source/Plugins/TypeSystem/Clike ByteSizedType.h, lldb/unittests/TypeSystem/Clike CMakeLists.txt ByteSizedTypeTest.cpp

[lldb][Clike] Add ByteSizedType (#243814)

ByteSizedType is a mixin that adds a byte size to a Type. Type itself
only declares GetByteSize (returning "unknown" by default) because many
types derive their size from another type (arrays, typedefs, ...) or
from the target (pointers) and therefore don't need to store one. Types
with a size of their own, such as builtins, records and enums, will mix
this in.

An unknown size is stored as a UINT64_MAX sentinel instead of using
std::optional, which would need extra space for its flag.

assisted-by: claude
DeltaFile
+47-0lldb/source/Plugins/TypeSystem/Clike/ByteSizedType.h
+21-0lldb/unittests/TypeSystem/Clike/ByteSizedTypeTest.cpp
+1-0lldb/unittests/TypeSystem/Clike/CMakeLists.txt
+69-03 files

LLVM/project 9865352 — lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime AppleObjCRuntimeV2.cpp

[lldb][Clike] Don't require TypeSystemClang for AppleObjCRuntimeV2 (#238961)

This makes this code compatible with TypeSystemClike. This is also code
that has no error handling aside from silently doing nothing, so I added
logging in case we fail to grab the TypeSystem.
DeltaFile
+25-14lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
+25-141 files

LLVM/project ba88526 — lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime AppleObjCTrampolineHandler.cpp

[lldb][Clike] Don't use TypeSystemClang in AppleObjCTrampolineHandler (#238965)

This makes this code compatible with TypeSystemClike.
DeltaFile
+11-3lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp
+11-31 files

LLVM/project 36eba56 — lldb/test/API/lang/cpp/builtin_types/float Makefile main.cpp

[lldb][test] Add a new test for float types (Reland) (#238992)

This is a new modern test for float types that replaces the test logic
from `API/types` test that is about to be deleted.

This is #208451 but updated to also handle PDB.

See also #208402

assisted-by: claude
DeltaFile
+46-0lldb/test/API/lang/cpp/builtin_types/float/TestFloatTypes.py
+19-0lldb/test/API/lang/cpp/builtin_types/float/main.cpp
+3-0lldb/test/API/lang/cpp/builtin_types/float/Makefile
+68-03 files

LLVM/project 6fe233d — lldb/source/Plugins/LanguageRuntime/CPlusPlus ItaniumABIRuntime.cpp

[lldb][Clike] Don't compare types using TSClang in ItaniumABIRuntime (#238958)

This won't work with TypeSystemClike. CompilerType has a generic API
that does the same without adding a dependency on TypeSystemClang.
DeltaFile
+1-1lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABIRuntime.cpp
+1-11 files

LLVM/project fa34deb — lldb/source/Plugins/LanguageRuntime/ObjC/GNUstepObjCRuntime GNUstepObjCRuntime.cpp

[lldb][Clike] Remove TypeSystemClang include from GNUstepObjCRuntime (#238968)
DeltaFile
+0-2lldb/source/Plugins/LanguageRuntime/ObjC/GNUstepObjCRuntime/GNUstepObjCRuntime.cpp
+0-21 files

LLVM/project e6f9131 — llvm/lib/Analysis ConstantFolding.cpp, llvm/lib/Transforms/InstCombine InstructionCombining.cpp

[ConstantFolding] Add constant folding for strlen (#244183)

This patch adds constant folding of `strlen` on a string literal. These
are not uncommon, for example coming out of code like
```
std::string s = foo();
if (s == "bar") { ...
```
This patch (plus a follow-up one which exposes libfunc folding to inline
costs) helped resolve a 3% regression in a SPEC2026 benchmark coming out
of disable-pre-lto-vec changes.
DeltaFile
+46-0llvm/test/Transforms/InstSimplify/const-fold-strlen.ll
+17-0llvm/lib/Analysis/ConstantFolding.cpp
+6-4llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
+1-1llvm/test/Transforms/PhaseOrdering/AArch64/constraint-elimination-placement.ll
+70-54 files

LLVM/project a055e9c — llvm/utils/gn/secondary/llvm/include/llvm/TargetParser BUILD.gn, llvm/utils/gn/secondary/llvm/lib/TargetParser BUILD.gn

[gn] port ecac0ccc9ef8 (#246003)
DeltaFile
+8-0llvm/utils/gn/secondary/llvm/include/llvm/TargetParser/BUILD.gn
+1-0llvm/utils/gn/secondary/llvm/unittests/TargetParser/BUILD.gn
+1-0llvm/utils/gn/secondary/llvm/lib/TargetParser/BUILD.gn
+10-03 files

LLVM/project 3954214 — llvm/utils/gn/secondary/llvm/lib/Target/AArch64 BUILD.gn

[gn] port 25028243480e (#246002)
DeltaFile
+1-0llvm/utils/gn/secondary/llvm/lib/Target/AArch64/BUILD.gn
+1-01 files

LLVM/project a2c8783 — llvm/lib/CodeGen/SelectionDAG TargetLowering.cpp SelectionDAG.cpp, llvm/test/CodeGen/PowerPC nofpclass.ll fneg.ll

[PowerPC] fix `ppc_fp128` `FABS` miscompile (#209286)

fixes https://github.com/llvm/llvm-project/issues/209034

On little-endian powerpc the bit position of the sign bit is bit 63, not
bit 127. However, `APFloat` reports that the sign bit is the MSB. As I
understand it, it is actually right about that because in the `APFloat`
internal representation the sign bit is in fact in the MSB, but using
this information for runtime values is incorrect for LE.

All three fix locations are required to get the correct output for this
reproducer.

I'm assuming there are more ways that this can fail, so a more
structural solution would be neat. I don't know how to do that though,
so in the meantime we can accumulate test cases and plug the gaps.
DeltaFile
+101-0llvm/test/CodeGen/PowerPC/fp128-fabs.ll
+31-6llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+28-1llvm/test/CodeGen/PowerPC/copysignl.ll
+13-1llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+5-5llvm/test/CodeGen/PowerPC/fneg.ll
+4-2llvm/test/CodeGen/PowerPC/nofpclass.ll
+182-152 files not shown
+188-158 files

LLVM/project afdd331 — libcxx/src CMakeLists.txt, libcxx/src/pstl statpart.cpp std_thread_sched.h

[libc++][pstl] Add a task scheduler based on std::thread (#237313)

This PR adds a simple task scheduler for PSTL.
With that, `std::execution::par` makes algorithms run in parallel on
non-Apple platforms (Apple platforms keep using `libdispatch`).

The implementation uses only the threading facilities provided by the
C++ Standard and contains no platform-specific code.
This code is intended to be a replaceable implementation detail of
libc++, which is not exported and can only be accessed via the
`std::__pstl::__statpart::__apply()` proxy.
The design prioritises correctness and simplicity over peak performance,
while still performing reasonably for typical usage (comparable to
`dispatch_apply_f()` from GCD).
DeltaFile
+317-0libcxx/src/pstl/std_thread_sched.h
+19-3libcxx/src/pstl/statpart.cpp
+1-0libcxx/src/CMakeLists.txt
+337-33 files

LLVM/project 80989c8 — llvm/lib/Target/SPIRV SPIRVLowerDynamicLocalMemory.cpp, llvm/test/CodeGen/SPIRV/dynamic-local-memory ctor-dtor-order.ll array-lowering.ll

[SPIRV][Offload] Implement `DynSharedMemory` for L0 (#231160)

This PR implements SLM for Level Zero backend. Every kernel in a module
lowered by the new SPIR-V pass receives a trailing `__local` argument,
including kernels that do not use SLM.

In order to support existing code that uses offload, the PR adds an
additional pass to SPIRV backend. The idea is that the pass is searching
for all extern unsized workgroup arrays and then it converts them to a
global variable that is initialized by an additional kernel argument to
every kernel in the module, including kernels that do not reference the
array.

The pass closes the gap between cuda/hsa and level_zero handling of the
dynamically sized workgroup memory, because level_zero (and openCL) only
support the local memory sized through kernel arguments compared to cuda
which configures it during kernel launch. It was inspired by existing
code in intel's fork of llvm.


    [9 lines not shown]
DeltaFile
+278-0llvm/lib/Target/SPIRV/SPIRVLowerDynamicLocalMemory.cpp
+249-0llvm/test/CodeGen/SPIRV/dynamic-local-memory/array-lowering.ll
+82-0llvm/test/CodeGen/SPIRV/dynamic-local-memory/ctor-dtor-order.ll
+52-0offload/test/offloading/dyn_groupprivate_spmd.cpp
+37-12offload/liboffload/plugins/level_zero/src/L0Kernel.cpp
+40-4offload/unittests/OffloadAPI/kernel/olLaunchKernel.cpp
+738-1612 files not shown
+850-2718 files

LLVM/project c173c2c — llvm/lib/CodeGen/SelectionDAG DAGCombiner.cpp TargetLowering.cpp, llvm/test/CodeGen/AArch64 vector-shuffle-var.ll

[DAG] SimplifyDemandedVectorElts - add ISD::VECTOR_SHUFFLE_VAR handling (#244921)

Simplify the demanded elements of the mask operand using DemandedElts,
and use the mask's constant range to limit the demanded source elements.

The InstCombine part is in #245249.

Fixes #244310

AI Note: I've used Claude Code to help me understand `SelectionDAG`
concepts and the codebase. The implementation and tests are my own.
DeltaFile
+319-24llvm/test/CodeGen/X86/vector-shuffle-var.ll
+36-0llvm/test/CodeGen/AArch64/vector-shuffle-var.ll
+32-0llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+0-16llvm/test/CodeGen/X86/vector-shuffle-var-legalize.ll
+9-0llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+396-405 files

LLVM/project 4d07c01 — llvm/lib/Target/X86 X86ISelLowering.cpp, llvm/test/CodeGen/X86 pr209714.ll

[X86] Fix miscompile of srl(xor(y, vecreduce_umax(x)), bw-1) (#244835)

In the signbit reduction fold added in #210281, `X` is initialized to
`N0` as the fallback for a failed `m_Not` match, but `sd_match`
overwrites `X` while trying the `xor` operands, even when the match
fails. If the last operand tried is `vecreduce_umax(x)`, the `xor` is
dropped and the shift is lowered to a `MOVMSK` test of `x`.

Set the fallback only after the match fails.

Fixes #244613
Fixes #244753

Assisted-by: Claude Opus 5.5
DeltaFile
+257-0llvm/test/CodeGen/X86/pr209714.ll
+4-1llvm/lib/Target/X86/X86ISelLowering.cpp
+261-12 files

LLVM/project d67e3cb — llvm/lib/CodeGen/SelectionDAG DAGCombiner.cpp, llvm/test/CodeGen/X86 load-combine-masked.ll

[DAGCombiner] Bail out in MatchLoadCombine when no bytes come from load (#244857)

Since #200247, calculateByteProvider returns ConstantZero for bytes
masked by AND with 0. This could make `Loads` empty in MatchLoadCombine
and triggers assertion.

Fix by early return when `Loads` is empty.

Fixes: https://github.com/llvm/llvm-project/issues/244804

Assisted-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+18-0llvm/test/CodeGen/X86/load-combine-masked.ll
+3-2llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+21-22 files

LLVM/project 7774bfc — llvm/lib/ExecutionEngine/IntelJITProfiling jitprofiling.c

[NFC][ExecutionEngine] Fix calloc argument order in jitprofiling.c (#245189)

calloc takes (nmemb, size); the arguments were swapped. No functional
change, but it silences -Wcalloc-transposed-args on newer compilers.

---------

Co-authored-by: Claude <noreply at anthropic.com>
DeltaFile
+1-1llvm/lib/ExecutionEngine/IntelJITProfiling/jitprofiling.c
+1-11 files

LLVM/project 3f1c38f — clang/lib/CIR/CodeGen CIRGenExprScalar.cpp, clang/lib/CIR/Lowering/DirectToLLVM LowerToLLVM.cpp

[CIR] Keep complex and bool casts constrained in strict FP functions

In a strictfp function ClangIR emitted plain `fpext`, `fptrunc`,
`fptosi`, `sitofp`, `uitofp` and `fcmp une` for casts between complex
types and for conversions between floating-point values and bool, where
classic codegen emits constrained intrinsics. CIRGen created the
complex casts and `float_to_bool` without the `fenv` attribute,
LoweringPrepare dropped the attribute when it expanded a complex cast,
and the LLVM lowering of `float_to_bool` and `bool_to_float` ignored
it.

`createCast` now takes an optional `fenv` attribute. CIRGen passes the
current floating-point environment for `float_to_bool` and for the
complex cast kinds that convert floating-point values. The kinds that
only select or pack a part get none. LoweringPrepare passes the
attribute of a complex cast to the scalar casts of its expansion. With
`fenv`, `float_to_bool` lowers to the quiet constrained `fcmp` and
`bool_to_float` to the constrained `uitofp`.


    [4 lines not shown]
DeltaFile
+130-0clang/test/CIR/CodeGen/complex-cast-fenv-access.c
+93-0clang/test/CIR/CodeGen/complex-strict-fp.cpp
+66-0clang/test/CIR/Transforms/lowering-prepare-complex-cast-fenv.cir
+23-0clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+20-0clang/test/CIR/Lowering/fenv.cir
+14-3clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp
+346-33 files not shown
+376-159 files

LLVM/project 524f6f9 — clang/lib/CIR/CodeGen CIRGenExpr.cpp, clang/test/CIR/CodeGenHLSL scalar-swizzles.hlsl

[CIR] HLSL Scalar swizzles with non vector dest type (#245069)

Implement support for HLSL Scalar swizzles with non-vector destination
type
DeltaFile
+34-0clang/test/CIR/CodeGenHLSL/scalar-swizzles.hlsl
+7-3clang/lib/CIR/CodeGen/CIRGenExpr.cpp
+41-32 files

LLVM/project afc286b — mlir/lib/Dialect/OpenACC/Transforms ACCCGToGPU.cpp, mlir/test/Dialect/OpenACC acc-cg-to-gpu-reduction-array.mlir acc-cg-to-gpu-private-local-cast.mlir

[MLIR][OpenACC] Keep private stores of array reductions on one lane (#245438)

Two fixes in the acc-cg-to-gpu lowering of privatized arrays:

- The walk that finds the acc.private_local behind a memref followed
every operand of the defining op. A memref.reinterpret_cast whose
dynamic sizes come from a different private descriptor was therefore
attributed to that descriptor. Scalar operands (sizes, strides, offsets,
indices) only shape an access, so the walk now follows only the view
source, the base entity of a partial access, or non-scalar operands.

- The per-thread partials of an array reduction are combined across the
accumulate's thread dimensions. Storing the reduction identity is safe
on every lane and initializes each partial. Any other store into a
partial is an update, and it is no longer made active on every thread:
it stays on one lane. Previously such an update ran on every lane, so
its contribution was combined once per lane.
DeltaFile
+95-5mlir/lib/Dialect/OpenACC/Transforms/ACCCGToGPU.cpp
+58-0mlir/test/Dialect/OpenACC/acc-cg-to-gpu-private-local-cast.mlir
+57-0mlir/test/Dialect/OpenACC/acc-cg-to-gpu-reduction-array.mlir
+210-53 files

LLVM/project 0a69631 — llvm/lib/Transforms/Vectorize VPlanTransforms.cpp VPlanUtils.h

[VPlan] Tighten usecase of findRecipe (NFC) (#236810)

Rename findRecipe to findUserRecursively for clarity, noticing that it
is only ever necessary in epilogue-based reasoning, which falls outside
VPlan modeling. Migrate one user to getSingleUser, and improve code
around remaining two users that do epilogue-based reasoning.
DeltaFile
+8-12llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+5-5llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h
+3-6llvm/lib/Transforms/Vectorize/VPlanConstruction.cpp
+2-4llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+3-3llvm/lib/Transforms/Vectorize/VPlanUtils.h
+21-305 files

LLVM/project 75d3a6c — llvm/test/Transforms/LoopVectorize first-order-recurrence-tail-folding.ll

[LV] Increase test coverage of FOR-tail-folding (#238318)

Fix missing test coverage for the case when first-order-recurrences have
no in-loop users in the tail-folding case.

Assisted-by: llm
DeltaFile
+282-0llvm/test/Transforms/LoopVectorize/first-order-recurrence-tail-folding.ll
+282-01 files