diff options
Diffstat (limited to 'test/Feature/indirectcall2.ll')
-rw-r--r-- | test/Feature/indirectcall2.ll | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/Feature/indirectcall2.ll b/test/Feature/indirectcall2.ll new file mode 100644 index 0000000000..4a12734cdf --- /dev/null +++ b/test/Feature/indirectcall2.ll @@ -0,0 +1,21 @@ +implementation + +ulong "test"(ulong %X) +begin + ret ulong %X +end + +ulong "fib"(ulong %n) +begin + %T = setlt ulong %n, 2 ; {bool}:0 + br bool %T, label %BaseCase, label %RecurseCase + +RecurseCase: + %result = call ulong %test(ulong %n) + br label %BaseCase + +BaseCase: + %X = phi ulong [1, %0], [2, %RecurseCase] + ret ulong %X +end + |