1 ; Test to make sure that SSA is correctly updated
2 ; RUN: llvm-upgrade < %s | llvm-as | opt -cee
4 implementation ; Functions:
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
11 Start_crit_edge: ; preds = %Start
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
22 Loop_crit_edge: ; preds = %Loop
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]
30 Bottom: ; preds = %Forwarded, %Loop_crit_edge