This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/19210] [4.0 Regression] not using do-loop for some loops
- From: "rakdver at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Dec 2004 22:28:30 -0000
- Subject: [Bug rtl-optimization/19210] [4.0 Regression] not using do-loop for some loops
- References: <20041230204442.19210.pinskia@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From rakdver at gcc dot gnu dot org 2004-12-30 22:28 -------
Doloop optimizer believes that the loop may be infinite. There are two ways
how to prove that this is not the case:
1) k is signed, and thus cannot overflow with -fno-wrapv
2) k cannot run out of the bounds of the array
On rtl level 1) is no longer available. Using 2) would probably be possible,
but relatively difficult.
The simplest solution seems to be using information about number of iterations
computed at tree level. This is however also a nontrivial project requiring
changes in many parts of gcc (and at least a few weeks of work), and as such
this solution cannot be used in 4.0.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19210