[Bug rtl-optimization/18577] [3.3 regression] variable use moved before initialization

falk at debian dot org gcc-bugzilla@gcc.gnu.org
Sun Nov 21 02:33:00 GMT 2004


------- Additional Comments From falk at debian dot org  2004-11-21 02:33 -------
The bug seems to be caused by the loop unroller making a pseudo local
to be able to duplicate it while it is still needed outside of the loop.
Reverting Eric Botcazou's patch for rtl-optimization/11841, which is
also about this, fixes the problem. I don't really understand what's going
on, but is it possible we still have to look at the pseudo luids and not
only the note luids? Like this?

diff -u -p -r1.184.2.9 unroll.c
--- unroll.c    17 May 2004 21:05:48 -0000      1.184.2.9
+++ unroll.c    21 Nov 2004 02:30:41 -0000
@@ -794,6 +794,8 @@ unroll_loop (loop, insn_count, strength_
       for (r = FIRST_PSEUDO_REGISTER; r < max_reg_before_loop; ++r)
        if (REGNO_FIRST_UID (r) > 0 && REGNO_FIRST_UID (r) < max_uid_for_loop
            && REGNO_FIRST_LUID (r) >= copy_start_luid
+           && REGNO_LAST_UID (r) > 0 && REGNO_LAST_UID (r) < max_uid_for_loop
+           && REGNO_LAST_LUID (r) <= copy_end_luid
            && REGNO_LAST_NOTE_UID (r) > 0 && REGNO_LAST_NOTE_UID (r) <
max_uid_for_loop
            && REGNO_LAST_NOTE_LUID (r) <= copy_end_luid)
          {


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ebotcazou at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18577



More information about the Gcc-bugs mailing list