1 ; RUN: llvm-as < %s | opt -cee
3 ; The 'cee' pass is breaking SSA form when it blindly forwards the branch from
4 ; Eq to branch to "Forwarded" instead.
8 int %test(int %A, int %B, bool %c0) {
10 %c1 = seteq int %A, %B
11 br bool %c1, label %Eq, label %Loop
13 Eq: ; In this block we know that A == B
14 br label %Loop ; This should be modified to branch to "Forwarded".
16 Loop: ;; Merge point, nothing is known here...
17 %Z = phi int [%A, %Start], [%B, %Eq], [%Z, %Bottom]
18 %c2 = setgt int %A, %B
19 br bool %c2, label %Forwarded, label %Bottom
22 %Z2 = phi int [%Z, %Loop]
23 call int %test(int 0, int %Z2, bool true)