[llvm-commits] CVS: llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sat Nov 5 00:21:23 PST 2005
Changes in directory llvm/lib/Transforms/Scalar:
TailRecursionElimination.cpp updated: 1.21 -> 1.22
---
Log message:
Implement Transforms/TailCallElim/return-undef.ll, a trivial case
that has been sitting in my inbox since May 18. :)
---
Diffs of the changes: (+1 -0)
TailRecursionElimination.cpp | 1 +
1 files changed, 1 insertion(+)
Index: llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp
diff -u llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp:1.21 llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp:1.22
--- llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp:1.21 Mon Aug 8 14:11:57 2005
+++ llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp Sat Nov 5 02:21:11 2005
@@ -342,6 +342,7 @@
// 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;
More information about the llvm-commits
mailing list