]> granicus.if.org Git - llvm/commit
Fix a bug for rL312641.
authorWei Mi <wmi@google.com>
Fri, 8 Sep 2017 16:44:52 +0000 (16:44 +0000)
committerWei Mi <wmi@google.com>
Fri, 8 Sep 2017 16:44:52 +0000 (16:44 +0000)
commit9930880cbfd5fb6cd5e289c62c0919be374d67ab
tree86b39dd55c80e540f85717f39d93e12af711e098
parent145740999da4af50d2c9e948910df4818b0fc3f6
Fix a bug for rL312641.

rL312641 Allowed llvm.memcpy/memset/memmove to be tail calls when parent
function return the intrinsics's first argument. However on arm-none-eabi
platform, llvm.memcpy will be expanded to __aeabi_memcpy which doesn't
have return value. The fix is to check the libcall name after expansion
to match "memcpy/memset/memmove" before allowing those intrinsic to be
tail calls.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312799 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/Analysis.cpp
test/CodeGen/ARM/tailcall-mem-intrinsics.ll [new file with mode: 0644]