1 ; RUN: opt < %s -tailcallelim -S | FileCheck %s
4 define i32 @foo(i32 %x) {
5 ; CHECK: define i32 @foo
6 ; CHECK: %accumulator.tr = phi i32 [ 1, %entry ], [ 0, %body ]
8 %cond = icmp ugt i32 %x, 0 ; <i1> [#uses=1]
9 br i1 %cond, label %return, label %body
11 body: ; preds = %entry
12 %y = add i32 %x, 1 ; <i32> [#uses=1]
13 %tmp = call i32 @foo(i32 %y) ; <i32> [#uses=0]
16 ; CHECK: ret i32 %accumulator.tr
18 return: ; preds = %entry