OSDN Git Service

[CostModel][X86] Fixed vXi8 uniform shift costs.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 8 Jan 2017 14:14:36 +0000 (14:14 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 8 Jan 2017 14:14:36 +0000 (14:14 +0000)
commit35f85cb068a3918ceb18d5c386f5f602b88c7d92
tree2ee5b850b83710f6c17d5ae7728e7a1796fc54ee
parent93f6323c31797beb9f915175a605dc14ac580c39
[CostModel][X86] Fixed vXi8 uniform shift costs.

The 'fast' costs should only work for shifts by uniform constants (uniform non-constant are lowered using the slow default implementation).

Logical shifts were not taking into account that we must mask the psrlw result, so the costs needed to be doubled.

Added missing AVX2/AVX512BW costs as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291391 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86TargetTransformInfo.cpp
test/Analysis/CostModel/X86/testshiftlshr.ll
test/Analysis/CostModel/X86/testshiftshl.ll
test/Analysis/CostModel/X86/vshift-ashr-cost.ll
test/Analysis/CostModel/X86/vshift-lshr-cost.ll
test/Analysis/CostModel/X86/vshift-shl-cost.ll