• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt < %s -tailduplicate -taildup-threshold=3 -stats -disable-output |& not grep tailduplicate
2; XFAIL: *
3
4define i32 @foo(i32 %l) nounwind  {
5entry:
6	%cond = icmp eq i32 %l, 1		; <i1> [#uses=1]
7	br i1 %cond, label %bb, label %bb9
8
9bb:		; preds = %entry
10	br label %bb9
11
12bb5:		; preds = %bb9
13	%tmp7 = call i32 (...)* @bar( i32 %x.0 ) nounwind 		; <i32> [#uses=1]
14	br label %bb9
15
16bb9:		; preds = %bb5, %bb, %entry
17	%x.0 = phi i32 [ 0, %entry ], [ %tmp7, %bb5 ], [ 1525, %bb ]		; <i32> [#uses=2]
18	%l_addr.0 = phi i32 [ %l, %entry ], [ %tmp11, %bb5 ], [ %l, %bb ]		; <i32> [#uses=1]
19	%tmp11 = add i32 %l_addr.0, -1		; <i32> [#uses=2]
20	%tmp13 = icmp eq i32 %tmp11, -1		; <i1> [#uses=1]
21	br i1 %tmp13, label %bb15, label %bb5
22
23bb15:		; preds = %bb9
24	ret i32 %x.0
25}
26
27declare i32 @bar(...)
28