45 lines · plain
1; Test to check the callgraph for calls to casts.2; RUN: opt -module-summary %s -o %t.o3; RUN: llvm-bcanalyzer -dump %t.o | FileCheck %s4; PR349665 6; CHECK: <GLOBALVAL_SUMMARY_BLOCK7; CHECK-NEXT: <VERSION8; CHECK-NEXT: <FLAGS9; "op7" is a call to "callee" function.10; CHECK-NEXT: <PERMODULE_PROFILE {{.*}} op7=3 op8=0 op9=[[ALIASID:[0-9]+]]11; "another_caller" has only references but no calls.12; CHECK-NEXT: <PERMODULE_PROFILE {{.*}}/>13; CHECK-NEXT: <PERMODULE_PROFILE {{.*}} op0=[[ALIASEEID:[0-9]+]]14; CHECK-NEXT: <ALIAS {{.*}} op0=[[ALIASID]] {{.*}} op2=[[ALIASEEID]]/>15; CHECK-NEXT: </GLOBALVAL_SUMMARY_BLOCK>16 17; ModuleID = 'thinlto-function-summary-callgraph-cast.ll'18target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"19target triple = "x86_64-unknown-linux-gnu"20 21define void @caller() {22 call void @callee()23 call void @analias()24 ret void25}26 27define void @another_caller() {28 ; Test calls that aren't handled either as direct or indirect.29 call void getelementptr (i8, ptr @f, i64 ptrtoint (ptr @g to i64))()30 ret void31}32 33declare void @callee(...)34 35@analias = alias void (...), ptr @aliasee36 37define void @aliasee() {38entry:39 ret void40}41 42declare void @f()43declare void @g()44@global = extern_weak global i3245