diff options
author | Jan Hubicka <jh@suse.cz> | 2013-01-09 22:29:07 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2013-01-09 21:29:07 +0000 |
commit | 7770c9e9060766568d00815506142658e703f629 (patch) | |
tree | c77375c482da17eb65c2be59bfe9f091ce996e8d /gcc | |
parent | a19b1432574df7f3c59b9668adc56141db4a3333 (diff) | |
download | gcc-7770c9e9060766568d00815506142658e703f629.zip gcc-7770c9e9060766568d00815506142658e703f629.tar.gz gcc-7770c9e9060766568d00815506142658e703f629.tar.bz2 |
re PR tree-optimization/55569 (ICE: in check_probability, at basic-block.h:944 with -ftree-vectorize)
PR tree-optimization/55569
* cfgloopmanip.c (scale_loop_profile): Make ITERATION_BOUND gcov_type.
* cfgloop.h (scale_loop_profile): Likewise.
From-SVN: r195067
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cfgloop.h | 2 | ||||
-rw-r--r-- | gcc/cfgloopmanip.c | 4 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/pr55569.c | 11 |
5 files changed, 25 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ac4c298..ddfbcff 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2013-01-09 Jan Hubicka <jh@suse.cz> + PR tree-optimization/55569 + * cfgloopmanip.c (scale_loop_profile): Make ITERATION_BOUND gcov_type. + * cfgloop.h (scale_loop_profile): Likewise. + +2013-01-09 Jan Hubicka <jh@suse.cz> + PR lto/45375 * ipa-inline.c (ipa_inline): Remove extern inlines and virtual functions. * cgraphclones.c (cgraph_clone_node): Cpoy also LTO file data. diff --git a/gcc/cfgloop.h b/gcc/cfgloop.h index 1f155f7..2d90d38 100644 --- a/gcc/cfgloop.h +++ b/gcc/cfgloop.h @@ -711,7 +711,7 @@ extern void unroll_and_peel_loops (int); extern void doloop_optimize_loops (void); extern void move_loop_invariants (void); extern bool finite_loop_p (struct loop *); -extern void scale_loop_profile (struct loop *loop, int scale, int iteration_bound); +extern void scale_loop_profile (struct loop *loop, int scale, gcov_type iteration_bound); extern vec<basic_block> get_loop_hot_path (const struct loop *loop); /* Returns the outermost loop of the loop nest that contains LOOP.*/ diff --git a/gcc/cfgloopmanip.c b/gcc/cfgloopmanip.c index 2528ec5..af29677 100644 --- a/gcc/cfgloopmanip.c +++ b/gcc/cfgloopmanip.c @@ -481,7 +481,7 @@ scale_loop_frequencies (struct loop *loop, int num, int den) to iterate too many times. */ void -scale_loop_profile (struct loop *loop, int scale, int iteration_bound) +scale_loop_profile (struct loop *loop, int scale, gcov_type iteration_bound) { gcov_type iterations = expected_loop_iterations_unbounded (loop); edge e; @@ -491,7 +491,7 @@ scale_loop_profile (struct loop *loop, int scale, int iteration_bound) fprintf (dump_file, ";; Scaling loop %i with scale %f, " "bounding iterations to %i from guessed %i\n", loop->num, (double)scale / REG_BR_PROB_BASE, - iteration_bound, (int)iterations); + (int)iteration_bound, (int)iterations); /* See if loop is predicted to iterate too many times. */ if (iteration_bound && iterations > 0 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 238d752..56a6a48 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2013-01-09 Jan Hubicka <jh@suse.cz> + + PR tree-optimization/55569 + * gcc.c-torture/compile/pr55569.c: New testcase. + 2013-01-09 Mikael Morin <mikael@gcc.gnu.org> PR fortran/47203 diff --git a/gcc/testsuite/gcc.c-torture/compile/pr55569.c b/gcc/testsuite/gcc.c-torture/compile/pr55569.c new file mode 100644 index 0000000..2a53c80 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr55569.c @@ -0,0 +1,11 @@ +/* { dg-options "-O1 -ftree-vectorize" } */ +int *bar (void); + +void +foo (void) +{ + long x; + int *y = bar (); + for (x = -1 / sizeof (int); x; --x, ++y) + *y = 0; +} |