]> granicus.if.org Git - llvm/commit
[PPC] Give unaligned memory access lower cost on processor that supports it
authorGuozhi Wei <carrot@google.com>
Fri, 17 Feb 2017 22:29:39 +0000 (22:29 +0000)
committerGuozhi Wei <carrot@google.com>
Fri, 17 Feb 2017 22:29:39 +0000 (22:29 +0000)
commit4d5bc8795188d62846132815bd521bd4b60c6cad
treef855ad73614a838e0296c3d178c95665f4e10384
parent06332794af2b169ff1f104158a64d591546e9091
[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

This is resubmit of r292680, which was reverted by r293092. The internal application failures were actually caused by a source code bug.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295506 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]