1 ; RUN: opt %s -tailcallelim -S | FileCheck %s
4 declare void @use(i8* nocapture, i8* nocapture)
6 define i8* @foo(i8* nocapture %A, i1 %cond) {
8 ; CHECK: %A.tr = phi i8* [ %A, %0 ], [ %B, %cond_true ]
9 ; CHECK: %cond.tr = phi i1 [ %cond, %0 ], [ false, %cond_true ]
11 ; CHECK: %B = alloca i8
12 br i1 %cond, label %cond_true, label %cond_false
13 ; CHECK: br i1 %cond.tr, label %cond_true, label %cond_false
16 ; CHECK: br label %tailrecurse
17 call i8* @foo(i8* %B, i1 false)
21 call void @use(i8* %A, i8* %B)
22 ; CHECK: tail call void @use(i8* %A.tr, i8* %B)