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