diff options
author | Chris Lattner <sabre@nondot.org> | 2005-11-05 08:21:11 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-11-05 08:21:11 +0000 |
commit | 3b5f45042b17ad52815e3dd6c0c1df99f196dd04 (patch) | |
tree | e401abffb22e064f89ec982b7b7f8ab5c68be808 | |
parent | 3e2245bd34b8b3544909b09a74741bcfc42a4331 (diff) | |
download | external_llvm-3b5f45042b17ad52815e3dd6c0c1df99f196dd04.zip external_llvm-3b5f45042b17ad52815e3dd6c0c1df99f196dd04.tar.gz external_llvm-3b5f45042b17ad52815e3dd6c0c1df99f196dd04.tar.bz2 |
Implement Transforms/TailCallElim/return-undef.ll, a trivial case
that has been sitting in my inbox since May 18. :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24194 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Transforms/Scalar/TailRecursionElimination.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Transforms/Scalar/TailRecursionElimination.cpp b/lib/Transforms/Scalar/TailRecursionElimination.cpp index a8c2a3a..99c1f10 100644 --- a/lib/Transforms/Scalar/TailRecursionElimination.cpp +++ b/lib/Transforms/Scalar/TailRecursionElimination.cpp @@ -342,6 +342,7 @@ bool TailCallElim::ProcessReturningBlock(ReturnInst *Ret, BasicBlock *&OldEntry, // constant, return the value returned by the tail call, or that are being // accumulator recursion variable eliminated. if (Ret->getNumOperands() != 0 && Ret->getReturnValue() != CI && + !isa<UndefValue>(Ret->getReturnValue()) && AccumulatorRecursionEliminationInitVal == 0 && !getCommonReturnValue(Ret, CI)) return false; |