[TTI] Let the cost model estimate ctpop costs based on legality
authorBenjamin Kramer <benny.kra@googlemail.com>
Thu, 31 Mar 2016 10:42:40 +0000 (10:42 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Thu, 31 Mar 2016 10:42:40 +0000 (10:42 +0000)
commitcad9a8a6bb3f26f2d7dad6aeca83f2ce5ada0eef
tree4548da56b3ade6ed52fd0a8ca3ecb22df8b58bc1
parent958b9e7e33b5db1acf3d5a026efe85abb6784ab7
[TTI] Let the cost model estimate ctpop costs based on legality

PPC has a vector popcount, this lets the vectorizer use the correct cost
for it. Tweak X86 test to use an intrinsic that's actually scalarized (we
have a somewhat efficient lowering for vector popcount using SSE, the
cost model finds that now).

llvm-svn: 265005
llvm/include/llvm/CodeGen/BasicTTIImpl.h
llvm/test/Analysis/CostModel/PowerPC/popcnt.ll [new file with mode: 0644]
llvm/test/Analysis/CostModel/X86/scalarize.ll