[RISCV] Add cost modelling for vector widenning reduction.
authorjacquesguan <Jianjian.Guan@streamcomputing.com>
Mon, 18 Jul 2022 09:37:37 +0000 (17:37 +0800)
committerjacquesguan <Jianjian.Guan@streamcomputing.com>
Thu, 4 Aug 2022 07:31:31 +0000 (15:31 +0800)
commitb61cfc91eac83dec7ded1ef1e6d9f9776751d2c0
tree41c143c1a4d8a83724829fe081d64281e0eb3897
parent6f867f9102838ebe314c1f3661fdf95700386e5a
[RISCV] Add cost modelling for vector widenning reduction.

In RVV, we use vwredsum.vs and vwredsumu.vs for vecreduce.add(ext(Ty A)) if the result type's width is twice of the input vector's SEW-width. In this situation, the cost of extended add reduction should be same as single-width add reduction. So as the vector float widenning reduction.

Differential Revision: https://reviews.llvm.org/D129994
llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h