[CostModel][X86] Add CTPOP scalar costs (PR43656)
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 14 Oct 2019 14:07:43 +0000 (14:07 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 14 Oct 2019 14:07:43 +0000 (14:07 +0000)
commit151bbba758610905d1789760124598048192179d
treea34a1f873f24b1b23098547493b87a891d2d791d
parentcdcf58e5af025989a8dd52bc0d9c032712a160c8
[CostModel][X86] Add CTPOP scalar costs (PR43656)

Add specific scalar costs for ctpop instructions, these are based on the llvm-mca's SLM throughput numbers (the oldest model we have).

For targets supporting POPCNT, we provide overrides that assume 1cy costs.

llvm-svn: 374775
llvm/lib/Target/X86/X86TargetTransformInfo.cpp
llvm/test/Analysis/CostModel/X86/ctpop.ll
llvm/test/Transforms/SLPVectorizer/X86/ctpop.ll