[Bug tree-optimization/26939] loop number of iterations analysis not working

2021-11-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26939 --- Comment #25 from Andrew Pinski --- In GCC 4.7 (and above), we get: Analyzing # of iterations of loop 2 exit condition [1, + , 1](no_overflow) <= i1_6(D) bounds on difference of bases: -1 ... 2147483646 result: under assumptions i1_

[Bug tree-optimization/26939] loop number of iterations analysis not working

2010-07-18 Thread dimhen at gmail dot com
--- Comment #24 from dimhen at gmail dot com 2010-07-18 12:56 --- is this the same problem? -- 'i*2 < 35' can't overflow void foo(char *ptr, unsigned size) { unsigned i; for(i=0; i*2 < size && i*2 < 35; i++ ) { *ptr++ = 0; } } # gcc -Wunsafe-loop-optimizations -O3

[Bug tree-optimization/26939] loop number of iterations analysis not working

2009-02-18 Thread rguenther at suse dot de
--- Comment #23 from rguenther at suse dot de 2009-02-18 09:34 --- Subject: Re: loop number of iterations analysis not working On Wed, 18 Feb 2009, rakdver at kam dot mff dot cuni dot cz wrote: > > > --- Comment #21 from rakdver at kam dot mff dot cuni dot cz 2009-02-18 > 04:

[Bug tree-optimization/26939] loop number of iterations analysis not working

2009-02-17 Thread rakdver at gcc dot gnu dot org
--- Comment #22 from rakdver at gcc dot gnu dot org 2009-02-18 04:47 --- (In reply to comment #21) > Subject: Re: loop number of iterations analysis not working > > > If the program terminates before i would wrap, then the number of > > iterations was not MAXINT. > > And since it can'

[Bug tree-optimization/26939] loop number of iterations analysis not working

2009-02-17 Thread rakdver at kam dot mff dot cuni dot cz
--- Comment #21 from rakdver at kam dot mff dot cuni dot cz 2009-02-18 04:11 --- Subject: Re: loop number of iterations analysis not working > If the program terminates before i would wrap, then the number of > iterations was not MAXINT. > And since it can't wrap, it is not infinite i

[Bug tree-optimization/26939] loop number of iterations analysis not working

2009-02-17 Thread dberlin at dberlin dot org
--- Comment #20 from dberlin at gcc dot gnu dot org 2009-02-18 02:54 --- Subject: Re: loop number of iterations analysis not working If the program terminates before i would wrap, then the number of iterations was not MAXINT. And since it can't wrap, it is not infinite in any

[Bug tree-optimization/26939] loop number of iterations analysis not working

2009-02-17 Thread rakdver at gcc dot gnu dot org
--- Comment #19 from rakdver at gcc dot gnu dot org 2009-02-18 00:50 --- > Smaller testcase: > > void bar(); > void foo(int i1) > { > int i; > > for (i=0; i<=i1; ++i) > bar(); > } What the # of iterations analysis does is the following: -- the number of iterations is i1, unles

[Bug tree-optimization/26939] loop number of iterations analysis not working

2009-02-12 Thread rakdver at gcc dot gnu dot org
--- Comment #18 from rakdver at gcc dot gnu dot org 2009-02-12 19:58 --- > It "works" once you change the loop exit condition to i < i1. Same effects > with unsigned variables (adjust the lower bound to sth like 2 to avoid ill > effects). There is nothing to fix if unsigned variables

[Bug tree-optimization/26939] loop number of iterations analysis not working

2009-02-08 Thread rakdver at gcc dot gnu dot org
-- rakdver at gcc dot gnu dot org changed: What|Removed |Added AssignedTo|unassigned at gcc dot gnu |rakdver at gcc dot gnu dot |dot org

[Bug tree-optimization/26939] loop number of iterations analysis not working

2009-02-08 Thread rguenth at gcc dot gnu dot org
--- Comment #17 from rguenth at gcc dot gnu dot org 2009-02-08 14:45 --- The situation is still worse than originally reported. Even without PRE we have Analyzing # of iterations of loop 2 exit condition [1, + , 1] <= i1_6(D) bounds on difference of bases: -1 ... 2147483646 resu