1cee313d2SEric Christopher; RUN: opt < %s -passes=pgo-icall-prom -pass-remarks-missed=pgo-icall-prom -S 2>& 1 | FileCheck %s 2cee313d2SEric Christopher 3cee313d2SEric Christopher; CHECK: remark: <unknown>:0:0: Cannot promote indirect call to func4 with count of 1234: The number of arguments mismatch 4cee313d2SEric Christopher; CHECK: remark: <unknown>:0:0: Cannot promote indirect call: target with md5sum{{.*}} not found 5cee313d2SEric Christopher; CHECK: remark: <unknown>:0:0: Cannot promote indirect call to func2 with count of 7890: Return type mismatch 6cee313d2SEric Christopher 77b1d7937SAmy Huangtarget datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" 8cee313d2SEric Christophertarget triple = "x86_64-unknown-linux-gnu" 9cee313d2SEric Christopher 10*9ff36df5SFangrui Song@foo = common global ptr null, align 8 11*9ff36df5SFangrui Song@foo2 = common global ptr null, align 8 12*9ff36df5SFangrui Song@foo3 = common global ptr null, align 8 13cee313d2SEric Christopher 14cee313d2SEric Christopherdefine i32 @func4(i32 %i) { 15cee313d2SEric Christopherentry: 16cee313d2SEric Christopher ret i32 %i 17cee313d2SEric Christopher} 18cee313d2SEric Christopher 19cee313d2SEric Christopherdefine void @func2() { 20cee313d2SEric Christopherentry: 21cee313d2SEric Christopher ret void 22cee313d2SEric Christopher} 23cee313d2SEric Christopher 24cee313d2SEric Christopherdefine i32 @bar() { 25cee313d2SEric Christopherentry: 26*9ff36df5SFangrui Song %tmp = load ptr, ptr @foo, align 8 27cee313d2SEric Christopher %call = call i32 %tmp(), !prof !1 28*9ff36df5SFangrui Song %tmp2 = load ptr, ptr @foo2, align 8 29cee313d2SEric Christopher %call1 = call i32 %tmp2(), !prof !2 30cee313d2SEric Christopher %add = add nsw i32 %call1, %call 31*9ff36df5SFangrui Song %tmp3 = load ptr, ptr @foo3, align 8 32cee313d2SEric Christopher %call2 = call i32 %tmp3(), !prof !3 33cee313d2SEric Christopher %add2 = add nsw i32 %add, %call2 34cee313d2SEric Christopher ret i32 %add2 35cee313d2SEric Christopher} 36cee313d2SEric Christopher 37cee313d2SEric Christopher!1 = !{!"VP", i32 0, i64 1801, i64 7651369219802541373, i64 1234, i64 -4377547752858689819, i64 567} 38cee313d2SEric Christopher!2 = !{!"VP", i32 0, i64 3023, i64 -6929281286627296573, i64 2345, i64 -4377547752858689819, i64 678} 39cee313d2SEric Christopher!3 = !{!"VP", i32 0, i64 7890, i64 -4377547752858689819, i64 7890} 40