[CostModel] Align the cost model for intrinsics for scalable/fixed-width vectors.
authorSander de Smalen <sander.desmalen@arm.com>
Mon, 25 Jan 2021 13:59:37 +0000 (13:59 +0000)
committerSander de Smalen <sander.desmalen@arm.com>
Wed, 31 Mar 2021 13:52:49 +0000 (14:52 +0100)
commitb6d05297803d8e6bae6a1159b66e85a07995d6fb
tree6c152e91965ba927f1b70cfbeb048c145d93ea97
parentdc7ebd2cb0cf4a83bb6cd1bfc8853b0a30054777
[CostModel] Align the cost model for intrinsics for scalable/fixed-width vectors.

Let getIntrinsicInstrCost call getTypeBasedIntrinsicInstrCost for scalable vectors,
similar to how this is done for fixed-width vectors, instead of falling back
on BaseT::getIntrinsicInstrCost().

If the intrinsic cannot be costed (or is not overloaded by the target),
it will return InstructionCost::getInvalid() instead.

Depends on D97469

Reviewed By: david-arm

Differential Revision: https://reviews.llvm.org/D97470
llvm/include/llvm/CodeGen/BasicTTIImpl.h
llvm/test/Analysis/CostModel/AArch64/sve-intrinsics.ll
llvm/test/Analysis/CostModel/AArch64/sve-math.ll