[ARM] Add MVE add.sat costs
authorDavid Green <david.green@arm.com>
Tue, 19 Jan 2021 15:38:46 +0000 (15:38 +0000)
committerDavid Green <david.green@arm.com>
Tue, 19 Jan 2021 15:38:46 +0000 (15:38 +0000)
commitf373b30923d7a83985e59ec76a566dd889e684d9
tree721a2f3aca13d0a69f0b4e1a05ff0aef64a04dad
parent6bd0a4451ccd4a5cbab1f735052edbcafcb856ea
[ARM] Add MVE add.sat costs

This adds some basic MVE sadd_sat/ssub_sat/uadd_sat/usub_sat costs,
based on when the instruction is legal. With smaller than legal types
that are promoted we generate shr(qadd(shl, shl)), so the cost is 4
appropriately.

Differential Revision: https://reviews.llvm.org/D94958
llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
llvm/test/Analysis/CostModel/ARM/arith-ssat.ll
llvm/test/Analysis/CostModel/ARM/arith-usat.ll