diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2018-01-11 09:14:33 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2018-01-11 08:14:33 +0000 |
commit | 29c02e655dca7391afb7f2cbfab7c7bcb68361ac (patch) | |
tree | 850390880e53385f1c5fc8cc4e7abc4204bea7b7 | |
parent | 3211aea29a0576eeb3326879b2f58fc0ed374a40 (diff) | |
download | gcc-29c02e655dca7391afb7f2cbfab7c7bcb68361ac.zip gcc-29c02e655dca7391afb7f2cbfab7c7bcb68361ac.tar.gz gcc-29c02e655dca7391afb7f2cbfab7c7bcb68361ac.tar.bz2 |
re PR tree-optimization/83189 (internal compiler error: in probability_in, at profile-count.h:1050)
PR middle-end/83189
* gfortran.fortran-torture/compile/pr83189.f90: New testcase.
* tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
profile.
From-SVN: r256480
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.fortran-torture/compile/pr83189.f90 (renamed from gcc/testsuite/gfortran.fortran-torture/compile/pr83081.f90) | 0 | ||||
-rw-r--r-- | gcc/tree-ssa-loop-manip.c | 3 |
4 files changed, 14 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1a55b20..3265272 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,12 @@ 2018-01-10 Jan Hubicka <hubicka@ucw.cz> + PR middle-end/83189 + * gfortran.fortran-torture/compile/pr83189.f90: New testcase. + * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero + profile. + +2018-01-10 Jan Hubicka <hubicka@ucw.cz> + PR middle-end/83575 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition when in layout mode. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 68fe8ef..9173709 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2018-01-10 Jan Hubicka <hubicka@ucw.cz> + PR middle-end/83189 + * gfortran.fortran-torture/compile/pr83189.f90: New testcase. + +2018-01-10 Jan Hubicka <hubicka@ucw.cz> + * gcc.c-torture/compile/pr83575.c: New testcase. 2018-01-10 Michael Collison <michael.collison@arm.com> diff --git a/gcc/testsuite/gfortran.fortran-torture/compile/pr83081.f90 b/gcc/testsuite/gfortran.fortran-torture/compile/pr83189.f90 index 8e669ba..8e669ba 100644 --- a/gcc/testsuite/gfortran.fortran-torture/compile/pr83081.f90 +++ b/gcc/testsuite/gfortran.fortran-torture/compile/pr83189.f90 diff --git a/gcc/tree-ssa-loop-manip.c b/gcc/tree-ssa-loop-manip.c index 80e91d0..bf425af 100644 --- a/gcc/tree-ssa-loop-manip.c +++ b/gcc/tree-ssa-loop-manip.c @@ -1378,7 +1378,8 @@ tree_transform_and_unroll_loop (struct loop *loop, unsigned factor, { /* Avoid dropping loop body profile counter to 0 because of zero count in loop's preheader. */ - freq_e = freq_e.force_nonzero (); + if (freq_h.nonzero_p () && !(freq_e == profile_count::zero ())) + freq_e = freq_e.force_nonzero (); scale_loop_frequencies (loop, freq_e.probability_in (freq_h)); } |