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 rtl-optimization/17860] Wrong generated code for loop with varying bound


------- 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


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