[opaque pointer type] Pass GlobalAlias the actual pointer type rather than decomposin...
[oota-llvm.git] / test / Transforms / TailCallElim / 2010-06-26-MultipleReturnValues.ll
1 ; RUN: opt < %s -tailcallelim -S | FileCheck %s
2 ; PR7328
3 ; PR7506
4 define i32 @foo(i32 %x) {
5 ; CHECK-LABEL: define i32 @foo(
6 ; CHECK: %accumulator.tr = phi i32 [ 1, %entry ], [ 0, %body ]
7 entry:
8   %cond = icmp ugt i32 %x, 0                      ; <i1> [#uses=1]
9   br i1 %cond, label %return, label %body
10
11 body:                                             ; preds = %entry
12   %y = add i32 %x, 1                              ; <i32> [#uses=1]
13   %tmp = call i32 @foo(i32 %y)                    ; <i32> [#uses=0]
14 ; CHECK-NOT: call
15   ret i32 0
16 ; CHECK: ret i32 %accumulator.tr
17
18 return:                                           ; preds = %entry
19   ret i32 1
20 }