New testcases
[oota-llvm.git] / test / Transforms / CorrelatedExprs / 2002-10-08-DominatorTest.ll
1 ; Test to make sure that SSA is correctly updated
2 ; RUN: as < %s | opt -cee
3 ;
4 implementation   ; Functions:
5
6 int %test(int %A, int %B, bool %c0) {
7 Start:          ; No predecessors!
8         %c1 = seteq int %A, %B          ; <bool> [#uses=1]
9         br bool %c1, label %Eq, label %Start_crit_edge
10
11 Start_crit_edge:                ; preds = %Start
12         br label %Loop
13
14 Eq:             ; preds = %Start
15         br label %Loop
16
17 Loop:           ; preds = %Bottom, %Eq, %Start_crit_edge
18         %Z = phi int [ %A, %Start_crit_edge ], [ %B, %Eq ], [ %Z, %Bottom ]             ; <int> [#uses=2]
19         %c2 = setge int %A, %B          ; <bool> [#uses=1]
20         br bool %c2, label %Forwarded, label %Loop_crit_edge
21
22 Loop_crit_edge:         ; preds = %Loop
23         br label %Bottom
24
25 Forwarded:              ; preds = %Loop
26         %Z2 = phi int [ %Z, %Loop ]             ; <int> [#uses=1]
27         call int %test( int 0, int %Z2, bool true )             ; <int>:0 [#uses=0]
28         br label %Bottom
29
30 Bottom:         ; preds = %Forwarded, %Loop_crit_edge
31         br label %Loop
32 }