[PPC] Give unaligned memory access lower cost on processor that supports it
authorGuozhi Wei <carrot@google.com>
Fri, 20 Jan 2017 23:35:27 +0000 (23:35 +0000)
committerGuozhi Wei <carrot@google.com>
Fri, 20 Jan 2017 23:35:27 +0000 (23:35 +0000)
commita5c6ed5a5ce7d0fa2c1921f79c2080c5051075a8
tree7d340b9a9dab3b714994709ea007059e39aa997c
parentf39ce9947434535529971e35c711e45c6c2fafec
[PPC] Give unaligned memory access lower cost on processor that supports it

Newer ppc supports unaligned memory access, it reduces the cost of unaligned memory access significantly. This patch handles this case in PPCTTIImpl::getMemoryOpCost.

This patch fixes pr31492.

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

llvm-svn: 292680
llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp
llvm/test/Analysis/CostModel/PowerPC/load_store.ll
llvm/test/Analysis/CostModel/PowerPC/unaligned_ld_st.ll [new file with mode: 0644]