[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)
commit0dbcd654422312d694969e56e3b668e50d6a38f9
treeb1ddb5c855a3bc85510547ae68b756085f852394
parent2063cb63059d5fa64b628817194f830a908c334f
[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

llvm-svn: 232627
llvm/include/llvm/Target/TargetLowering.h
llvm/lib/CodeGen/CodeGenPrepare.cpp
llvm/lib/Target/ARM/ARMISelLowering.cpp
llvm/lib/Target/ARM/ARMISelLowering.h
llvm/test/CodeGen/ARM/memfunc.ll
llvm/test/CodeGen/ARM/memset-inline.ll