add a note
authorChris Lattner <sabre@nondot.org>
Wed, 3 Oct 2007 06:10:59 +0000 (06:10 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 3 Oct 2007 06:10:59 +0000 (06:10 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42573 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/README.txt

index 37b671f34b7638eb1db8e0fe532be03517a4a01f..2db7e64874b99de6f6f671c0812fe1d94b673577 100644 (file)
@@ -427,6 +427,22 @@ return:
 
 //===---------------------------------------------------------------------===//
 
+Tail recursion elimination is not transforming this function, because it is
+returning n, which fails the isDynamicConstant check in the accumulator 
+recursion checks.
+
+long long fib(const long long n) {
+  switch(n) {
+    case 0:
+    case 1:
+      return n;
+    default:
+      return fib(n-1) + fib(n-2);
+  }
+}
+
+//===---------------------------------------------------------------------===//
+
 Argument promotion should promote arguments for recursive functions, like 
 this: