This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/68963] [4.9/5/6 Regression] O3 vs. O2 discards part of loop and terminates early


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68963

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Honza, can you please have a look at this?  This looks like pretty important
bug to me.
We record_estimate of 2 (+1) from both of the a[] accesses, one is using the 1
* BIV as index and another is using 1 * BIV - y, both of these statements can
be executed at most 3 times, sure.  But, as they are in conditional code, where
one is executed in 0th to (y-1)th iteration and the other in yth to (2*y-1)th,
we should conclude from this that the loop has at most 6 iterations, not at
most 3 iterations.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]