diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-01-02 19:17:04 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-01-02 19:17:04 +0000 |
| commit | b915e9e0fc85ba6f398b3fab0db6a81a8913af94 (patch) | |
| tree | 98b8f811c7aff2547cab8642daf372d6c59502fb /test/Transforms/PGOProfile/thinlto_indirect_call_promotion.ll | |
| parent | 6421cca32f69ac849537a3cff78c352195e99f1b (diff) | |
Notes
Diffstat (limited to 'test/Transforms/PGOProfile/thinlto_indirect_call_promotion.ll')
| -rw-r--r-- | test/Transforms/PGOProfile/thinlto_indirect_call_promotion.ll | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/test/Transforms/PGOProfile/thinlto_indirect_call_promotion.ll b/test/Transforms/PGOProfile/thinlto_indirect_call_promotion.ll index 49dc7fa39e04..01f458a90a57 100644 --- a/test/Transforms/PGOProfile/thinlto_indirect_call_promotion.ll +++ b/test/Transforms/PGOProfile/thinlto_indirect_call_promotion.ll @@ -4,26 +4,33 @@ ; RUN: llvm-lto -thinlto -o %t3 %t.bc %t2.bc ; RUN: opt -function-import -summary-file %t3.thinlto.bc %t.bc -o %t4.bc -print-imports 2>&1 | FileCheck %s --check-prefix=IMPORTS -; IMPORTS: Import a +; IMPORTS-DAG: Import a +; IMPORTS-DAG: Import c -; RUN: opt %t4.bc -pgo-icall-prom -S -icp-count-threshold=1 | FileCheck %s --check-prefix=ICALL-PROM -; RUN: opt %t4.bc -pgo-icall-prom -S -pass-remarks=pgo-icall-prom -icp-count-threshold=1 2>&1 | FileCheck %s --check-prefix=PASS-REMARK +; RUN: opt %t4.bc -icp-lto -pgo-icall-prom -S -icp-count-threshold=1 | FileCheck %s --check-prefix=ICALL-PROM +; RUN: opt %t4.bc -icp-lto -pgo-icall-prom -S -pass-remarks=pgo-icall-prom -icp-count-threshold=1 2>&1 | FileCheck %s --check-prefix=PASS-REMARK ; PASS-REMARK: Promote indirect call to a with count 1 out of 1 +; PASS-REMARK: Promote indirect call to c.llvm.0 with count 1 out of 1 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" @foo = external local_unnamed_addr global void ()*, align 8 +@bar = external local_unnamed_addr global void ()*, align 8 define i32 @main() local_unnamed_addr { entry: %0 = load void ()*, void ()** @foo, align 8 ; ICALL-PROM: br i1 %{{[0-9]+}}, label %if.true.direct_targ, label %if.false.orig_indirect, !prof [[BRANCH_WEIGHT:![0-9]+]] tail call void %0(), !prof !1 + %1 = load void ()*, void ()** @bar, align 8 +; ICALL-PROM: br i1 %{{[0-9]+}}, label %if.true.direct_targ1, label %if.false.orig_indirect2, !prof [[BRANCH_WEIGHT:![0-9]+]] + tail call void %1(), !prof !2 ret i32 0 } !1 = !{!"VP", i32 0, i64 1, i64 -6289574019528802036, i64 1} +!2 = !{!"VP", i32 0, i64 1, i64 591260329866125152, i64 1} ; Should not have a VP annotation on new indirect call (check before and after ; branch_weights annotation). |
