[CodeGen] Don't attempt a tail-call with a non-forwarded explicit sret.
authorAhmed Bougacha <ahmed.bougacha@gmail.com>
Fri, 27 Mar 2015 20:35:49 +0000 (20:35 +0000)
committerAhmed Bougacha <ahmed.bougacha@gmail.com>
Fri, 27 Mar 2015 20:35:49 +0000 (20:35 +0000)
commit19e2fce680cbe1c6e644b48f29ff5ed461bb26eb
tree68c7fba86d9faf87db41976e2154f9ed39ba8c8e
parent2615b686d3ecfa2354edb60ead0c72c5a2e88dd4
[CodeGen] Don't attempt a tail-call with a non-forwarded explicit sret.

Tailcalls are only OK with forwarded sret pointers. With explicit sret,
one approximation is to check that the pointer isn't an Instruction, as
in that case it might point into some local memory (alloca). That's not
OK with tailcalls.

Explicit sret counterpart to r233409.
Differential Revison: http://reviews.llvm.org/D8510

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233410 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
test/CodeGen/AArch64/tailcall-explicit-sret.ll [new file with mode: 0644]