[CostModel][AArch64] Fix ctpop intrinsic cost when NEON is disabled.
authorEli Friedman <efriedma@quicinc.com>
Fri, 2 Sep 2022 22:17:55 +0000 (15:17 -0700)
committerEli Friedman <efriedma@quicinc.com>
Fri, 2 Sep 2022 22:17:55 +0000 (15:17 -0700)
commitb219a9c0a29ef91d4738266a755a76577f5ab031
treeb3e75686838eb515d85b61cddc3445170d4e6f94
parent3bbdf06b28275a56ad36a844d271d84956d1d7e9
[CostModel][AArch64] Fix ctpop intrinsic cost when NEON is disabled.

If we don't have NEON, we use the generic fallback, which takes 12
instructions. Make sure the costs reflect that.

(On a related note, we could optimize the generic fallback a bit. It
currently uses sequences like lsr+and+add; if we use and+lsr+add
instead, we can fold the lsr into the add.)

Differential Revision: https://reviews.llvm.org/D133154
llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
llvm/test/Analysis/CostModel/AArch64/ctpop.ll