llvm.org GIT mirror llvm / 664c953
Testcase for new bug git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1797 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 17 years ago
1 changed file(s) with 26 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 ; Inlining used to break PHI nodes. This tests that they are correctly updated
1 ; when a node is split around the call instruction. The verifier caught the error.
2 ;
3 ; RUN: as < %s | opt -inline -verify
4 ;
5 implementation
6
7 ulong "test"(ulong %X)
8 begin
9 ret ulong %X
10 end
11
12 ulong "fib"(ulong %n)
13 begin
14 %T = setlt ulong %n, 2 ; {bool}:0
15 br bool %T, label %BaseCase, label %RecurseCase
16
17 RecurseCase:
18 %result = call ulong %test(ulong %n)
19 br label %BaseCase
20
21 BaseCase:
22 %X = phi ulong [1, %0], [2, %RecurseCase]
23 ret ulong %X
24 end
25