1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 20:23:11 +01:00
llvm-mirror/test/Analysis/CallGraph/ignore-assumelike-calls.ll
2021-02-25 09:48:29 -08:00

27 lines
886 B
LLVM

; RUN: opt < %s -print-callgraph -disable-output 2>&1 | FileCheck %s
; CHECK: Call graph node <<null function>><<{{.*}}>> #uses=0
; CHECK-NEXT: CS<None> calls function 'cast_only'
; CHECK-NEXT: CS<None> calls function 'llvm.lifetime.start.p0i8'
; CHECK-EMPTY:
; CHECK-NEXT: Call graph node for function: 'cast_only'<<{{.*}}>> #uses=1
; CHECK-EMPTY:
; CHECK-NEXT: Call graph node for function: 'llvm.lifetime.start.p0i8'<<{{.*}}>> #uses=1
; CHECK-EMPTY:
; CHECK-NEXT: Call graph node for function: 'used_by_lifetime'<<{{.*}}>> #uses=0
; CHECK-EMPTY:
define internal void @used_by_lifetime() {
entry:
%c = bitcast void()* @used_by_lifetime to i8*
call void @llvm.lifetime.start.p0i8(i64 4, i8* %c)
ret void
}
define internal void @cast_only() {
entry:
%c = bitcast void()* @cast_only to i8*
ret void
}
declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture)