Use the new prcontext script.
[oota-llvm.git] / test / Transforms / LICM / sink_only_some_exits.ll
1 ; This testcase checks to make sure we can sink values which are only live on
2 ; some exits out of the loop, and that we can do so without breaking dominator
3 ; info.
4 ;
5 ; RUN: llvm-as < %s | opt -licm | llvm-dis | %prcontext add 1 | grep exit2:
6
7 implementation   ; Functions:
8
9 int %test(bool %C1, bool %C2, int *%P, int* %Q) {
10 Entry:
11         br label %Loop
12
13 Loop:
14         br bool %C1, label %Cont, label %exit1
15 Cont:
16         %X = load int* %P
17         store int %X, int* %Q
18         %V = add int %X, 1
19         br bool %C2, label %Loop, label %exit2
20
21 exit1:
22         ret int 0
23 exit2:
24         ret int %V
25 }