mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-26 05:27:43 +00:00
add a note
llvm-svn: 42573
This commit is contained in:
parent
cd424fc6c2
commit
17feaa781c
@ -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:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user