[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)
commit903338511bfd613bc6f41fb7c9d156e3fbb5fd57
treefd17369a32dc9252301a01c7d2da9830a25d0b1b
parent132381f9811190993b389e5171d30a1e2cd07f61
[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>

llvm-svn: 234462
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
llvm/test/CodeGen/AArch64/arm64-misaligned-memcpy-inline.ll [new file with mode: 0644]