1 ; RUN: llvm-upgrade < %s | llvm-as | opt -sccp -simplifycfg | llvm-dis | \
4 void %cprop_test11(int* %data.1) {
5 entry: ; No predecessors!
6 %tmp.1 = load int* %data.1 ; <int> [#uses=3]
7 %tmp.41 = setgt int %tmp.1, 1 ; <bool> [#uses=1]
8 br bool %tmp.41, label %no_exit, label %loopexit
10 no_exit: ; preds = %entry, %then, %endif
11 %j.0 = phi int [ %j.0, %endif ], [ %i.0, %then ], [ 1, %entry ] ; <int> [#uses=3]
12 %i.0 = phi int [ %inc, %endif ], [ %inc1, %then ], [ 1, %entry ] ; <int> [#uses=4]
13 %tmp.8.not = cast int %j.0 to bool ; <bool> [#uses=1]
14 br bool %tmp.8.not, label %endif, label %then
16 then: ; preds = %no_exit
17 %inc1 = add int %i.0, 1 ; <int> [#uses=3]
18 %tmp.42 = setlt int %inc1, %tmp.1 ; <bool> [#uses=1]
19 br bool %tmp.42, label %no_exit, label %loopexit
21 endif: ; preds = %no_exit
22 %inc = add int %i.0, 1 ; <int> [#uses=3]
23 %tmp.4 = setlt int %inc, %tmp.1 ; <bool> [#uses=1]
24 br bool %tmp.4, label %no_exit, label %loopexit
26 loopexit: ; preds = %entry, %endif, %then
27 %j.1 = phi int [ 1, %entry ], [ %j.0, %endif ], [ %i.0, %then ] ; <int> [#uses=1]
28 %i.1 = phi int [ 1, %entry ], [ %inc, %endif ], [ %inc1, %then ] ; <int> [#uses=1]
29 %tmp.17 = getelementptr int* %data.1, long 1 ; <int*> [#uses=1]
30 store int %j.1, int* %tmp.17
31 %tmp.23 = getelementptr int* %data.1, long 2 ; <int*> [#uses=1]
32 store int %i.1, int* %tmp.23