]> granicus.if.org Git - llvm/commit
[SLP] Support for horizontal min/max reduction.
authorAlexey Bataev <a.bataev@hotmail.com>
Mon, 25 Sep 2017 13:34:59 +0000 (13:34 +0000)
committerAlexey Bataev <a.bataev@hotmail.com>
Mon, 25 Sep 2017 13:34:59 +0000 (13:34 +0000)
commitce5fe1366ccb80cb003a42ffd83a256d33f93bf3
tree806defd59326e631128030e158ed814334c336fb
parentbb3c660e87f59abb665570a31b01ab125ec4c10e
[SLP] Support for horizontal min/max reduction.

Summary:
SLP vectorizer supports horizontal reductions for Add/FAdd binary operations. Patch adds support for horizontal min/max reductions.
Function getReductionCost() is split to getArithmeticReductionCost() for binary operation reductions and getMinMaxReductionCost() for min/max reductions.
Patch fixes PR26956.

Reviewers: spatel, mkuper, hfinkel, RKSimon

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D27846

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314101 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Vectorize/SLPVectorizer.cpp
test/Transforms/SLPVectorizer/X86/horizontal-list.ll
test/Transforms/SLPVectorizer/X86/horizontal-minmax.ll