• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt < %s -simplifycfg  -S | grep select
2; RUN: opt < %s -simplifycfg  -S | grep br | count 2
3
4define i32 @t2(i32 %a, i32 %b, i32 %c) nounwind  {
5entry:
6        %tmp1 = icmp eq i32 %b, 0
7        br i1 %tmp1, label %bb1, label %bb3
8
9bb1:            ; preds = %entry
10	%tmp2 = icmp sgt i32 %c, 1
11	br i1 %tmp2, label %bb2, label %bb3
12
13bb2:		; preds = bb1
14	%tmp3 = add i32 %a, 1
15	br label %bb3
16
17bb3:		; preds = %bb2, %entry
18	%tmp4 = phi i32 [ %b, %entry ], [ %a, %bb1 ], [ %tmp3, %bb2 ]
19        %tmp5 = sub i32 %tmp4, 1
20	ret i32 %tmp5
21}
22