blob: 1088205cdcc86eeb067b77dff7f3a4b8b785654e [file] [log] [blame]
Chris Lattner664c9532002-02-25 00:34:18 +00001; Inlining used to break PHI nodes. This tests that they are correctly updated
2; when a node is split around the call instruction. The verifier caught the error.
3;
Misha Brukmane78760e2003-09-16 15:29:54 +00004; RUN: llvm-as < %s | opt -inline
Chris Lattner664c9532002-02-25 00:34:18 +00005;
6implementation
7
8ulong "test"(ulong %X)
9begin
10 ret ulong %X
11end
12
13ulong "fib"(ulong %n)
14begin
15 %T = setlt ulong %n, 2 ; {bool}:0
16 br bool %T, label %BaseCase, label %RecurseCase
17
18RecurseCase:
19 %result = call ulong %test(ulong %n)
20 br label %BaseCase
21
22BaseCase:
23 %X = phi ulong [1, %0], [2, %RecurseCase]
24 ret ulong %X
25end
26