[SVE][Analysis]Instruction costs for ops on scalable-vec
authorNashe Mncube <nashe.mncube@arm.com>
Wed, 17 Mar 2021 12:00:31 +0000 (12:00 +0000)
committerNashe Mncube <nashe.mncube@arm.com>
Mon, 29 Mar 2021 10:15:50 +0000 (11:15 +0100)
commit19601a4c6c4887e167dabf64bb2393dd1c399fe9
treea5ac4e58d6ef23840997c48dce83d84e52048ea2
parent66a8247eb6c021a6a706702fb9eedfb68f4cc94d
[SVE][Analysis]Instruction costs for ops on scalable-vec

The following operations have no associated cost for them
when applied to scalable vectors, and as a consequence
can trigger a crash when a call is made to
AArch64TTIImpl::getCastInstrCost():
- fptrunc
- trunc
- fpext
- fpto(u,s)i

This patch adds costs for these operations and
relevant regression tests.

Differential Revision: https://reviews.llvm.org/D98934
llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
llvm/test/Analysis/CostModel/AArch64/sve-fpext.ll [new file with mode: 0644]
llvm/test/Analysis/CostModel/AArch64/sve-fptoi.ll [new file with mode: 0644]
llvm/test/Analysis/CostModel/AArch64/sve-fptrunc.ll [new file with mode: 0644]
llvm/test/Analysis/CostModel/AArch64/sve-trunc.ll