This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/17860] Wrong generated code for loop with varying bound
- From: "bonzini at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Oct 2004 10:06:03 -0000
- Subject: [Bug rtl-optimization/17860] Wrong generated code for loop with varying bound
- References: <20041006125056.17860.tal.agmon@nsc.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From bonzini at gcc dot gnu dot org 2004-10-07 10:05 -------
Discussion and patch
http://gcc.gnu.org/ml/gcc-patches/2004-10/msg00622.html
A transformation check_dbra_loop that is causing the miscompilation because it
uses a != test; not related to 16052 which is about signedness.
Also not related to loop invariant motion. The source is a bogus
NOTE_INSN_LOOP_VTOP note: after CSE and GCSE's constant propagation, the loop
is not anymore a duplicate of the loop-entry test:
if (i < 2)
do
foo = 0, i++;
while (i < 0);
is not reducible to a while loop, while loop thinks it is because the VTOP note
remains.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |bonzini at gcc dot gnu dot
| |org
BugsThisDependsOn|16052 |
Status|NEW |ASSIGNED
Keywords| |patch
Last reconfirmed|2004-10-06 17:05:07 |2004-10-07 10:05:58
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17860