[AArch64] Implement getArithmeticReductionCost
authorMatthew Simpson <mssimpso@codeaurora.org>
Fri, 16 Mar 2018 11:34:15 +0000 (11:34 +0000)
committerMatthew Simpson <mssimpso@codeaurora.org>
Fri, 16 Mar 2018 11:34:15 +0000 (11:34 +0000)
commiteacfefd0563fa886e6d34758867150e6f6eae13e
tree63c5c607c45f8e6f99880cdf76936ae48d5a8a24
parent3461b1e09754b0cfba0207c23ce67823c80b7065
[AArch64] Implement getArithmeticReductionCost

This patch provides an implementation of getArithmeticReductionCost for
AArch64. We can specialize the cost of add reductions since they are computed
using the 'addv' instruction.

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

llvm-svn: 327702
llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h
llvm/test/Analysis/CostModel/AArch64/vector-reduce.ll
llvm/test/Transforms/SLPVectorizer/AArch64/horizontal.ll