[all-commits] [llvm/llvm-project] ec1016: [IVDescriptors] Support reductions with minimumnum...

Florian Hahn via All-commits all-commits at lists.llvm.org
Mon Apr 28 03:16:57 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ec1016f7ef9ff97ecef6e2e84a55d36d7bfbe803
      https://github.com/llvm/llvm-project/commit/ec1016f7ef9ff97ecef6e2e84a55d36d7bfbe803
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2025-04-28 (Mon, 28 Apr 2025)

  Changed paths:
    M llvm/include/llvm/Analysis/IVDescriptors.h
    M llvm/lib/Analysis/IVDescriptors.cpp
    M llvm/lib/Transforms/Utils/LoopUtils.cpp
    M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
    M llvm/test/Transforms/LoopVectorize/minimumnum-maximumnum-reductions.ll
    A llvm/test/Transforms/SLPVectorizer/AArch64/reduce-maximumnum-minimumnum.ll

  Log Message:
  -----------
  [IVDescriptors] Support reductions with minimumnum/maximumnum. (#137335)

Add a new reduction recurrence kind for reductions with
minimumnum/maximumnum. Such reductions can be vectorized without
nsz/nnans, same as reductions with maximum/minimum intrinsics.

Note that a new reduction kind is needed to make sure partial reductions
are also combined with minimumnum/maximumnum.

Note that the final reduction to a scalar value is performed with
vector.reduce.fmin/fmax. This should be fine, as the results of the
partial reductions with maximumnum/minimumnum silences any sNaNs.

In-loop and reductions in SLP are not supported yet, as there's no
reduction version of maximumnum/minimumnum yet and fmax may be
incorrect.

PR: https://github.com/llvm/llvm-project/pull/137335



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list