[ppc] Correctly compute the cost of loading 32/64 bit memory into VSR
authorGuozhi Wei <carrot@google.com>
Sat, 3 Dec 2016 00:41:43 +0000 (00:41 +0000)
committerGuozhi Wei <carrot@google.com>
Sat, 3 Dec 2016 00:41:43 +0000 (00:41 +0000)
commit835de1f3ab2df5ce56eab9e5d9021a26fe04b854
treeb7942e7efd680008e726203f88d8a5e394b670e2
parent33f947057dff866c3768835dd111dac6613c31d7
[ppc] Correctly compute the cost of loading 32/64 bit memory into VSR

VSX has instructions lxsiwax/lxsdx that can load 32/64 bit value into VSX register cheaply. That patch makes it known to memory cost model, so the vectorization of the test case in pr30990 is beneficial.

Differential Revision: https://reviews.llvm.org/D26713

llvm-svn: 288560
llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp
llvm/test/Analysis/CostModel/PowerPC/vsr_load_32_64.ll [new file with mode: 0644]
llvm/test/Transforms/LoopVectorize/PowerPC/pr30990.ll [new file with mode: 0644]