[ARM] Treat memcpy/memset/memmove as call instructions for low overhead loops
authorDavid Green <david.green@arm.com>
Tue, 3 Nov 2020 11:53:09 +0000 (11:53 +0000)
committerDavid Green <david.green@arm.com>
Tue, 3 Nov 2020 11:53:09 +0000 (11:53 +0000)
commite47449940227a9feab51c997d87df3aa06878c91
tree88b4f128bdebab576e7a18d617e0ecc22644afbc
parent785080e3fa941f77dc20d5d6d2677196445bec4d
[ARM] Treat memcpy/memset/memmove as call instructions for low overhead loops

If an instruction will be lowered to a call there is no advantage of
using a low overhead loop as the LR register will need to be spilled and
reloaded around the call, and the low overhead will end up being
reverted. This teaches our hardware loop lowering that these memory
intrinsics will be calls under certain situations.

Differential Revision: https://reviews.llvm.org/D90439
llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
llvm/lib/Target/ARM/ARMTargetTransformInfo.h
llvm/test/CodeGen/Thumb2/LowOverheadLoops/memcall.ll