mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 04:02:41 +01:00
84d3c8040f
Summary: Otherwise we can get unaccounted references to call graph nodes. Reviewers: jdoerfert, sstefan1 Reviewed By: jdoerfert Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D79382
32 lines
555 B
LLVM
32 lines
555 B
LLVM
; 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()
|