blob: cdbdb2ce08a131032120d4325f60d8dcf1efe57b [file] [log] [blame]
Reid Spencer69ccadd2006-12-02 04:23:10 +00001; RUN: llvm-upgrade < %s | llvm-as | opt -sccp -dce -simplifycfg | llvm-dis | not grep br
Chris Lattnerff2ab4d2004-01-12 03:57:00 +00002
3int %test(int %param) {
4entry:
5 %tmp.1 = setne int %param, 0
6 br bool %tmp.1, label %endif.0, label %else
7
8else:
9 br label %endif.0
10
11endif.0:
12 %a.0 = phi int [ 2, %else ], [ 3, %entry ]
13 %b.0 = phi int [ 3, %else ], [ 2, %entry ]
14 %tmp.5 = add int %a.0, %b.0
15 %tmp.7 = setne int %tmp.5, 5
16 br bool %tmp.7, label %UnifiedReturnBlock, label %endif.1
17
18endif.1:
19 ret int 0
20
21UnifiedReturnBlock:
22 ret int 2
23}