[CostModel][X86][ARM] Teach getCastInstrCost to include the splitting factor when...
authorCraig Topper <craig.topper@intel.com>
Fri, 24 Apr 2020 20:02:15 +0000 (13:02 -0700)
committerCraig Topper <craig.topper@intel.com>
Fri, 24 Apr 2020 20:36:26 +0000 (13:36 -0700)
commit03aa967c0d38313ac124f7550314879dbae9ba9d
treebd20e575aa4a849242dbdc0067e846feb0e98f53
parentee9c53d27106689daf9f9f26354bead6ccad4ef1
[CostModel][X86][ARM] Teach getCastInstrCost to include the splitting factor when handling operations that type legalize to the same number of subvectors or scalar components

Previously, we just always returned 1. But that ignores that we have to do the operation for each subvector or scalar component.

Differential Revision: https://reviews.llvm.org/D78824
llvm/include/llvm/CodeGen/BasicTTIImpl.h
llvm/test/Analysis/CostModel/ARM/cast.ll
llvm/test/Analysis/CostModel/X86/fptosi.ll