[ARM] remove cost-kind predicate for cmp/sel costs
authorSanjay Patel <spatel@rotateright.com>
Thu, 5 Nov 2020 19:51:14 +0000 (14:51 -0500)
committerSanjay Patel <spatel@rotateright.com>
Thu, 5 Nov 2020 19:52:25 +0000 (14:52 -0500)
commit264a6df353b7e7ac4269bc10467bd2a991db3173
tree9f437a431bc3a6159b6f13e9a18e947b22b5175b
parent3b9b90a1914f1e470ba7d333b26bd34787337806
[ARM] remove cost-kind predicate for cmp/sel costs

This is the cmp/sel sibling to D90692.
Again, the reasoning is: the throughput cost is number of instructions/uops,
so size/blended costs are identical except in special cases (for example,
fdiv or other known-expensive machine instructions or things like MVE that
may require cracking into >1 uops).

We need to check for a valid (non-null) condition type parameter because
SimplifyCFG may pass nullptr for that (and so we will crash multiple
regression tests without that check). I'm not sure if passing nullptr makes
sense, but other code in the cost model does appear to check if that param
is set or not.

Differential Revision: https://reviews.llvm.org/D90781
llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
llvm/test/Analysis/CostModel/ARM/intrinsic-cost-kinds.ll
llvm/test/Analysis/CostModel/ARM/select.ll