2009-09-08 22:34:10 +00:00
|
|
|
; RUN: opt -tailcallelim %s -S | FileCheck %s
|
2009-09-07 22:14:41 +00:00
|
|
|
; PR615
|
2005-08-07 04:25:39 +00:00
|
|
|
|
2008-03-10 07:21:50 +00:00
|
|
|
declare void @bar(i32*)
|
2005-08-07 04:25:39 +00:00
|
|
|
|
2008-03-10 07:21:50 +00:00
|
|
|
define i32 @foo() {
|
2009-09-05 11:35:16 +00:00
|
|
|
; CHECK: i32 @foo()
|
2009-09-07 22:14:41 +00:00
|
|
|
; CHECK-NEXT: alloca
|
2008-03-10 07:21:50 +00:00
|
|
|
%A = alloca i32 ; <i32*> [#uses=2]
|
|
|
|
store i32 17, i32* %A
|
|
|
|
call void @bar( i32* %A )
|
|
|
|
%X = tail call i32 @foo( ) ; <i32> [#uses=1]
|
|
|
|
ret i32 %X
|
2005-08-07 04:25:39 +00:00
|
|
|
}
|
2008-03-10 07:21:50 +00:00
|
|
|
|