2009-09-12 02:01:28 +08:00
|
|
|
; RUN: opt < %s -tailcallelim -S | \
|
2007-04-15 13:03:58 +08:00
|
|
|
; RUN: grep {call i32 @foo}
|
2005-08-07 12:25:39 +08:00
|
|
|
|
2008-03-10 15:21:50 +08:00
|
|
|
declare void @bar(i32*)
|
2005-08-07 12:25:39 +08:00
|
|
|
|
2008-03-10 15:21:50 +08:00
|
|
|
define i32 @foo(i32 %N) {
|
|
|
|
%A = alloca i32, i32 %N ; <i32*> [#uses=2]
|
|
|
|
store i32 17, i32* %A
|
|
|
|
call void @bar( i32* %A )
|
|
|
|
%X = tail call i32 @foo( i32 %N ) ; <i32> [#uses=1]
|
|
|
|
ret i32 %X
|
2005-08-07 12:25:39 +08:00
|
|
|
}
|
2008-03-10 15:21:50 +08:00
|
|
|
|