36 lines · plain
1; Unknown (e.g. indirect) calls returns conservative results from function propagation2; RUN: opt -thinlto-bc %s -thin-link-bitcode-file=%t1.thinlink.bc -o %t1.bc3; RUN: llvm-lto2 run -disable-thinlto-funcattrs=0 %t1.bc -o %t.o -save-temps \4; RUN: -r %t1.bc,indirect,px -r %t1.bc,inlineasm,px -r %t1.bc,selectcallee,px -r %t1.bc,f, -r %t1.bc,g, -r %t1.bc,global,5; RUN: llvm-dis -o - %t.o.1.3.import.bc | FileCheck %s6 7target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"8target triple = "x86_64-unknown-linux-gnu"9 10; CHECK-NOT: ; Function Attrs:11; CHECK: define i32 @indirect(ptr captures(none) %0) {12define i32 @indirect(ptr captures(none)) {13 %2 = tail call i32 %0()14 ret i32 %215}16 17; CHECK-NOT: ; Function Attrs:18; CHECK: define ptr @inlineasm() {19define ptr @inlineasm() {20entry:21 %0 = tail call ptr asm sideeffect "lea ff_h264_cabac_tables(%rip), $0", "=&r,~{dirflag},~{fpsr},~{flags}"()22 ret ptr %023}24 25; CHECK-NOT: ; Function Attrs:26; CHECK: define void @selectcallee() {27define void @selectcallee() {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 @f()34declare void @g()35@global = extern_weak global i3236