]> granicus.if.org Git - llvm/commit
[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)
commit31027cdf52928c9f67c5f4797e72f53ecade697a
tree04860061995258a5f81e00db42d3d6c290b7069a
parentcf0c9c50469f659c633d9d2d75ca31a9ce2c1f8a
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292680 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/PPCTargetTransformInfo.cpp
test/Analysis/CostModel/PowerPC/load_store.ll
test/Analysis/CostModel/PowerPC/unaligned_ld_st.ll [new file with mode: 0644]