summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86TargetTransformInfo.h
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2017-09-08 13:49:36 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2017-09-08 13:49:36 +0000
commit6dd29fccb881cd3f766effe22a0732d7f02b37fe (patch)
tree0b6aaca1b921fa53193282087296a8fe9bf54d9f /llvm/lib/Target/X86/X86TargetTransformInfo.h
parent46dfb7a39d7eb7e7b2439494ad18e31056aa6d09 (diff)
downloadbcm5719-llvm-6dd29fccb881cd3f766effe22a0732d7f02b37fe.tar.gz
bcm5719-llvm-6dd29fccb881cd3f766effe22a0732d7f02b37fe.zip
[SLP] Support for horizontal min/max reduction.
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. Differential revision: https://reviews.llvm.org/D27846 llvm-svn: 312791
Diffstat (limited to 'llvm/lib/Target/X86/X86TargetTransformInfo.h')
-rw-r--r--llvm/lib/Target/X86/X86TargetTransformInfo.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86TargetTransformInfo.h b/llvm/lib/Target/X86/X86TargetTransformInfo.h
index a8edc46ed57..a7f500dc507 100644
--- a/llvm/lib/Target/X86/X86TargetTransformInfo.h
+++ b/llvm/lib/Target/X86/X86TargetTransformInfo.h
@@ -96,6 +96,9 @@ public:
int getArithmeticReductionCost(unsigned Opcode, Type *Ty,
bool IsPairwiseForm);
+ int getMinMaxReductionCost(Type *Ty, Type *CondTy, bool IsPairwiseForm,
+ bool IsUnsigned);
+
int getInterleavedMemoryOpCost(unsigned Opcode, Type *VecTy,
unsigned Factor, ArrayRef<unsigned> Indices,
unsigned Alignment, unsigned AddressSpace);
OpenPOWER on IntegriCloud