[PATCH] D45366: Support generic expansion of ordered vector reduction (PR36732)

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 6 06:56:14 PDT 2018


RKSimon created this revision.
RKSimon added reviewers: aemerson, gnzlbg, chandlerc, hfinkel, rengolin, mkuper, ABataev, spatel.

Without the fast math flags, the llvm.experimental.vector.reduce.fadd/fmul intrinsic expansions must be expanded in order.

This patch scalarizes the reduction, applying the accumulator at the start of the sequence: ((((Acc + Scl[0]) + Scl[1]) + Scl[2]) + ) ... + Scl[NumElts-1]


Repository:
  rL LLVM

https://reviews.llvm.org/D45366

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45366.141335.patch
Type: text/x-patch
Size: 8816 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180406/e0ee22d7/attachment.bin>


More information about the llvm-commits mailing list