Handle the case of a tail recursion in which the tail call is followed
authorDuncan Sands <baldrick@free.fr>
Tue, 13 Jul 2010 15:41:41 +0000 (15:41 +0000)
committerDuncan Sands <baldrick@free.fr>
Tue, 13 Jul 2010 15:41:41 +0000 (15:41 +0000)
commitd0d3ccc827de69de3d9f666aa922f5f191219a06
tree8925c7ed2232d06bd3179beb3cf67c55fc4e1297
parent63d024fc9a4f89987fa2cf7ab466ea17ec78ed14
Handle the case of a tail recursion in which the tail call is followed
by a return that returns a constant, while elsewhere in the function
another return instruction returns a different constant.  This is a
special case of accumulator recursion, so just generalize the existing
logic a bit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108241 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/TailRecursionElimination.cpp
test/Transforms/TailCallElim/2010-06-26-MultipleReturnValues.ll