X86 cost model: Vector shifts are expensive in most cases
authorArnold Schwaighofer <aschwaighofer@apple.com>
Wed, 3 Apr 2013 21:46:05 +0000 (21:46 +0000)
committerArnold Schwaighofer <aschwaighofer@apple.com>
Wed, 3 Apr 2013 21:46:05 +0000 (21:46 +0000)
commit6b6050b229976a2f53184f6d6857e6f445a869d0
tree3f91e43d68b7aedf1ce51e9da9ff457b47f03ecb
parentd787a41b118a3724d1df87dc3d38cc3fddb3a145
X86 cost model: Vector shifts are expensive in most cases

The default logic does not correctly identify costs of casts because they are
marked as custom on x86.

For some cases, where the shift amount is a scalar we would be able to generate
better code. Unfortunately, when this is the case the value (the splat) will get
hoisted out of the loop, thereby making it invisible to ISel.

radar://13130673
radar://13537826

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178703 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86TargetTransformInfo.cpp
test/Analysis/CostModel/X86/arith.ll
test/Analysis/CostModel/X86/testshiftashr.ll [new file with mode: 0644]
test/Analysis/CostModel/X86/testshiftlshr.ll [new file with mode: 0644]
test/Analysis/CostModel/X86/testshiftshl.ll [new file with mode: 0644]