[CostModel] remove cost-kind predicate for FP add/mul vector reduction costs
authorSanjay Patel <spatel@rotateright.com>
Tue, 27 Oct 2020 21:40:58 +0000 (17:40 -0400)
committerSanjay Patel <spatel@rotateright.com>
Tue, 27 Oct 2020 22:00:20 +0000 (18:00 -0400)
commit50dfa19cc799ae7cddd39a95dbfce675a12672ad
treee1831178e3eb9a2c4b156bc4a5b040b0709e9d0b
parent138fda5dd2098da9b0857d34f415f723971a1c5c
[CostModel] remove cost-kind predicate for FP add/mul vector reduction costs

This was originally part of:
f2c25c70791d
but that was reverted because there was an underlying bug in
processing the vector type of these intrinsics. That was
fixed with:
74ffc823ed21

This is similar in spirit to 01ea93d85d6e (memcpy) except that
here the underlying caller assumptions were created for vectorizer
use (throughput) rather than other passes.

That meant targets could have an enormous throughput cost with no
corresponding size, latency, or blended cost increase.

Paraphrasing from the previous commits:
This may not make sense for some callers, but at least now the
costs will be consistently wrong instead of mysteriously wrong.

Targets should provide better overrides if the current modeling
is not accurate.
llvm/include/llvm/CodeGen/BasicTTIImpl.h
llvm/test/Analysis/CostModel/X86/intrinsic-cost-kinds.ll