2013-01-01 13:57:25 +00:00
|
|
|
; RUN: opt -inline -S < %s | FileCheck %s
|
2012-09-19 08:08:04 +00:00
|
|
|
|
|
|
|
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
|
|
|
|
target triple = "i386-apple-darwin10.0"
|
|
|
|
|
|
|
|
; rdar://10853263
|
|
|
|
|
|
|
|
; Make sure that the callee is still here.
|
2013-07-14 01:50:49 +00:00
|
|
|
; CHECK-LABEL: define i32 @callee(
|
2012-09-19 08:08:04 +00:00
|
|
|
define i32 @callee(i32 %param) {
|
|
|
|
%yyy = alloca [100000 x i8]
|
|
|
|
%r = bitcast [100000 x i8]* %yyy to i8*
|
|
|
|
call void @foo2(i8* %r)
|
|
|
|
ret i32 4
|
|
|
|
}
|
|
|
|
|
2013-07-14 01:50:49 +00:00
|
|
|
; CHECK-LABEL: define i32 @caller(
|
2012-09-19 08:08:04 +00:00
|
|
|
; CHECK-NEXT: entry:
|
|
|
|
; CHECK-NOT: alloca
|
|
|
|
; CHECK: ret
|
|
|
|
define i32 @caller(i32 %param) {
|
|
|
|
entry:
|
|
|
|
%t = call i32 @foo(i32 %param)
|
|
|
|
%cmp = icmp eq i32 %t, -1
|
|
|
|
br i1 %cmp, label %exit, label %cont
|
|
|
|
|
|
|
|
cont:
|
|
|
|
%r = call i32 @caller(i32 %t)
|
|
|
|
%f = call i32 @callee(i32 %r)
|
|
|
|
br label %cont
|
|
|
|
exit:
|
|
|
|
ret i32 4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare void @foo2(i8* %in)
|
|
|
|
|
|
|
|
declare i32 @foo(i32 %param)
|
|
|
|
|