summaryrefslogtreecommitdiff
path: root/test/Analysis/BranchProbabilityInfo
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2011-12-22 09:26:37 +0000
committerChandler Carruth <chandlerc@gmail.com>2011-12-22 09:26:37 +0000
commit51f40a725b4d0bb9ee7a59edc3d2b2392ae9e852 (patch)
tree61209f88fe8dff642f154e81bb0ff948776bd076 /test/Analysis/BranchProbabilityInfo
parent3963d617b3709c510003ac816fb42f28539fc62b (diff)
downloadllvm-51f40a725b4d0bb9ee7a59edc3d2b2392ae9e852.tar.gz
llvm-51f40a725b4d0bb9ee7a59edc3d2b2392ae9e852.tar.bz2
llvm-51f40a725b4d0bb9ee7a59edc3d2b2392ae9e852.tar.xz
Make the unreachable probability much much heavier. The previous
probability wouldn't be considered "hot" in some weird loop structures or other compounding probability patterns. This makes it much harder to confuse, but isn't really a principled fix. I'd actually like it if we could model a zero probability, as it would make this much easier to reason about. Suggestions for how to do this better are welcome. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147142 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis/BranchProbabilityInfo')
-rw-r--r--test/Analysis/BranchProbabilityInfo/noreturn.ll18
1 files changed, 9 insertions, 9 deletions
diff --git a/test/Analysis/BranchProbabilityInfo/noreturn.ll b/test/Analysis/BranchProbabilityInfo/noreturn.ll
index c53c1ed113..8b9ae11f7d 100644
--- a/test/Analysis/BranchProbabilityInfo/noreturn.ll
+++ b/test/Analysis/BranchProbabilityInfo/noreturn.ll
@@ -8,8 +8,8 @@ define i32 @test1(i32 %a, i32 %b) {
entry:
%cond = icmp eq i32 %a, 42
br i1 %cond, label %exit, label %abort
-; CHECK: edge entry -> exit probability is 1023 / 1024
-; CHECK: edge entry -> abort probability is 1 / 1024
+; CHECK: edge entry -> exit probability is 1048575 / 1048576
+; CHECK: edge entry -> abort probability is 1 / 1048576
abort:
call void @abort() noreturn
@@ -26,11 +26,11 @@ entry:
i32 2, label %case_b
i32 3, label %case_c
i32 4, label %case_d]
-; CHECK: edge entry -> exit probability is 1023 / 1027
-; CHECK: edge entry -> case_a probability is 1 / 1027
-; CHECK: edge entry -> case_b probability is 1 / 1027
-; CHECK: edge entry -> case_c probability is 1 / 1027
-; CHECK: edge entry -> case_d probability is 1 / 1027
+; CHECK: edge entry -> exit probability is 1048575 / 1048579
+; CHECK: edge entry -> case_a probability is 1 / 1048579
+; CHECK: edge entry -> case_b probability is 1 / 1048579
+; CHECK: edge entry -> case_c probability is 1 / 1048579
+; CHECK: edge entry -> case_d probability is 1 / 1048579
case_a:
br label %case_b
@@ -55,8 +55,8 @@ define i32 @test3(i32 %a, i32 %b) {
entry:
%cond1 = icmp eq i32 %a, 42
br i1 %cond1, label %exit, label %dom
-; CHECK: edge entry -> exit probability is 1023 / 1024
-; CHECK: edge entry -> dom probability is 1 / 1024
+; CHECK: edge entry -> exit probability is 1048575 / 1048576
+; CHECK: edge entry -> dom probability is 1 / 1048576
dom:
%cond2 = icmp ult i32 %a, 42