1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00
llvm-mirror/test/Transforms/Util/cg-updater-dead-function-callees.ll
Sergey Dmitriev 84d3c8040f [CallGraphUpdater] Removed references to calles when deleting function
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
2020-05-04 18:59:47 -07:00

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()