[AArch64] Teach AArch64TargetLowering::getOptimalMemOpType to consider alignment
authorLang Hames <lhames@gmail.com>
Thu, 9 Apr 2015 03:40:33 +0000 (03:40 +0000)
committerLang Hames <lhames@gmail.com>
Thu, 9 Apr 2015 03:40:33 +0000 (03:40 +0000)
commit174f04eefbc40bffc1de9d0bf230dad0ee8119a6
treec8f46cc9f92e3537ee053b3d220115052e96b3ff
parent23295f613bd73f7899b3e1f4c433d7a518dd4297
[AArch64] Teach AArch64TargetLowering::getOptimalMemOpType to consider alignment
restrictions when choosing a type for small-memcpy inlining in
SelectionDAGBuilder.

This ensures that the loads and stores output for the memcpy won't be further
expanded during legalization, which would cause the total number of instructions
for the memcpy to exceed (often significantly) the inlining thresholds.

<rdar://problem/17829180>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234462 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AArch64/AArch64ISelLowering.cpp
test/CodeGen/AArch64/arm64-misaligned-memcpy-inline.ll [new file with mode: 0644]