[llvm] r279361 - [Profile] add test with large counts
Xinliang David Li via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 19 22:28:43 PDT 2016
Author: davidxl
Date: Sat Aug 20 00:28:42 2016
New Revision: 279361
URL: http://llvm.org/viewvc/llvm-project?rev=279361&view=rev
Log:
[Profile] add test with large counts
Added:
llvm/trunk/test/Transforms/PGOProfile/Inputs/branch1_large_count.proftext
Modified:
llvm/trunk/test/Transforms/PGOProfile/branch1.ll
Added: llvm/trunk/test/Transforms/PGOProfile/Inputs/branch1_large_count.proftext
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/PGOProfile/Inputs/branch1_large_count.proftext?rev=279361&view=auto
==============================================================================
--- llvm/trunk/test/Transforms/PGOProfile/Inputs/branch1_large_count.proftext (added)
+++ llvm/trunk/test/Transforms/PGOProfile/Inputs/branch1_large_count.proftext Sat Aug 20 00:28:42 2016
@@ -0,0 +1,8 @@
+# :ir is the flag to indicate this is IR level profile.
+:ir
+test_br_1
+25571299074
+2
+12884901888
+8589934592
+
Modified: llvm/trunk/test/Transforms/PGOProfile/branch1.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/PGOProfile/branch1.ll?rev=279361&r1=279360&r2=279361&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/PGOProfile/branch1.ll (original)
+++ llvm/trunk/test/Transforms/PGOProfile/branch1.ll Sat Aug 20 00:28:42 2016
@@ -8,8 +8,12 @@
; RUN: llvm-profdata merge %S/Inputs/branch1.proftext -o %t.profdata
; RUN: opt < %s -pgo-instr-use -pgo-test-profile-file=%t.profdata -S | FileCheck %s --check-prefix=USE
+; RUN: llvm-profdata merge %S/Inputs/branch1_large_count.proftext -o %t.l.profdata
+; RUN: opt < %s -pgo-instr-use -pgo-test-profile-file=%t.l.profdata -S | FileCheck %s --check-prefix=USE-LARGE
+
; New PM
; RUN: opt < %s -passes=pgo-instr-use -pgo-test-profile-file=%t.profdata -S | FileCheck %s --check-prefix=USE
+; RUN: opt < %s -passes=pgo-instr-use -pgo-test-profile-file=%t.l.profdata -S | FileCheck %s --check-prefix=USE-LARGE
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
@@ -31,6 +35,9 @@ entry:
; USE: br i1 %cmp, label %if.then, label %if.end
; USE-SAME: !prof ![[BW_ENTRY:[0-9]+]]
; USE-DAG: ![[BW_ENTRY]] = !{!"branch_weights", i32 2, i32 1}
+; USE-LARGE: br i1 %cmp, label %if.then, label %if.end
+; USE-LARGE-SAME: !prof ![[BW_L_ENTRY:[0-9]+]]
+; USE-LARGE-DAG: ![[BW_L_ENTRY]] = !{!"branch_weights", i32 -1431655766, i32 1431655765}
if.then:
; GEN: if.then:
More information about the llvm-commits
mailing list