[CostModel] remove cost-kind predicate for memcpy cost
authorSanjay Patel <spatel@rotateright.com>
Wed, 21 Oct 2020 12:25:09 +0000 (08:25 -0400)
committerSanjay Patel <spatel@rotateright.com>
Wed, 21 Oct 2020 12:50:44 +0000 (08:50 -0400)
commit01ea93d85d6e2240d70daf52e84772aba310bc19
tree799f9a001ec865794dd814ecb0152509daeddb18
parent1e46d1aa3f9b618e8db32af5c855fbc386a950aa
[CostModel] remove cost-kind predicate for memcpy cost

The default implementation base returns TCC_Expensive (currently
set to '4'), so that explains the test diff. This probably does
not make sense for most callers, but at least now the costs will
be consistently wrong instead of mysteriously wrong.

The ARM target has an override that tries to model codegen expansion,
and that should likely be adapted for general usage.

This probably does not affect anything because the vectorizers are
the primary users of the throughput cost, but memcpy is not listed
as a trivially vectorizable intrinsic.
llvm/include/llvm/CodeGen/BasicTTIImpl.h
llvm/test/Analysis/CostModel/X86/intrinsic-cost-kinds.ll