aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/expr.c
diff options
context:
space:
mode:
authorXionghu Luo <luoxhu@linux.ibm.com>2021-12-28 19:09:14 -0600
committerXionghu Luo <luoxhu@linux.ibm.com>2021-12-28 19:11:28 -0600
commit44372676e81358de29d5c853685a7664a95d8a96 (patch)
tree0a4e76fdcad408ddebe415e5886fa65c5c7b1104 /gcc/fortran/expr.c
parent054e57e467b15677966f832b491b1584feb194ee (diff)
downloadgcc-44372676e81358de29d5c853685a7664a95d8a96.zip
gcc-44372676e81358de29d5c853685a7664a95d8a96.tar.gz
gcc-44372676e81358de29d5c853685a7664a95d8a96.tar.bz2
Fix ICE in lsplit when built with -O3 -fno-guess-branch-probability [PR103793]
no-guess-branch-probability option requires profile_count scaling with initialized_p guard, use multiply instead of apply_scale, which will do the right thing to undefined probabilities and will not cause unnecesary roundoff errors and precision info loss. Also merge the missed part of r12-6086 of factor out function to avoid duplicate code. Regression testest pass on Power and X86. gcc/ChangeLog: PR tree-optimization/103793 * tree-ssa-loop-split.c (fix_loop_bb_probability): New function. (split_loop): Use multiply to scale loop1's exit probability. (do_split_loop_on_cond): Call fix_loop_bb_probability. gcc/testsuite/ChangeLog: PR tree-optimization/103793 * gcc.dg/pr103793.c: New test.
Diffstat (limited to 'gcc/fortran/expr.c')
0 files changed, 0 insertions, 0 deletions