You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
555 B

; RUN: opt -inline -attributor-cgscc -tailcallelim -S %s | FileCheck %s
;
; CHECK: define void @foo()
; CHECK: declare i32 @baz()
; CHECK-NOT: void @goo()
; CHECK-NOT: void @bar()
define void @foo() {
call fastcc void @bar()
ret void
}
define internal fastcc void @goo() {
call fastcc void @bar()
ret void
}
define internal fastcc void @bar() {
%call = call i32 @baz()
%cond = icmp eq i32 %call, 0
br i1 %cond, label %if.then, label %if.end
if.then:
call fastcc void @goo()
br label %if.end
if.end:
ret void
}
declare i32 @baz()