OSDN Git Service

[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)
commit638cd0356dc0cc8a184191703481f0d5adf2877f
tree9e99cc33ca915a302405b7db45cfe280c85106a0
parent4e6485e747b004473be2dcdf69ecef8bdc2cc8da
[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).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265005 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/BasicTTIImpl.h
test/Analysis/CostModel/PowerPC/popcnt.ll [new file with mode: 0644]
test/Analysis/CostModel/X86/scalarize.ll