blob: d16c737374d02ed73cd141d8dec995f284be5f42 [file] [log] [blame]
Reid Spencer69ccadd2006-12-02 04:23:10 +00001; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > %t1.ll
Tanya Lattner3f7706b2004-11-07 06:08:43 +00002; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
3; RUN: diff %t1.ll %t2.ll
4
Chris Lattner7e1635e2002-07-23 18:21:12 +00005implementation
6
7ulong "test"(ulong %X)
8begin
9 ret ulong %X
10end
11
12ulong "fib"(ulong %n)
13begin
14 %T = setlt ulong %n, 2 ; {bool}:0
15 br bool %T, label %BaseCase, label %RecurseCase
16
17RecurseCase:
18 %result = call ulong %test(ulong %n)
19 br label %BaseCase
20
21BaseCase:
22 %X = phi ulong [1, %0], [2, %RecurseCase]
23 ret ulong %X
24end
25