Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
571a03b8
Commit
571a03b8
authored
Jan 07, 2002
by
Jakub Jelinek
Committed by
Jakub Jelinek
Jan 07, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* predict.c (combine_predictions_for_insn): Avoid division by zero.
From-SVN: r48615
parent
2e951384
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
gcc/ChangeLog
+4
-0
gcc/predict.c
+6
-2
No files found.
gcc/ChangeLog
View file @
571a03b8
2002-01-07 Jakub Jelinek <jakub@redhat.com>
* predict.c (combine_predictions_for_insn): Avoid division by zero.
2002-01-07 Jakub Jelinek <jakub@redhat.com>
* simplify-rtx.c (simplify_plus_minus): Bump n_ops for NOT.
Don't allow -1 - x -> ~x simplifications in the first pass.
...
...
gcc/predict.c
View file @
571a03b8
...
...
@@ -253,8 +253,12 @@ combine_predictions_for_insn (insn, bb)
*
(
REG_BR_PROB_BASE
-
probability
));
/* Use FP math to avoid overflows of 32bit integers. */
combined_probability
=
(((
double
)
combined_probability
)
*
probability
*
REG_BR_PROB_BASE
/
d
+
0
.
5
);
if
(
d
==
0
)
/* If one probability is 0% and one 100%, avoid division by zero. */
combined_probability
=
REG_BR_PROB_BASE
/
2
;
else
combined_probability
=
(((
double
)
combined_probability
)
*
probability
*
REG_BR_PROB_BASE
/
d
+
0
.
5
);
}
/* Decide which heuristic to use. In case we didn't match anything,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment