[ARM] Align stack objects passed to memory intrinsics
authorJohn Brawn <john.brawn@arm.com>
Wed, 18 Mar 2015 12:01:59 +0000 (12:01 +0000)
committerJohn Brawn <john.brawn@arm.com>
Wed, 18 Mar 2015 12:01:59 +0000 (12:01 +0000)
commit0328ca6cd7f194c4ee7e4a8203f56ae7a17ed014
treec7f6cecff7b3fc178c11d3a689bf9bf7af1adda4
parentbf60cd0751fd273632d995095087a8f337097f06
[ARM] Align stack objects passed to memory intrinsics

Memcpy, and other memory intrinsics, typically tries to use LDM/STM if
the source and target addresses are 4-byte aligned. In CodeGenPrepare
look for calls to memory intrinsics and, if the object is on the
stack, 4-byte align it if it's large enough that we expect that memcpy
would want to use LDM/STM to copy it.

Differential Revision: http://reviews.llvm.org/D7908

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232627 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Target/TargetLowering.h
lib/CodeGen/CodeGenPrepare.cpp
lib/Target/ARM/ARMISelLowering.cpp
lib/Target/ARM/ARMISelLowering.h
test/CodeGen/ARM/memfunc.ll
test/CodeGen/ARM/memset-inline.ll