[PATCH] D152371: [ExpandReductions] Add lowering for minimum/maximum reductions

Anna Thomas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 7 06:51:47 PDT 2023


anna created this revision.
anna added reviewers: spatel, skatkov, nikic, dmgreen.
Herald added subscribers: StephenFan, hiraditya.
Herald added a project: All.
anna requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This patch adds the lowering for these minimum/maximum reduction intrinsics in the expand reductions pass. 
If the nnan/nsz flags are present, these are propagated as well.  The reduction is done as a  series of shuffles 
with vectorized minimum/maximum intrinsics.

This patch adds the lowering for the intrinsic introduced in https://reviews.llvm.org/D152370.


https://reviews.llvm.org/D152371

Files:
  llvm/include/llvm/Analysis/IVDescriptors.h
  llvm/lib/CodeGen/ExpandReductions.cpp
  llvm/lib/Transforms/Utils/LoopUtils.cpp
  llvm/test/CodeGen/Generic/expand-experimental-reductions.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152371.529286.patch
Type: text/x-patch
Size: 7745 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230607/b8dd6255/attachment.bin>


More information about the llvm-commits mailing list